test images: Use PULL_BASE_SHA for non-git image building
In the test image build jobs, the image-util.sh script is not being run in a git repository, which causes git log to fail. In this case, we can use the PULL_BASE_SHA set in cloudbuild.yaml instead.
This commit is contained in:
@@ -36,7 +36,9 @@ source "${KUBE_ROOT}/hack/lib/util.sh"
|
||||
# Mapping of go ARCH to actual architectures shipped part of multiarch/qemu-user-static project
|
||||
declare -A QEMUARCHS=( ["amd64"]="x86_64" ["arm"]="arm" ["arm64"]="aarch64" ["ppc64le"]="ppc64le" ["s390x"]="s390x" )
|
||||
|
||||
GIT_COMMIT_ID=$(git log -1 --format=%h)
|
||||
# NOTE(claudiub): In the test image build jobs, this script is not being run in a git repository,
|
||||
# which would cause git log to fail. Instead, we can use the GIT_COMMIT_ID set in cloudbuild.yaml.
|
||||
GIT_COMMIT_ID=$(git log -1 --format=%h || echo "${GIT_COMMIT_ID}")
|
||||
windows_os_versions=(1809 2004 20H2)
|
||||
declare -A WINDOWS_OS_VERSIONS_MAP
|
||||
|
||||
|
Reference in New Issue
Block a user