diff --git a/scripts/ci-build-azure-ccm.sh b/scripts/ci-build-azure-ccm.sh index f15e81e1581..6b313119089 100755 --- a/scripts/ci-build-azure-ccm.sh +++ b/scripts/ci-build-azure-ccm.sh @@ -61,13 +61,8 @@ main() { if [[ "$(can_reuse_artifacts)" =~ "false" ]]; then echo "Build Linux Azure amd64 cloud controller manager" make -C "${AZURE_CLOUD_PROVIDER_ROOT}" build-ccm-image-amd64 push-ccm-image-amd64 - if [[ -n "${TEST_WINDOWS:-}" ]]; then - echo "Building Linux amd64 and Windows ${WINDOWS_IMAGE_VERSION} amd64 cloud node managers" + echo "Building Linux amd64 and Windows ${WINDOWS_IMAGE_VERSION} amd64 cloud node managers" make -C "${AZURE_CLOUD_PROVIDER_ROOT}" build-node-image-linux-amd64 push-node-image-linux-amd64 push-node-image-windows-"${WINDOWS_IMAGE_VERSION}"-amd64 manifest-node-manager-image-windows-"${WINDOWS_IMAGE_VERSION}"-amd64 - else - echo "Building Linux amd64 cloud node manager" - make -C "${AZURE_CLOUD_PROVIDER_ROOT}" build-node-image-linux-amd64 push-node-image-linux-push-name-amd64 - fi fi } @@ -79,13 +74,11 @@ can_reuse_artifacts() { fi done - if [[ -n "${TEST_WINDOWS:-}" ]]; then - FULL_VERSION=$(docker manifest inspect mcr.microsoft.com/windows/nanoserver:${WINDOWS_IMAGE_VERSION} | jq -r '.manifests[0].platform["os.version"]') - if ! docker manifest inspect "${REGISTRY}/${CNM_IMAGE_NAME}:${IMAGE_TAG}" | grep -q "\"os.version\": \"${FULL_VERSION}\""; then - echo "false" && return - fi + FULL_VERSION=$(docker manifest inspect mcr.microsoft.com/windows/nanoserver:${WINDOWS_IMAGE_VERSION} | jq -r '.manifests[0].platform["os.version"]') + if ! docker manifest inspect "${REGISTRY}/${CNM_IMAGE_NAME}:${IMAGE_TAG}" | grep -q "\"os.version\": \"${FULL_VERSION}\""; then + echo "false" && return fi - + echo "true" } diff --git a/scripts/ci-entrypoint.sh b/scripts/ci-entrypoint.sh index b672665cc92..b081dc39b59 100755 --- a/scripts/ci-entrypoint.sh +++ b/scripts/ci-entrypoint.sh @@ -93,15 +93,16 @@ setup() { export CCM_COUNT="${CCM_COUNT:-1}" export WORKER_MACHINE_COUNT="${WORKER_MACHINE_COUNT:-2}" export EXP_CLUSTER_RESOURCE_SET="true" - # this requires k8s 1.22+ + if [[ -n "${K8S_FEATURE_GATES:-}" ]]; then + export K8S_FEATURE_GATES="${K8S_FEATURE_GATES:-},WindowsHostProcessContainers=true" + else + export K8S_FEATURE_GATES="WindowsHostProcessContainers=true" + fi + + # TODO figure out a better way to account for expected Windows node count if [[ -n "${TEST_WINDOWS:-}" ]]; then export WINDOWS_WORKER_MACHINE_COUNT="${WINDOWS_WORKER_MACHINE_COUNT:-2}" - if [[ -n "${K8S_FEATURE_GATES:-}" ]]; then - export K8S_FEATURE_GATES="${K8S_FEATURE_GATES:-},WindowsHostProcessContainers=true" - else - export K8S_FEATURE_GATES="WindowsHostProcessContainers=true" - fi fi }