This repository has been archived on 2024-10-10. You can view files and clone it, but cannot push or open issues or pull requests.
egress-test/.drone.yml
Aaron Riedel d9a7a91826
All checks were successful
continuous-integration/drone/push Build is passing
fix indentation
2024-06-20 23:37:39 +02:00

75 lines
1.6 KiB
YAML

kind: pipeline
type: kubernetes
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}
when:
branch:
- main
event:
- push
- name: docker-build
image: plugins/docker
settings:
username:
from_secret: DOCKER_USERNAME
password:
from_secret: DOCKER_PASSWORD
repo: aaronriedel/egress-test
tags:
- latest
- ${DRONE_BUILD_NUMBER}
dry_run: true
when:
branch:
exclude:
- main
event:
- push
- name: bump tag in deployment-repo
image: git.ar21.de/aaron/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
when:
branch:
- main
event:
- push
- name: push new tag to deployment-repo
image: appleboy/drone-git-push
settings:
branch: main
remote: ssh://git@git.ar21.de:2222/aaron/egress-test-deployment.git
path: /deployment-repo
force: false
commit: true
commit_message: "update image tag to ${DRONE_BUILD_NUMBER}"
ssh_key:
from_secret: GITEA_SSH_KEY
when:
branch:
- main
event:
- push
volumes:
- name: deployment-repo
path: /deployment-repo
volumes:
- name: deployment-repo
temp: {}