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() {
89
89
export CONFORMANCE_IMAGE=" ${REGISTRY} /conformance:${KUBE_IMAGE_TAG} "
90
90
fi
91
91
92
- if [[ " $( can_reuse_artifacts) " == " false " ]] ; then
92
+ if ! can_reuse_artifacts; then
93
93
echo " Building Kubernetes"
94
94
95
95
# TODO(chewong): support multi-arch and Windows build
@@ -135,26 +135,24 @@ main() {
135
135
# can_reuse_artifacts returns true if there exists Kubernetes artifacts built from a PR that we can reuse
136
136
can_reuse_artifacts () {
137
137
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
140
140
fi
141
141
done
142
142
143
143
for BINARY in " ${BINARIES[@]} " ; do
144
144
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
146
146
fi
147
147
done
148
148
149
149
if [[ " ${TEST_WINDOWS:- } " == " true" ]]; then
150
150
for BINARY in " ${WINDOWS_BINARIES[@]} " ; do
151
151
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
153
153
fi
154
154
done
155
155
fi
156
-
157
- echo " true"
158
156
}
159
157
160
158
capz::ci-build-kubernetes::cleanup () {
You can’t perform that action at this time.
0 commit comments