build: Add graceful exit if semantic release does not create a new version
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
377885f802
commit
f4457a1275
16
.drone.yml
16
.drone.yml
@ -24,7 +24,7 @@ steps:
|
|||||||
@semantic-release/commit-analyzer \
|
@semantic-release/commit-analyzer \
|
||||||
@semantic-release/exec \
|
@semantic-release/exec \
|
||||||
- |
|
- |
|
||||||
export GIT_CREDENTIALS=$${GIT_USERNAME}:$${GIT_APIKEY}
|
GIT_CREDENTIALS=$${GIT_USERNAME}:$${GIT_APIKEY}
|
||||||
- |
|
- |
|
||||||
npx semantic-release \
|
npx semantic-release \
|
||||||
--package @semantic-release/exec \
|
--package @semantic-release/exec \
|
||||||
@ -47,13 +47,13 @@ steps:
|
|||||||
image: gcr.io/kaniko-project/executor:debug
|
image: gcr.io/kaniko-project/executor:debug
|
||||||
pull: always
|
pull: always
|
||||||
commands:
|
commands:
|
||||||
|
- |
|
||||||
|
IMAGE_TAG=$(cat .version) || exit 0
|
||||||
- |
|
- |
|
||||||
wget https://github.com/jqlang/jq/releases/download/jq-1.6/jq-linux64 -qO /bin/jq
|
wget https://github.com/jqlang/jq/releases/download/jq-1.6/jq-linux64 -qO /bin/jq
|
||||||
chmod +x /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
|
/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 \
|
/kaniko/executor \
|
||||||
--dockerfile=Dockerfile \
|
--dockerfile=Dockerfile \
|
||||||
@ -72,11 +72,11 @@ steps:
|
|||||||
image: gcr.io/kaniko-project/executor:debug
|
image: gcr.io/kaniko-project/executor:debug
|
||||||
pull: always
|
pull: always
|
||||||
commands:
|
commands:
|
||||||
|
- |
|
||||||
|
IMAGE_TAG=$(cat .version) || exit 0
|
||||||
- |
|
- |
|
||||||
wget https://github.com/jqlang/jq/releases/download/jq-1.6/jq-linux64 -qO /bin/jq
|
wget https://github.com/jqlang/jq/releases/download/jq-1.6/jq-linux64 -qO /bin/jq
|
||||||
chmod +x /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
|
/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
|
pull: always
|
||||||
commands:
|
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/{{ chart_version }}/'$CHART_VERSION'/g' charts/json-server/Chart.yaml
|
||||||
sed -i 's/tag: latest/tag: '$CHART_VERSION'/g' charts/json-server/values.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
|
image: bv11-cr01.bessems.eu/proxy/library/node:20-slim
|
||||||
pull: always
|
pull: always
|
||||||
commands:
|
commands:
|
||||||
|
- |
|
||||||
|
IMAGE_TAG=$(cat .version) || exit 0
|
||||||
- |
|
- |
|
||||||
apt-get update
|
apt-get update
|
||||||
- |
|
- |
|
||||||
@ -142,7 +144,7 @@ steps:
|
|||||||
@semantic-release/git \
|
@semantic-release/git \
|
||||||
@semantic-release/release-notes-generator
|
@semantic-release/release-notes-generator
|
||||||
- |
|
- |
|
||||||
export GIT_CREDENTIALS=$${GIT_USERNAME}:$${GIT_APIKEY}
|
GIT_CREDENTIALS=$${GIT_USERNAME}:$${GIT_APIKEY}
|
||||||
- |
|
- |
|
||||||
npx semantic-release \
|
npx semantic-release \
|
||||||
--branches ${DRONE_BRANCH} \
|
--branches ${DRONE_BRANCH} \
|
||||||
|
Loading…
Reference in New Issue
Block a user