From 7a0d217b67541ec74973b2f18ce320ff64d6f9ee Mon Sep 17 00:00:00 2001 From: Amir Zarrinkafsh Date: Mon, 9 Mar 2020 16:53:13 +1100 Subject: [PATCH] [Buildkite] Reorder git fetch in pipeline (#697) This will ensure that we always will have up-to-date refs for the repo post-checkout. --- .buildkite/hooks/post-checkout | 2 ++ .buildkite/steps/aurhelper.sh | 1 - .buildkite/steps/ghartifacts.sh | 1 - 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.buildkite/hooks/post-checkout b/.buildkite/hooks/post-checkout index fb44f1fc1..47151246d 100755 --- a/.buildkite/hooks/post-checkout +++ b/.buildkite/hooks/post-checkout @@ -2,6 +2,8 @@ set +u +git fetch -q + if [[ ! $BUILDKITE_COMMAND =~ "buildkite-agent pipeline upload" ]] || \ [[ $BUILDKITE_COMMAND == ".buildkite/steps/e2etests.sh | buildkite-agent pipeline upload" ]]; then echo "--- :buildkite: Setting up Build environment" diff --git a/.buildkite/steps/aurhelper.sh b/.buildkite/steps/aurhelper.sh index 5c9e98223..af961d04a 100755 --- a/.buildkite/steps/aurhelper.sh +++ b/.buildkite/steps/aurhelper.sh @@ -1,6 +1,5 @@ #! /bin/bash -git fetch && \ GITTAG=$(git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g') echo "--- :linux: Deploy AUR package: ${PACKAGE}" diff --git a/.buildkite/steps/ghartifacts.sh b/.buildkite/steps/ghartifacts.sh index f5634e841..6caade353 100755 --- a/.buildkite/steps/ghartifacts.sh +++ b/.buildkite/steps/ghartifacts.sh @@ -12,7 +12,6 @@ do 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}\`"); EXIT=$? if [[ $EXIT -eq 0 ]];