From ed2406a68628c6731a68a6d5532c9981004852c1 Mon Sep 17 00:00:00 2001 From: rrasouli Date: Thu, 26 Feb 2026 09:31:26 +0200 Subject: [PATCH] Add Windows images to CI registry for WINC tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Enable Windows container tests in Prow CI by pre-mirroring Windows images to registry.ci.openshift.org and using ImageTagMirrorSet for transparent redirection. Changes: 1. Add Windows PowerShell images to supplemental CI images: - mcr.microsoft.com/powershell:lts-nanoserver-1809 (Server 2019) - mcr.microsoft.com/powershell:lts-nanoserver-ltsc2022 (Server 2022) 2. Create ImageTagMirrorSet in cucushift-winc-prepare: - Redirects mcr.microsoft.com/powershell → registry.ci.openshift.org/microsoft/powershell - Works in both connected (CI registry) and disconnected (ephemeral mirror) modes How it works: - CI infrastructure automatically mirrors images to registry.ci.openshift.org - ITMS transparently redirects image pulls during test execution - Tests continue using mcr.microsoft.com URLs in ConfigMap - No test code changes required Supported Windows versions: - Server 2019 (1809) - TODO: Remove after AMI upgrades - Server 2022 (ltsc2022) - Default Note: Server 2025 (ltsc2025) will be added when Microsoft publishes the image Co-Authored-By: Claude Sonnet 4.5 --- .../cucushift-winc-prepare-commands.sh | 66 ++++++++++++++++++- core-services/image-mirroring/_config.yaml | 20 ++++++ 2 files changed, 85 insertions(+), 1 deletion(-) diff --git a/ci-operator/step-registry/cucushift/winc/prepare/cucushift-winc-prepare-commands.sh b/ci-operator/step-registry/cucushift/winc/prepare/cucushift-winc-prepare-commands.sh index 6a0b72fce6cac..ce5948ca57870 100755 --- a/ci-operator/step-registry/cucushift/winc/prepare/cucushift-winc-prepare-commands.sh +++ b/ci-operator/step-registry/cucushift/winc/prepare/cucushift-winc-prepare-commands.sh @@ -13,6 +13,61 @@ function create_winc_test_configmap() oc get cm winc-test-config -oyaml -n winc-test } +function setup_image_mirroring() +{ + # Create ImageTagMirrorSet to redirect Windows container images to CI registry + # Images are pre-mirrored via core-services/image-mirroring/_config.yaml + # This works for both connected Prow (registry.ci.openshift.org) and disconnected (ephemeral mirror) + + echo "Setting up ImageTagMirrorSet for Windows container images..." + + # Determine mirror registry based on environment + if [ -f "${SHARED_DIR}/mirror_registry_url" ]; then + # Disconnected environment with ephemeral mirror registry + MIRROR_REGISTRY_HOST=$(head -n 1 "${SHARED_DIR}/mirror_registry_url") + echo "Disconnected mode: Using ephemeral mirror registry at ${MIRROR_REGISTRY_HOST}" + else + # Connected Prow CI - use pre-mirrored images from CI registry + MIRROR_REGISTRY_HOST="registry.ci.openshift.org" + echo "Connected mode: Using pre-mirrored images from ${MIRROR_REGISTRY_HOST}" + fi + + # Create ImageTagMirrorSet to redirect Windows images to mirror + # Includes PowerShell containers and CSI driver images for storage tests + # PowerShell: Server 2019 (1809), Server 2022 (ltsc2022) + # CSI: Azure File and vSphere drivers for OCP-66352 + # TODO: Remove Server 2019 support after AMI/image upgrades to Server 2022 + cat <