buildkite: set the same tag for all test changes

STABLE_VERSION depends on the most recent tag, so let's set the same tag
for all tests changes to better utilize the bazel cache.

With this change, the syscall tests will not be re-executed if no code changes
are introduced.

PiperOrigin-RevId: 607398034
This commit is contained in:
Andrei Vagin
2024-02-15 11:26:08 -08:00
committed by gVisor bot
parent 8dd254d9d7
commit b8b6afad8c
2 changed files with 16 additions and 0 deletions
+11
View File
@@ -53,6 +53,17 @@ export PARTITION=${BUILDKITE_PARALLEL_JOB:-0}
PARTITION=$((${PARTITION}+1)) # 1-indexed, but PARALLEL_JOB is 0-indexed.
export TOTAL_PARTITIONS=${BUILDKITE_PARALLEL_JOB_COUNT:-1}
if [[ "${BUILDKITE_BRANCH}" =~ ^test/ ]]; then
# STABLE_VERSION depends on the most recent tag, so let's set the same tag
# for all tests changes to better utilize the bazel cache. We have to be sure
# that binaries depends only on code changes but not metadata such as commit
# id.
# LINT.IfChange
git tag -f buildkite-test-branch
# LINT.ThenChange(../../tools/make_release.sh)
fi
# Set the system-wide Docker runtime name after the BuildKite branch name.
# Remove any slashes and other characters that are not supported in Docker
# runtime names. The runtime name must be a single valid path component.
+5
View File
@@ -72,6 +72,11 @@ else
# Note that a given commit can match any number of tags. We have to iterate
# through all possible tags and produce associated artifacts.
for tag in ${tags}; do
# LINT.IfChange
if [[ "$tag" == "buildkite-test-branch" ]]; then
continue
fi
# LINT.ThenChange(../.buildkite/hooks/pre-command)
name=$(echo "${tag}" | cut -d'-' -f2)
base=$(echo "${name}" | cut -d'.' -f1)
# Install the "specific" release. This is the latest release with the