Mirror all available ICSP on script
The ICSP name is derived from the index image.
We shouldn't depend on specific name.
For example, on OpenShift CI the index image looks like the following:
'registry.build01.ci.openshift.org/ci-op-bqxvrsmm/pipeline'
and the ICSP name would be 'pipeline-0'
@@ -206,7 +206,7 @@ data:
$(registry_config "$(get_image_namespace ${ASSISTED_OPENSHIFT_INSTALL_RELEASE_IMAGE})" "${LOCAL_REGISTRY}/$(get_image_namespace_without_registry ${ASSISTED_OPENSHIFT_INSTALL_RELEASE_IMAGE})")
$(registry_config "$(get_image_namespace ${cli_image})" "${LOCAL_REGISTRY}/$(get_image_namespace_without_registry ${cli_image})")
- $(for row in $(kubectl get imagecontentsourcepolicy -o json | jq -rc '.items[] | select(.metadata.name | test("community-operator-")).spec.repositoryDigestMirrors[] | [.mirrors[0], .source]'); do
+ $(for row in $(kubectl get imagecontentsourcepolicy -o json | jq -rc '.items[] | .spec.repositoryDigestMirrors[] | [.mirrors[0], .source]'); do
row=$(echo ${row} | tr -d '[]"');
source=$(echo ${row} | cut -d',' -f2);
mirror=$(echo ${row} | cut -d',' -f1);
