File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 14
14
dir : ./test/images/
15
15
env :
16
16
- DOCKER_CLI_EXPERIMENTAL=enabled
17
- - TAG=$_GIT_TAG
18
17
- BASE_REF=$_PULL_BASE_REF
18
+ - GIT_COMMIT_ID=$_PULL_BASE_SHA
19
19
- WHAT=$_WHAT
20
20
- REGISTRY=$_REGISTRY
21
21
# The default cloudbuild has HOME=/builder/home and docker buildx is in /root/.docker/cli-plugins/docker-buildx
@@ -40,6 +40,8 @@ substitutions:
40
40
# _PULL_BASE_REF will contain the ref that was pushed to to trigger this build -
41
41
# a branch like 'master' or 'release-0.2', or a tag like 'v0.2'.
42
42
_PULL_BASE_REF : ' master'
43
+ # _PULL_BASE_SHA will contain the git SHA from which the image will be built from.
44
+ _PULL_BASE_SHA : ' 12345'
43
45
# _REGISTRY will contain the staging registry.
44
46
_REGISTRY : ' gcr.io/k8s-staging-e2e-test-images'
45
47
# _WHAT will contain the image name to be built and published to the staging registry.
Original file line number Diff line number Diff line change @@ -36,7 +36,9 @@ source "${KUBE_ROOT}/hack/lib/util.sh"
36
36
# Mapping of go ARCH to actual architectures shipped part of multiarch/qemu-user-static project
37
37
declare -A QEMUARCHS=( [" amd64" ]=" x86_64" [" arm" ]=" arm" [" arm64" ]=" aarch64" [" ppc64le" ]=" ppc64le" [" s390x" ]=" s390x" )
38
38
39
- GIT_COMMIT_ID=$( git log -1 --format=%h)
39
+ # NOTE(claudiub): In the test image build jobs, this script is not being run in a git repository,
40
+ # which would cause git log to fail. Instead, we can use the GIT_COMMIT_ID set in cloudbuild.yaml.
41
+ GIT_COMMIT_ID=$( git log -1 --format=%h || echo " ${GIT_COMMIT_ID} " )
40
42
windows_os_versions=(1809 2004 20H2)
41
43
declare -A WINDOWS_OS_VERSIONS_MAP
42
44
You can’t perform that action at this time.
0 commit comments