fix deployment CI
Some checks failed
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/build Pipeline failed
ci/woodpecker/push/test unknown status
ci/woodpecker/push/deploy unknown status

This commit is contained in:
Aaron Riedel 2024-11-05 21:24:51 +01:00
parent 69a2511237
commit 6fa4e551d2
Signed by: aaron
GPG key ID: 643004654D40D577

View file

@ -1,54 +1,29 @@
skip_clone: true skip_clone: true
steps: steps:
- name: bump tag in deployment-repo (prod) - name: bump tag in deployment-repo
image: git.ar21.de/aaron/kustomize-ci image: git.ar21.de/aaron/debian-ci
commands: commands:
- git clone https://git.ar21.de/aaron/deploymentrepo.git deployment-repo - git clone https://git.ar21.de/aaron/k8s-deployments.git deployment-repo
- cd deployment-repo/testapp/overlays/prod - cd deployment-repo/openproject
- kustomize edit set image git.ar21.de/aaron/testapp=git.ar21.de/aaron/testapp:${CI_PIPELINE_NUMBER} - yq -iy '.image.tag = "${CI_PIPELINE_NUMBER}"' values.yaml
when: when:
- branch: main - branch: main
event: push event: push
- name: bump tag in deployment-repo (testing) - name: push new tag to deployment-repo
image: git.ar21.de/aaron/kustomize-ci
commands:
- git clone https://git.ar21.de/aaron/deploymentrepo.git deployment-repo
- cd deployment-repo/testapp/overlays/testing
- kustomize edit set image git.ar21.de/aaron/testapp=git.ar21.de/aaron/testapp:testing-${CI_PIPELINE_NUMBER}
when:
- branch:
exclude: main
event: push
- name: push new tag to deployment-repo (prod)
image: appleboy/drone-git-push image: appleboy/drone-git-push
settings: settings:
branch: "${CI_PIPELINE_NUMBER}_testapp_prod" branch: "${CI_PIPELINE_NUMBER}_openproject_prod"
remote: ssh://git@git.ar21.de:2222/aaron/deploymentrepo.git remote: ssh://git@git.ar21.de:2222/aaron/k8s-deployments.git
path: deployment-repo path: deployment-repo
force: false force: false
commit: true commit: true
commit_message: "testapp: update image tag to ${CI_PIPELINE_NUMBER} (done automagically via Woodpecker pipeline)" commit_message: "openproject: update image tag to ${CI_PIPELINE_NUMBER} (done automagically via Woodpecker pipeline)"
ssh_key: ssh_key:
from_secret: FORGEJO_SSH_KEY from_secret: FORGEJO_SSH_KEY
when: when:
- branch: main - branch: main
event: push event: push
- name: push new tag to deployment-repo (staging) - name: create pull request
image: appleboy/drone-git-push
settings:
branch: "${CI_PIPELINE_NUMBER}_testapp_staging"
remote: ssh://git@git.ar21.de:2222/aaron/deploymentrepo.git
path: deployment-repo
force: false
commit: true
commit_message: "testapp STAGING: update image tag to staging-${CI_PIPELINE_NUMBER} (done automagically via Woodpecker pipeline)"
ssh_key:
from_secret: FORGEJO_SSH_KEY
when:
- branch:
exclude: main
event: push
- name: create pull request (prod)
image: git.ar21.de/tom/push-message-randomizer:latest image: git.ar21.de/tom/push-message-randomizer:latest
pull: true pull: true
settings: settings:
@ -56,12 +31,12 @@ steps:
gitea_token: gitea_token:
from_secret: FORGEJO_API from_secret: FORGEJO_API
owner: ${CI_REPO_OWNER} owner: ${CI_REPO_OWNER}
repo: deploymentrepo repo: k8s-deployments
branch: "${CI_PIPELINE_NUMBER}_testapp_prod" branch: "${CI_PIPELINE_NUMBER}_openproject_prod"
base_branch: main base_branch: main
pr_title: "TESTAPP: update image tag to ${CI_PIPELINE_NUMBER}" pr_title: "OPENPROJECT: update image tag to ${CI_PIPELINE_NUMBER}"
pr_body: | pr_body: |
### testapp image update ### openproject image update
{- random-pr-message -} {- random-pr-message -}
@ -78,37 +53,6 @@ steps:
when: when:
- branch: main - branch: main
event: push event: push
- name: create pull request (staging)
image: git.ar21.de/tom/push-message-randomizer:latest
pull: true
settings:
gitea_address: https://git.ar21.de
gitea_token:
from_secret: FORGEJO_API
owner: ${CI_REPO_OWNER}
repo: deploymentrepo
branch: "${CI_PIPELINE_NUMBER}_testapp_staging"
base_branch: main
pr_title: "TESTAPP STAGING: update image tag to ${CI_PIPELINE_NUMBER}"
pr_body: |
### testapp image update
{- random-pr-message -}
### Configuration
📅 **Schedule**: Branch creation - At any time, Automerge - At any time.
🚦 **Automerge**: Enabled.
skip_on_missing_branch: true
close_pr_if_empty: true
delete_branch_if_pr_empty: true
merge_when_checks_succeed: true
delete_branch_after_merge: true
when:
- branch:
exclude: main
event: push
depends_on: depends_on:
- lint - lint
- build - build