kind: pipeline
name: deploy
steps:
- name: docker
image: plugins/docker
settings:
username:
from_secret: DOCKER_USERNAME
password:
from_secret: DOCKER_PASSWORD
repo: aaronriedel/egress-test
tags:
- latest
- ${DRONE_BUILD_NUMBER}
- name: bump tag in deployment-repo
image: aaronriedel/kustomize-ci
commands:
- cd /deployment-repo
- git clone https://git.ar21.de/aaron/egress-test-deployment.git .
- kustomize edit set image aaronriedel/egress-test=aaronriedel/egress-test:${DRONE_BUILD_NUMBER}
- kustomize build -o /deployment-repo/ressources/deployment.yaml
volumes:
- name: deployment-repo
path: /deployment-repo
- name: push new tag to deployment-repo
image: appleboy/drone-git-push
branch: main
remote: ssh://git@git.ar21.de:2222/aaron/egress-test-deployment.git
force: false
commit: true
commit_message: "update image tag to ${DRONE_BUILD_NUMBER}"
ssh_key:
from_secret: GITEA_SSH_KEY
temp: {}
when:
branch:
include:
- main
event:
- push