From ae5533d41bd884d354ce21522baa4b12d55e2156 Mon Sep 17 00:00:00 2001 From: Amir Zarrinkafsh Date: Sun, 1 Mar 2020 15:56:04 +1100 Subject: [PATCH] [Buildkite] Fix always reporting as failure for github artifact step (#673) --- .buildkite/steps/ghartifacts.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.buildkite/steps/ghartifacts.sh b/.buildkite/steps/ghartifacts.sh index dcfe3c210..f5634e841 100755 --- a/.buildkite/steps/ghartifacts.sh +++ b/.buildkite/steps/ghartifacts.sh @@ -13,4 +13,11 @@ done echo "--- :github: Deploy artifacts for release: ${BUILDKITE_TAG}" git fetch -hub release create "${BUILDKITE_TAG}" "${artifacts[@]}" -F <(echo -e "${BUILDKITE_TAG}\n\n## Changelog\n$(git log --oneline --pretty='* %h %s' $(git describe --abbrev=0 --tags $(git rev-list --tags --skip=1 --max-count=1))...$(git describe --abbrev=0 --tags))\n\n## Docker Container\n* \`docker pull authelia/authelia:${BUILDKITE_TAG//v}\`") || hub release delete "${BUILDKITE_TAG}" && false +hub release create "${BUILDKITE_TAG}" "${artifacts[@]}" -F <(echo -e "${BUILDKITE_TAG}\n\n## Changelog\n$(git log --oneline --pretty='* %h %s' $(git describe --abbrev=0 --tags $(git rev-list --tags --skip=1 --max-count=1))...$(git describe --abbrev=0 --tags))\n\n## Docker Container\n* \`docker pull authelia/authelia:${BUILDKITE_TAG//v}\`"); EXIT=$? + +if [[ $EXIT -eq 0 ]]; + then + exit + else + hub release delete "${BUILDKITE_TAG}" && false +fi