add woodpecker pipeline
This commit is contained in:
parent
a7a0c55f7a
commit
7ecd1ba594
3 changed files with 103 additions and 0 deletions
32
.woodpecker/.build.yaml
Normal file
32
.woodpecker/.build.yaml
Normal file
|
@ -0,0 +1,32 @@
|
|||
steps:
|
||||
- name: docker
|
||||
image: woodpeckerci/plugin-docker-buildx
|
||||
settings:
|
||||
registry: git.ar21.de
|
||||
username:
|
||||
from_secret: REGISTRY_USER
|
||||
password:
|
||||
from_secret: REGISTRY_PASS
|
||||
repo: git.ar21.de/yolokube/dashboard
|
||||
tags:
|
||||
- latest
|
||||
- ${CI_PIPELINE_NUMBER}
|
||||
when:
|
||||
- branch: master
|
||||
event: push
|
||||
- name: docker-staging
|
||||
image: woodpeckerci/plugin-docker-buildx
|
||||
settings:
|
||||
registry: git.ar21.de
|
||||
username:
|
||||
from_secret: REGISTRY_USER
|
||||
password:
|
||||
from_secret: REGISTRY_PASS
|
||||
repo: git.ar21.de/yolokube/dashboard
|
||||
tags:
|
||||
- staging
|
||||
- staging-${CI_PIPELINE_NUMBER}
|
||||
when:
|
||||
- branch:
|
||||
exclude: master
|
||||
event: push
|
51
.woodpecker/.deploy.yaml
Normal file
51
.woodpecker/.deploy.yaml
Normal file
|
@ -0,0 +1,51 @@
|
|||
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
|
||||
- kustomize edit set image git.ar21.de/yolokube/dashboard=git.ar21.de/yolokube/dashboard:${CI_PIPELINE_NUMBER} deployment-repo/dashboard/overlays/prod
|
||||
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: main
|
||||
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: main
|
||||
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 stagint-${CI_PIPELINE_NUMBER} (done automagically via Woodpecker pipeline)"
|
||||
ssh_key:
|
||||
from_secret: FORGEJO_SSH_KEY
|
||||
when:
|
||||
- branch:
|
||||
exclude: master
|
||||
event: push
|
||||
depends_on:
|
||||
- build
|
||||
- test
|
20
.woodpecker/.test.yaml
Normal file
20
.woodpecker/.test.yaml
Normal file
|
@ -0,0 +1,20 @@
|
|||
steps:
|
||||
- name: test (prod)
|
||||
image: git.ar21.de/yolokube/dashboard:${CI_PIPELINE_NUMBER}
|
||||
commands:
|
||||
- nginx
|
||||
- curl -fsS -m 10 --retry 5 -o /dev/null http://localhost:8080
|
||||
when:
|
||||
- branch: master
|
||||
event: push
|
||||
- name: test (staging)
|
||||
image: git.ar21.de/yolokube/dashboard:staging-${CI_PIPELINE_NUMBER}
|
||||
commands:
|
||||
- nginx
|
||||
- curl -fsS -m 10 --retry 5 -o /dev/null http://localhost:8080
|
||||
when:
|
||||
- branch:
|
||||
exclude: master
|
||||
event: push
|
||||
depends_on:
|
||||
- build
|
Loading…
Reference in a new issue