mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
gVisor BuildKite pre-command: Clean Docker RUNTIME to not contain slashes.
Slashes in Docker runtime names break Docker. PiperOrigin-RevId: 456642822
This commit is contained in:
committed by
gVisor bot
parent
dadb72341a
commit
164ca68bcd
@@ -31,7 +31,10 @@ PARTITION=$((${PARTITION}+1)) # 1-indexed, but PARALLEL_JOB is 0-indexed.
|
||||
export TOTAL_PARTITIONS=${BUILDKITE_PARALLEL_JOB_COUNT:-1}
|
||||
|
||||
# Set the system-wide Docker runtime name after the BuildKite branch name.
|
||||
export RUNTIME="${BUILDKITE_BRANCH}-${BUILDKITE_BUILD_ID}"
|
||||
# Remove any slashes and other characters that are not supported in Docker
|
||||
# runtime names. The runtime name must be a single valid path component.
|
||||
export RUNTIME="buildkite_runtime_${BUILDKITE_BRANCH}-${BUILDKITE_BUILD_ID}"
|
||||
export RUNTIME="$(echo "$RUNTIME" | sed -r 's~[^-_a-z0-9]+~_~g')"
|
||||
|
||||
# Ensure Docker has experimental enabled.
|
||||
if [[ -n "${STAGED_BINARIES:-}" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user