From d516fea15f8d4daa533ceeba6a1108b0bcfb753c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Doktor?= Date: Mon, 4 Aug 2025 16:06:49 +0200 Subject: [PATCH] ci.ocp: Allow to set CAA_IMAGE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit we might want to provide different CAA_IMAGE (repo) to reproduce issues. Signed-off-by: Lukáš Doktor --- ci/openshift-ci/peer-pods-azure.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ci/openshift-ci/peer-pods-azure.sh b/ci/openshift-ci/peer-pods-azure.sh index 08a48d7de1..d50080151e 100755 --- a/ci/openshift-ci/peer-pods-azure.sh +++ b/ci/openshift-ci/peer-pods-azure.sh @@ -116,12 +116,18 @@ az network vnet subnet update \ for NODE_NAME in $(kubectl get nodes -o jsonpath='{.items[*].metadata.name}'); do [[ "${NODE_NAME}" =~ 'worker' ]] && kubectl label node "${NODE_NAME}" node.kubernetes.io/worker=; done # CAA artifacts -CAA_IMAGE="quay.io/confidential-containers/cloud-api-adaptor" if [[ -z "${CAA_TAG}" ]]; then + if [[ -n "${CAA_IMAGE}" ]]; then + echo "CAA_IMAGE (${CAA_IMAGE}) is set but CAA_TAG isn't, which is not supported. Please specify both or none" + exit 1 + fi TAGS="$(curl https://quay.io/api/v1/repository/confidential-containers/cloud-api-adaptor/tag/?onlyActiveTags=true)" DIGEST=$(echo "${TAGS}" | jq -r '.tags[] | select(.name | contains("latest-amd64")) | .manifest_digest') CAA_TAG="$(echo "${TAGS}" | jq -r '.tags[] | select(.manifest_digest | contains("'"${DIGEST}"'")) | .name' | grep -v "latest")" fi +if [[ -z "${CAA_IMAGE}" ]]; then + CAA_IMAGE="quay.io/confidential-containers/cloud-api-adaptor" +fi # Get latest PP image if [[ -z "${PP_IMAGE_ID}" ]]; then @@ -137,6 +143,7 @@ echo "PP_REGION=\"${PP_REGION}\"" echo "AZURE_RESOURCE_GROUP=\"${AZURE_RESOURCE_GROUP}\"" echo "PP_RESOURCE_GROUP=\"${PP_RESOURCE_GROUP}\"" echo "PP_SUBNET_ID=\"${PP_SUBNET_ID}\"" +echo "CAA_IMAGE=\"${CAA_IMAGE}\"" echo "CAA_TAG=\"${CAA_TAG}\"" echo "PP_IMAGE_ID=\"${PP_IMAGE_ID}\""