127 lines
4 KiB
YAML
127 lines
4 KiB
YAML
skip_clone: true
|
||
steps:
|
||
- name: bump tag in deployment-repo (prod)
|
||
image: git.ar21.de/aaron/kustomize-ci
|
||
commands:
|
||
- git clone https://git.ar21.de/yolokube/core-deployments.git deployment-repo
|
||
- cd deployment-repo/dashboard/overlays/prod
|
||
- kustomize edit set image git.ar21.de/yolokube/dashboard=git.ar21.de/yolokube/dashboard:${CI_PIPELINE_NUMBER}
|
||
when:
|
||
- branch: master
|
||
event: push
|
||
- name: bump tag in deployment-repo (staging)
|
||
image: git.ar21.de/aaron/kustomize-ci
|
||
commands:
|
||
- git clone https://git.ar21.de/yolokube/core-deployments.git deployment-repo
|
||
- cd deployment-repo/dashboard/overlays/staging
|
||
- kustomize edit set image git.ar21.de/yolokube/dashboard=git.ar21.de/yolokube/dashboard:staging-${CI_PIPELINE_NUMBER}
|
||
when:
|
||
- branch:
|
||
exclude: master
|
||
event: push
|
||
- name: push new tag to deployment-repo (prod)
|
||
image: appleboy/drone-git-push
|
||
settings:
|
||
branch: "${CI_PIPELINE_NUMBER}_dashboard_prod"
|
||
remote: ssh://git@git.ar21.de:2222/yolokube/core-deployments.git
|
||
path: deployment-repo
|
||
force: false
|
||
commit: true
|
||
commit_message: "DASHBOARD: update image tag to ${CI_PIPELINE_NUMBER} (done automagically via Woodpecker pipeline)"
|
||
ssh_key:
|
||
from_secret: FORGEJO_SSH_KEY
|
||
when:
|
||
- branch: master
|
||
event: push
|
||
- name: push new tag to deployment-repo (staging)
|
||
image: appleboy/drone-git-push
|
||
settings:
|
||
branch: "${CI_PIPELINE_NUMBER}_dashboard_staging"
|
||
remote: ssh://git@git.ar21.de:2222/yolokube/core-deployments.git
|
||
path: deployment-repo
|
||
force: false
|
||
commit: true
|
||
commit_message: "DASHBOARD STAGING: update image tag to staging-${CI_PIPELINE_NUMBER} (done automagically via Woodpecker pipeline)"
|
||
ssh_key:
|
||
from_secret: FORGEJO_SSH_KEY
|
||
when:
|
||
- branch:
|
||
exclude: master
|
||
event: push
|
||
- name: generate random pull request message
|
||
image: git.ar21.de/tom/push-message-randomizer:latest
|
||
pull: true
|
||
when:
|
||
- event: push
|
||
- name: create pull request (prod)
|
||
image: johnwalkerx/gitea-pull-request-create-plugin:latest
|
||
pull: true
|
||
#commands:
|
||
# - PLUGIN_PR_BODY_MESSAGE="$(cat message.txt)"
|
||
settings:
|
||
pr_body_message: ""
|
||
gitea_address: https://git.ar21.de
|
||
gitea_token:
|
||
from_secret: FORGEJO_API
|
||
owner: ${CI_REPO_OWNER}
|
||
repo: core-deployments
|
||
branch: "${CI_PIPELINE_NUMBER}_dashboard_prod"
|
||
base_branch: main
|
||
pr_title: "DASHBOARD: update image tag to ${CI_PIPELINE_NUMBER}"
|
||
pr_body: |
|
||
### ℹ Dashboard image update
|
||
|
||
$${PLUGIN_PR_BODY_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: master
|
||
event: push
|
||
- name: create pull request (staging)
|
||
image: johnwalkerx/gitea-pull-request-create-plugin:latest
|
||
pull: true
|
||
commands:
|
||
- ls -l
|
||
- PLUGIN_PR_BODY_MESSAGE="$(cat message.txt)"
|
||
- /gitea-pull-request-create-plugin
|
||
environment:
|
||
PLUGIN_PR_BODY_MESSAGE: ""
|
||
PLUGIN_GITEA_ADDRESS: https://git.ar21.de
|
||
PLUGIN_GITEA_TOKEN:
|
||
from_secret: FORGEJO_API
|
||
PLUGIN_OWNER: ${CI_REPO_OWNER}
|
||
PLUGIN_REPO: core-deployments
|
||
PLUGIN_BRANCH: "${CI_PIPELINE_NUMBER}_dashboard_staging"
|
||
PLUGIN_BASE_BRANCH: main
|
||
PLUGIN_PR_TITLE: "DASHBOARD STAGING: update image tag to ${CI_PIPELINE_NUMBER}"
|
||
PLUGIN_PR_BODY: |
|
||
### ℹ Dashboard image update
|
||
|
||
$${PLUGIN_PR_BODY_MESSAGE}
|
||
|
||
### Configuration
|
||
|
||
📅 **Schedule**: Branch creation - At any time, Automerge - At any time.
|
||
|
||
🚦 **Automerge**: Enabled.
|
||
PLUGIN_SKIP_ON_MISSING_BRANCH: true
|
||
PLUGIN_CLOSE_PR_IF_EMPTY: true
|
||
PLUGIN_DELETE_BRANCH_IF_PR_EMPTY: true
|
||
PLUGIN_MERGE_WHEN_CHECKS_SUCCEED: true
|
||
PLUGIN_DELETE_BRANCH_AFTER_MERGE: true
|
||
when:
|
||
- branch:
|
||
exclude: master
|
||
event: push
|
||
depends_on:
|
||
- build
|
||
- test
|