woodpecker: create new PR for core-deployments instead push to main #315
2 changed files with 67 additions and 8 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
skip_clone: true
|
||||||
steps:
|
steps:
|
||||||
- name: bump tag in deployment-repo (prod)
|
- name: bump tag in deployment-repo (prod)
|
||||||
image: git.ar21.de/aaron/kustomize-ci
|
image: git.ar21.de/aaron/kustomize-ci
|
||||||
|
@ -6,8 +7,8 @@ steps:
|
||||||
- cd deployment-repo/dashboard/overlays/prod
|
- cd deployment-repo/dashboard/overlays/prod
|
||||||
- kustomize edit set image git.ar21.de/yolokube/dashboard=git.ar21.de/yolokube/dashboard:${CI_PIPELINE_NUMBER}
|
- kustomize edit set image git.ar21.de/yolokube/dashboard=git.ar21.de/yolokube/dashboard:${CI_PIPELINE_NUMBER}
|
||||||
when:
|
when:
|
||||||
- branch: master
|
- branch: master
|
||||||
event: push
|
event: push
|
||||||
- name: bump tag in deployment-repo (staging)
|
- name: bump tag in deployment-repo (staging)
|
||||||
image: git.ar21.de/aaron/kustomize-ci
|
image: git.ar21.de/aaron/kustomize-ci
|
||||||
commands:
|
commands:
|
||||||
|
@ -21,7 +22,7 @@ steps:
|
||||||
- name: push new tag to deployment-repo (prod)
|
- name: push new tag to deployment-repo (prod)
|
||||||
image: appleboy/drone-git-push
|
image: appleboy/drone-git-push
|
||||||
settings:
|
settings:
|
||||||
branch: main
|
branch: "${CI_PIPELINE_NUMBER}_dashboard_prod"
|
||||||
remote: ssh://git@git.ar21.de:2222/yolokube/core-deployments.git
|
remote: ssh://git@git.ar21.de:2222/yolokube/core-deployments.git
|
||||||
path: deployment-repo
|
path: deployment-repo
|
||||||
force: false
|
force: false
|
||||||
|
@ -30,12 +31,12 @@ steps:
|
||||||
ssh_key:
|
ssh_key:
|
||||||
from_secret: FORGEJO_SSH_KEY
|
from_secret: FORGEJO_SSH_KEY
|
||||||
when:
|
when:
|
||||||
- branch: master
|
- branch: master
|
||||||
event: push
|
event: push
|
||||||
- name: push new tag to deployment-repo (staging)
|
- name: push new tag to deployment-repo (staging)
|
||||||
image: appleboy/drone-git-push
|
image: appleboy/drone-git-push
|
||||||
settings:
|
settings:
|
||||||
branch: main
|
branch: "${CI_PIPELINE_NUMBER}_dashboard_staging"
|
||||||
remote: ssh://git@git.ar21.de:2222/yolokube/core-deployments.git
|
remote: ssh://git@git.ar21.de:2222/yolokube/core-deployments.git
|
||||||
path: deployment-repo
|
path: deployment-repo
|
||||||
force: false
|
force: false
|
||||||
|
@ -47,6 +48,63 @@ steps:
|
||||||
- branch:
|
- branch:
|
||||||
exclude: master
|
exclude: master
|
||||||
event: push
|
event: push
|
||||||
|
- name: create pull request (prod)
|
||||||
|
image: johnwalkerx/gitea-pull-request-create-plugin:latest
|
||||||
|
pull: true
|
||||||
|
settings:
|
||||||
|
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
|
||||||
|
|
||||||
|
### 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
|
||||||
|
settings:
|
||||||
|
gitea_address: https://git.ar21.de
|
||||||
|
gitea_token:
|
||||||
|
from_secret: FORGEJO_API
|
||||||
|
owner: ${CI_REPO_OWNER}
|
||||||
|
repo: core-deployments
|
||||||
|
branch: "${CI_PIPELINE_NUMBER}_dashboard_staging"
|
||||||
|
base_branch: main
|
||||||
|
pr_title: "DASHBOARD STAGING: update image tag to ${CI_PIPELINE_NUMBER}"
|
||||||
|
pr_body: |
|
||||||
|
### ℹ Dashboard image update
|
||||||
|
|
||||||
|
### 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: master
|
||||||
|
event: push
|
||||||
depends_on:
|
depends_on:
|
||||||
- build
|
- build
|
||||||
- test
|
- test
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
skip_clone: true
|
||||||
steps:
|
steps:
|
||||||
- name: test (prod)
|
- name: test (prod)
|
||||||
image: git.ar21.de/yolokube/dashboard:${CI_PIPELINE_NUMBER}
|
image: git.ar21.de/yolokube/dashboard:${CI_PIPELINE_NUMBER}
|
||||||
|
@ -17,4 +18,4 @@ steps:
|
||||||
exclude: master
|
exclude: master
|
||||||
event: push
|
event: push
|
||||||
depends_on:
|
depends_on:
|
||||||
- build
|
- build
|
||||||
|
|
Loading…
Reference in a new issue