diff --git a/bamboo-specs/release.yaml b/bamboo-specs/release.yaml index cbb3fc9f5fc..0cc36389d72 100644 --- a/bamboo-specs/release.yaml +++ b/bamboo-specs/release.yaml @@ -151,6 +151,12 @@ set -e -f -u -x + # The version.sh script queries the current state of the git + # repository, so we must explicitly checkout the revision that + # triggered the build to prevent race conditions when the master + # branch changes while this build is running. + git checkout "${bamboo_repository_revision_number}" + # Install Qemu, create builder. docker version -f '{{ .Server.Experimental }}' docker buildx rm buildx-builder || : diff --git a/bamboo-specs/test.yaml b/bamboo-specs/test.yaml index f08688041a8..c61f584bc4d 100644 --- a/bamboo-specs/test.yaml +++ b/bamboo-specs/test.yaml @@ -171,6 +171,12 @@ set -e -f -u -x + # The version.sh script queries the current state of the git + # repository, so we must explicitly checkout the revision that + # triggered the build to prevent race conditions when the master + # branch changes while this build is running. + git checkout "${bamboo_repository_revision_number}" + version="$(env CHANNEL=${bamboo_channel} sh ./scripts/make/version.sh)" readonly version