[Buildkite] Enable automatic retries for failed github artifact step (#658)

* [Buildkite] Enable automatic retries for failed github artifact step

This is to handle failures which may occur when attempting to upload assets, per: https://buildkite.com/authelia/authelia/builds/465#537f931f-efc3-4f7b-9527-c927c1425a52.

* [Buildkite] Ensure GitHub artifact step is reported as a failure

When the initial command fails and we remove the release, we need to ensure that the exit status is reported as non-zero to trigger the automatic retry.
pull/659/head
Amir Zarrinkafsh 2020-02-29 08:58:44 +11:00 committed by GitHub
parent 7102b258a1
commit 150a2e177a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -15,6 +15,8 @@ steps:
- label: ":github: Deploy Artifacts"
command: ".buildkite/steps/ghartifacts.sh"
retry:
automatic: true
agents:
upload: "fast"
key: "artifacts"

View File

@ -13,4 +13,4 @@ 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 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