Skip to content

Commit 5a3f86f

Browse files
authored
Merge pull request #4971 from marosset/windows-cnm-image-fixes
Don't reuse windows cnm image if it has os.version set
2 parents 2bc9024 + 7f20a72 commit 5a3f86f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

scripts/ci-build-azure-ccm.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,12 @@ can_reuse_artifacts() {
9595
echo "false" && return
9696
fi
9797

98+
# Do not reuse the image if there is a Windows image built with older version of this script that did not
99+
# build the images as host-process-container images. Those images cannot be pulled on mis-matched Windows Server versions.
100+
if docker manifest inspect "${REGISTRY}/${CNM_IMAGE_NAME}:${IMAGE_TAG_CNM}" | grep -q "\"os.version\": \"10.0."; then
101+
echo "false" && return
102+
fi
103+
98104
for BINARY in azure-acr-credential-provider azure-acr-credential-provider.exe credential-provider-config.yaml credential-provider-config-win.yaml; do
99105
if [[ "$(az storage blob exists --container-name "${AZURE_BLOB_CONTAINER_NAME}" --name "${IMAGE_TAG_ACR_CREDENTIAL_PROVIDER}/${BINARY}" --query exists --output tsv)" == "false" ]]; then
100106
echo "false" && return

0 commit comments

Comments
 (0)