From 204ef64f72e43d4ac4c2ce479d7f598fbc74aa94 Mon Sep 17 00:00:00 2001 From: Aaron Riedel Date: Sun, 24 Sep 2023 04:21:48 +0200 Subject: [PATCH] update drone --- .drone.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.drone.yml b/.drone.yml index 5dd8976..d075c5b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,7 +1,7 @@ kind: pipeline name: deploy steps: -- name: docker +- name: docker image: plugins/docker settings: username: @@ -11,13 +11,13 @@ steps: repo: aaronriedel/egress-test tags: - latest - - ${DRONE_COMMIT_SHA:0:8} + - ${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_COMMIT_SHA:0:8} + - 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 @@ -30,7 +30,7 @@ steps: path: /deployment-repo force: false commit: true - commit_message: "update image tag to ${DRONE_COMMIT_SHA:0:8}" + commit_message: "update image tag to ${DRONE_BUILD_NUMBER}" ssh_key: from_secret: GITEA_SSH_KEY volumes: @@ -38,4 +38,11 @@ steps: path: /deployment-repo volumes: - name: deployment-repo - temp: {} \ No newline at end of file + temp: {} +when: + branch: + include: + - main + event: + include: + - push \ No newline at end of file