2023-02-13 22:48:01 +01:00
|
|
|
kind: pipeline
|
2024-05-29 21:34:36 +02:00
|
|
|
type: kubernetes
|
2023-02-13 22:48:01 +01:00
|
|
|
name: deploy
|
|
|
|
steps:
|
2023-09-24 04:21:48 +02:00
|
|
|
- name: docker
|
2023-02-13 22:48:01 +01:00
|
|
|
image: plugins/docker
|
|
|
|
settings:
|
|
|
|
username:
|
|
|
|
from_secret: DOCKER_USERNAME
|
|
|
|
password:
|
|
|
|
from_secret: DOCKER_PASSWORD
|
|
|
|
repo: aaronriedel/egress-test
|
|
|
|
tags:
|
|
|
|
- latest
|
2023-09-24 04:21:48 +02:00
|
|
|
- ${DRONE_BUILD_NUMBER}
|
2024-06-20 23:37:39 +02:00
|
|
|
when:
|
|
|
|
branch:
|
|
|
|
- main
|
|
|
|
event:
|
|
|
|
- push
|
2024-06-20 23:35:05 +02:00
|
|
|
- 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
|
2024-06-20 23:37:39 +02:00
|
|
|
when:
|
|
|
|
branch:
|
|
|
|
exclude:
|
|
|
|
- main
|
|
|
|
event:
|
|
|
|
- push
|
2023-02-14 12:03:07 +01:00
|
|
|
- name: bump tag in deployment-repo
|
2024-05-24 09:57:18 +02:00
|
|
|
image: git.ar21.de/aaron/kustomize-ci
|
2023-02-14 00:39:45 +01:00
|
|
|
commands:
|
|
|
|
- cd /deployment-repo
|
|
|
|
- git clone https://git.ar21.de/aaron/egress-test-deployment.git .
|
2023-09-24 04:21:48 +02:00
|
|
|
- kustomize edit set image aaronriedel/egress-test=aaronriedel/egress-test:${DRONE_BUILD_NUMBER}
|
2023-02-14 00:39:45 +01:00
|
|
|
- kustomize build -o /deployment-repo/ressources/deployment.yaml
|
|
|
|
volumes:
|
|
|
|
- name: deployment-repo
|
|
|
|
path: /deployment-repo
|
2024-06-20 23:37:39 +02:00
|
|
|
when:
|
|
|
|
branch:
|
|
|
|
- main
|
|
|
|
event:
|
|
|
|
- push
|
2023-02-14 00:39:45 +01:00
|
|
|
- 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
|
2023-09-24 04:21:48 +02:00
|
|
|
commit_message: "update image tag to ${DRONE_BUILD_NUMBER}"
|
2023-02-14 00:39:45 +01:00
|
|
|
ssh_key:
|
|
|
|
from_secret: GITEA_SSH_KEY
|
2024-06-20 23:37:39 +02:00
|
|
|
when:
|
|
|
|
branch:
|
|
|
|
- main
|
|
|
|
event:
|
|
|
|
- push
|
2023-02-14 00:39:45 +01:00
|
|
|
volumes:
|
|
|
|
- name: deployment-repo
|
|
|
|
path: /deployment-repo
|
|
|
|
volumes:
|
|
|
|
- name: deployment-repo
|
2023-09-24 04:21:48 +02:00
|
|
|
temp: {}
|