build: Revert using export
and refactor to gracefully exit on an empty value
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Some checks reported errors
continuous-integration/drone/push Build encountered an error
This commit is contained in:
parent
f4457a1275
commit
cbd981cf19
12
.drone.yml
12
.drone.yml
@ -24,7 +24,7 @@ steps:
|
||||
@semantic-release/commit-analyzer \
|
||||
@semantic-release/exec \
|
||||
- |
|
||||
GIT_CREDENTIALS=$${GIT_USERNAME}:$${GIT_APIKEY}
|
||||
export GIT_CREDENTIALS=$${GIT_USERNAME}:$${GIT_APIKEY}
|
||||
- |
|
||||
npx semantic-release \
|
||||
--package @semantic-release/exec \
|
||||
@ -48,7 +48,7 @@ steps:
|
||||
pull: always
|
||||
commands:
|
||||
- |
|
||||
IMAGE_TAG=$(cat .version) || exit 0
|
||||
export IMAGE_TAG=$(cat .version) && [ -n "$IMAGE_TAG" ] || { exit 0 }
|
||||
- |
|
||||
wget https://github.com/jqlang/jq/releases/download/jq-1.6/jq-linux64 -qO /bin/jq
|
||||
chmod +x /bin/jq
|
||||
@ -73,7 +73,7 @@ steps:
|
||||
pull: always
|
||||
commands:
|
||||
- |
|
||||
IMAGE_TAG=$(cat .version) || exit 0
|
||||
export IMAGE_TAG=$(cat .version) && [ -n "$IMAGE_TAG" ] || { exit 0 }
|
||||
- |
|
||||
wget https://github.com/jqlang/jq/releases/download/jq-1.6/jq-linux64 -qO /bin/jq
|
||||
chmod +x /bin/jq
|
||||
@ -98,7 +98,7 @@ steps:
|
||||
pull: always
|
||||
commands:
|
||||
- |
|
||||
CHART_VERSION=$(cat .version) || exit 0
|
||||
export CHART_VERSION=$(cat .version) && [ -n "$CHART_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
|
||||
- |
|
||||
@ -129,7 +129,7 @@ steps:
|
||||
pull: always
|
||||
commands:
|
||||
- |
|
||||
IMAGE_TAG=$(cat .version) || exit 0
|
||||
export VALID_TAG=$(cat .version) && [ -n "$VALID_TAG" ] || { exit 0 }
|
||||
- |
|
||||
apt-get update
|
||||
- |
|
||||
@ -144,7 +144,7 @@ steps:
|
||||
@semantic-release/git \
|
||||
@semantic-release/release-notes-generator
|
||||
- |
|
||||
GIT_CREDENTIALS=$${GIT_USERNAME}:$${GIT_APIKEY}
|
||||
export GIT_CREDENTIALS=$${GIT_USERNAME}:$${GIT_APIKEY}
|
||||
- |
|
||||
npx semantic-release \
|
||||
--branches ${DRONE_BRANCH} \
|
||||
|
Loading…
Reference in New Issue
Block a user