File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ main() {
8989 export CONFORMANCE_IMAGE=" ${REGISTRY} /conformance:${KUBE_IMAGE_TAG} "
9090 fi
9191
92- if [[ " $( can_reuse_artifacts) " == " false " ]] ; then
92+ if ! can_reuse_artifacts; then
9393 echo " Building Kubernetes"
9494
9595 # TODO(chewong): support multi-arch and Windows build
@@ -135,26 +135,24 @@ main() {
135135# can_reuse_artifacts returns true if there exists Kubernetes artifacts built from a PR that we can reuse
136136can_reuse_artifacts () {
137137 for IMAGE_NAME in " ${IMAGES[@]} " ; do
138- if ! docker pull " ${REGISTRY} /${IMAGE_NAME} :${KUBE_IMAGE_TAG} " ; then
139- echo " false " && return
138+ if ! docker manifest inspect " ${REGISTRY} /${IMAGE_NAME} :${KUBE_IMAGE_TAG} " > /dev/null ; then
139+ return 1
140140 fi
141141 done
142142
143143 for BINARY in " ${BINARIES[@]} " ; do
144144 if [[ " $( az storage blob exists --auth-mode login --container-name " ${AZURE_BLOB_CONTAINER_NAME} " --name " ${KUBE_GIT_VERSION} /bin/linux/amd64/${BINARY} " --query exists --output tsv) " == " false" ]]; then
145- echo " false " && return
145+ return 1
146146 fi
147147 done
148148
149149 if [[ " ${TEST_WINDOWS:- } " == " true" ]]; then
150150 for BINARY in " ${WINDOWS_BINARIES[@]} " ; do
151151 if [[ " $( az storage blob exists --auth-mode login --container-name " ${AZURE_BLOB_CONTAINER_NAME} " --name " ${KUBE_GIT_VERSION} /bin/windows/amd64/${BINARY} .exe" --query exists --output tsv) " == " false" ]]; then
152- echo " false " && return
152+ return 1
153153 fi
154154 done
155155 fi
156-
157- echo " true"
158156}
159157
160158capz::ci-build-kubernetes::cleanup () {
You can’t perform that action at this time.
0 commit comments