Try to trigger my-apps pipeline
This commit is contained in:
parent
75e6939d82
commit
767dbf35e9
@ -3,9 +3,9 @@ steps:
|
|||||||
name: Build & Push Frontend
|
name: Build & Push Frontend
|
||||||
image: woodpeckerci/plugin-kaniko
|
image: woodpeckerci/plugin-kaniko
|
||||||
when:
|
when:
|
||||||
event: [ push, pull_request, tag, manual ] # 👈 allow manual run
|
event: [ push, pull_request, tag ]
|
||||||
path:
|
path:
|
||||||
include: [ frontend/** ] # 👈 filter for auto-trigger
|
include: [ frontend/** ]
|
||||||
settings:
|
settings:
|
||||||
registry: harbor.dvirlabs.com
|
registry: harbor.dvirlabs.com
|
||||||
repo: my-apps/labmap-frontend
|
repo: my-apps/labmap-frontend
|
||||||
@ -23,7 +23,7 @@ steps:
|
|||||||
name: Build & Push Backend
|
name: Build & Push Backend
|
||||||
image: woodpeckerci/plugin-kaniko
|
image: woodpeckerci/plugin-kaniko
|
||||||
when:
|
when:
|
||||||
event: [ push, pull_request, tag, manual ]
|
event: [ push, pull_request, tag ]
|
||||||
path:
|
path:
|
||||||
include: [ backend/** ]
|
include: [ backend/** ]
|
||||||
settings:
|
settings:
|
||||||
@ -39,27 +39,23 @@ steps:
|
|||||||
password:
|
password:
|
||||||
from_secret: DOCKER_PASSWORD
|
from_secret: DOCKER_PASSWORD
|
||||||
|
|
||||||
update-values:
|
trigger-my-apps:
|
||||||
name: Update my-apps image tag
|
name: Trigger my-apps pipeline
|
||||||
image: alpine
|
image: curlimages/curl
|
||||||
when:
|
when:
|
||||||
branch: master
|
event: [ push ]
|
||||||
event: push
|
|
||||||
environment:
|
|
||||||
GIT_SSH_COMMAND: 'ssh -i /root/.ssh/id_rsa -o StrictHostKeyChecking=no'
|
|
||||||
GIT_DEPLOY_KEY:
|
|
||||||
from_secret: GIT_DEPLOY_KEY
|
|
||||||
commands:
|
commands:
|
||||||
- apk add --no-cache git openssh yq
|
- |
|
||||||
- mkdir -p ~/.ssh
|
curl -X POST https://woodpecker.dvirlabs.com/api/repos/dvirlabs/my-apps/builds \
|
||||||
- echo "$GIT_DEPLOY_KEY" > ~/.ssh/id_rsa
|
-H "Authorization: Bearer ${WOODPECKER_TOKEN}" \
|
||||||
- chmod 600 ~/.ssh/id_rsa
|
-H "Content-Type: application/json" \
|
||||||
- git config --global user.name "Woodpecker Bot"
|
-d '{
|
||||||
- git config --global user.email "ci@dvirlabs.com"
|
"branch": "master",
|
||||||
- git clone git@192.168.10.242:dvirlabs/my-apps.git
|
"envs": {
|
||||||
- cd my-apps/manifests/labmap
|
"APP_NAME": "labmap",
|
||||||
- yq e '.image.frontend.tag = "${CI_COMMIT_SHA:0:7}"' -i values.yaml
|
"IMAGE_TAG": "'${CI_COMMIT_SHA:0:7}'"
|
||||||
- yq e '.image.backend.tag = "${CI_COMMIT_SHA:0:7}"' -i values.yaml
|
}
|
||||||
- git add values.yaml
|
}'
|
||||||
- git commit -m "Update labmap image tags to ${CI_COMMIT_SHA:0:7}" || echo "No changes to commit"
|
secrets:
|
||||||
- git push origin master
|
from_secret:
|
||||||
|
- WOODPECKER_TOKEN
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user