diff --git a/.drone.yml b/.drone.yml index 5e96b54..bd13d44 100644 --- a/.drone.yml +++ b/.drone.yml @@ -24,7 +24,7 @@ steps: @semantic-release/commit-analyzer \ @semantic-release/exec \ - | - export GIT_CREDENTIALS=$${GIT_USERNAME}:$${GIT_APIKEY} + GIT_CREDENTIALS=$${GIT_USERNAME}:$${GIT_APIKEY} - | npx semantic-release \ --package @semantic-release/exec \ @@ -47,13 +47,13 @@ steps: image: gcr.io/kaniko-project/executor:debug pull: always commands: + - | + IMAGE_TAG=$(cat .version) || 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 - - | - export IMAGE_TAG=$(cat .version) - | /kaniko/executor \ --dockerfile=Dockerfile \ @@ -72,11 +72,11 @@ steps: image: gcr.io/kaniko-project/executor:debug pull: always commands: + - | + IMAGE_TAG=$(cat .version) || exit 0 - | wget https://github.com/jqlang/jq/releases/download/jq-1.6/jq-linux64 -qO /bin/jq chmod +x /bin/jq - - | - export IMAGE_TAG=$(cat .version) - | /bin/jq '.auths["https://index.docker.io/v1/"].auth="'"$(echo -n $DOCKER_USERNAME':'$DOCKER_PASSWORD | base64)"'"' --null-input > /kaniko/.docker/config.json - | @@ -98,7 +98,7 @@ steps: pull: always commands: - | - export CHART_VERSION=$(cat .version) + CHART_VERSION=$(cat .version) || exit 0 sed -i 's/{{ chart_version }}/'$CHART_VERSION'/g' charts/json-server/Chart.yaml sed -i 's/tag: latest/tag: '$CHART_VERSION'/g' charts/json-server/values.yaml - | @@ -128,6 +128,8 @@ steps: image: bv11-cr01.bessems.eu/proxy/library/node:20-slim pull: always commands: + - | + IMAGE_TAG=$(cat .version) || exit 0 - | apt-get update - | @@ -142,7 +144,7 @@ steps: @semantic-release/git \ @semantic-release/release-notes-generator - | - export GIT_CREDENTIALS=$${GIT_USERNAME}:$${GIT_APIKEY} + GIT_CREDENTIALS=$${GIT_USERNAME}:$${GIT_APIKEY} - | npx semantic-release \ --branches ${DRONE_BRANCH} \