From b0050312a8c3147c55c30097fe8842ed9ec2427e Mon Sep 17 00:00:00 2001 From: Danny Bessems Date: Tue, 31 Oct 2023 13:30:21 +0000 Subject: [PATCH] Add '.drone.yml' --- .drone.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 00000000..4966e7c1 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,33 @@ +kind: pipeline +type: kubernetes +name: Container & Helm chart + +trigger: + event: + exclude: + - tag + +steps: +- name: Container image (Harbor) + depends_on: + - Semantic Release (Dry-run) + image: gcr.io/kaniko-project/executor:debug + pull: always + commands: + - | + export VALID_TAG=$(cat .version 2> /dev/null) && [ -n "$VALID_TAG" ] || (echo 'No release tag - exiting'; exit 0) + - | + wget https://github.com/jqlang/jq/releases/download/jq-1.6/jq-linux64 -qO /bin/jq + chmod +x /bin/jq + - | + /bin/jq '.auths["https://bv11-cr01.bessems.eu/v2/"].auth="'"$(echo -n $HARBOR_USERNAME':'$HARBOR_PASSWORD | base64)"'"' --null-input > /kaniko/.docker/config.json + - | + /kaniko/executor \ + --dockerfile=Dockerfile \ + --context=dir://. \ + --destination=bv11-cr01.bessems.eu/library/pinniped-server:latest \ + environment: + HARBOR_USERNAME: + from_secret: harbor_username + HARBOR_PASSWORD: + from_secret: harbor_password