edit pipelines to have a staging environment
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
2603836f7c
commit
edd4e900de
1 changed files with 58 additions and 18 deletions
64
.drone.yml
64
.drone.yml
|
@ -17,12 +17,30 @@ steps:
|
||||||
- master
|
- master
|
||||||
event:
|
event:
|
||||||
- push
|
- push
|
||||||
- name: bump tag in deployment-repo
|
- name: docker-staging
|
||||||
|
image: plugins/docker
|
||||||
|
settings:
|
||||||
|
username:
|
||||||
|
from_secret: DOCKER_USERNAME
|
||||||
|
password:
|
||||||
|
from_secret: DOCKER_PASSWORD
|
||||||
|
repo: yolokube/dashboard
|
||||||
|
tags:
|
||||||
|
- staging
|
||||||
|
- staging-${DRONE_BUILD_NUMBER}
|
||||||
|
when:
|
||||||
|
branch:
|
||||||
|
exclude:
|
||||||
|
- master
|
||||||
|
event:
|
||||||
|
exclude:
|
||||||
|
- push
|
||||||
|
- name: bump tag in deployment-repo (prod)
|
||||||
image: aaronriedel/kustomize-ci
|
image: aaronriedel/kustomize-ci
|
||||||
commands:
|
commands:
|
||||||
- cd /deployment-repo
|
- cd /deployment-repo
|
||||||
- git clone https://git.ar21.de/yolokube/core-deployments.git .
|
- git clone https://git.ar21.de/yolokube/core-deployments.git .
|
||||||
- cd /deployment-repo/dashboard
|
- cd /deployment-repo/dashboard/overlays/prod
|
||||||
- kustomize edit set image yolokube/dashboard=yolokube/dashboard:${DRONE_BUILD_NUMBER}
|
- kustomize edit set image yolokube/dashboard=yolokube/dashboard:${DRONE_BUILD_NUMBER}
|
||||||
- kustomize build -o /deployment-repo/dashboard/prod/dashboard.yaml
|
- kustomize build -o /deployment-repo/dashboard/prod/dashboard.yaml
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -33,7 +51,25 @@ steps:
|
||||||
- master
|
- master
|
||||||
event:
|
event:
|
||||||
- push
|
- push
|
||||||
- name: push new tag to deployment-repo
|
- name: bump tag in deployment-repo (staging)
|
||||||
|
image: aaronriedel/kustomize-ci
|
||||||
|
commands:
|
||||||
|
- cd /deployment-repo
|
||||||
|
- git clone https://git.ar21.de/yolokube/core-deployments.git .
|
||||||
|
- cd /deployment-repo/dashboard/overlays/staging
|
||||||
|
- kustomize edit set image yolokube/dashboard=yolokube/dashboard:staging-${DRONE_BUILD_NUMBER}
|
||||||
|
- kustomize build -o /deployment-repo/dashboard/staging/dashboard.yaml
|
||||||
|
volumes:
|
||||||
|
- name: deployment-repo
|
||||||
|
path: /deployment-repo
|
||||||
|
when:
|
||||||
|
branch:
|
||||||
|
exclude:
|
||||||
|
- master
|
||||||
|
event:
|
||||||
|
exclude:
|
||||||
|
- push
|
||||||
|
- name: push new tag to deployment-repo (prod)
|
||||||
image: appleboy/drone-git-push
|
image: appleboy/drone-git-push
|
||||||
settings:
|
settings:
|
||||||
branch: main
|
branch: main
|
||||||
|
@ -52,16 +88,20 @@ steps:
|
||||||
- master
|
- master
|
||||||
event:
|
event:
|
||||||
- push
|
- push
|
||||||
- name: docker-build
|
- name: push new tag to deployment-repo (staging)
|
||||||
image: plugins/docker
|
image: appleboy/drone-git-push
|
||||||
settings:
|
settings:
|
||||||
username:
|
branch: main
|
||||||
from_secret: DOCKER_USERNAME
|
remote: ssh://git@git.ar21.de:2222/yolokube/core-deployments.git
|
||||||
password:
|
path: /deployment-repo
|
||||||
from_secret: DOCKER_PASSWORD
|
force: false
|
||||||
repo: yolokube/dashboard
|
commit: true
|
||||||
tags: latest
|
commit_message: "DASHBOARD STAGING: update image tag to ${DRONE_BUILD_NUMBER} (done automagically via Drone pipeline)"
|
||||||
dry_run: true
|
ssh_key:
|
||||||
|
from_secret: GITEA_SSH_KEY
|
||||||
|
volumes:
|
||||||
|
- name: deployment-repo
|
||||||
|
path: /deployment-repo
|
||||||
when:
|
when:
|
||||||
branch:
|
branch:
|
||||||
exclude:
|
exclude:
|
||||||
|
|
Loading…
Reference in a new issue