Try tigger gitops pipeline
This commit is contained in:
parent
1654d2b3d2
commit
e64715eafc
@ -95,18 +95,20 @@ steps:
|
||||
git commit -m "backend: update tag to $TAG" || echo "No changes"
|
||||
git push origin HEAD
|
||||
|
||||
trigger-gitops-pipeline:
|
||||
name: Trigger apps-gitops pipeline
|
||||
image: curlimages/curl
|
||||
when:
|
||||
branch: [ master, develop ]
|
||||
event: [ push ]
|
||||
trigger-gitops-via-push:
|
||||
name: Trigger apps-gitops via Git push
|
||||
image: alpine/git
|
||||
environment:
|
||||
WOODPECKER_API_TOKEN:
|
||||
from_secret: WOODPECKER_API_TOKEN
|
||||
commands:
|
||||
- |
|
||||
curl -X POST https://woodpecker.dvirlabs.com/api/repos/dvirlabs/apps-gitops/builds \
|
||||
-H "Authorization: Bearer $WOODPECKER_API_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"branch": "master"}'
|
||||
GIT_USERNAME:
|
||||
from_secret: GIT_USERNAME
|
||||
GIT_TOKEN:
|
||||
from_secret: GIT_TOKEN
|
||||
commands: |
|
||||
git config --global user.name "woodpecker-bot"
|
||||
git config --global user.email "ci@dvirlabs.com"
|
||||
git clone "https://${GIT_USERNAME}:${GIT_TOKEN}@git.dvirlabs.com/dvirlabs/apps-gitops.git"
|
||||
cd apps-gitops
|
||||
echo "# trigger at $(date)" >> .trigger
|
||||
git add .trigger
|
||||
git commit -m "ci: trigger apps-gitops build" || echo "no changes"
|
||||
git push origin HEAD
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user