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}\""