Skip to content

Commit 7522784

Browse files
committed
Adds new curl url for docker.io in pin-bundle script
Since we are facing issues with quay.rdoproject to push image from Prow CI, we plan to move jobs images to docker.io. To properly build the bundles we need to fix pin-bundle-images script to retrieve the proper tag.
1 parent 0019b4c commit 7522784

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

hack/pin-bundle-images.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ for MOD_PATH in $(go list -mod=readonly -m -json all | jq -r '. | select(.Path |
5050
# for local registry
5151
if [[ ${LOCAL_REGISTRY} -eq 1 ]]; then
5252
REPO_CURL_URL="${CURL_REGISTRY}/v2/${IMAGENAMESPACE}"
53+
elif [[ "${CURL_REGISTRY}" == "docker.io" ]]; then
54+
# replace docker.io by hub.docker.com to read tags
55+
REPO_CURL_URL="https://hub.docker.com/v2/repositories/${IMAGENAMESPACE}"
5356
else
5457
REPO_CURL_URL="https://${CURL_REGISTRY}/api/v1/repository/${IMAGENAMESPACE}"
5558
fi
@@ -61,6 +64,8 @@ for MOD_PATH in $(go list -mod=readonly -m -json all | jq -r '. | select(.Path |
6164

6265
if [[ ${LOCAL_REGISTRY} -eq 1 && ( "$GITHUB_USER" != "openstack-k8s-operators" || "$BASE" == "$IMAGEBASE" ) ]]; then
6366
SHA=$(curl -s ${REPO_CURL_URL}/$BASE-operator-bundle/tags/list | jq -r .tags[] | sort -u | grep $REF)
67+
elif [[ "${CURL_REGISTRY}" == "docker.io" ]]; then
68+
SHA=$(curl -s ${REPO_CURL_URL}/$BASE-operator-bundle/tags/?page_size=100 | jq -r .results[].name | sort -u | grep $REF)
6469
elif [[ "${CURL_REGISTRY}" != "quay.io" ]]; then
6570
# quay.rdoproject.io doesn't support filter_tag_name, so increase limit to 100
6671
SHA=$(curl -s ${REPO_CURL_URL}/$BASE-operator-bundle/tag/?onlyActiveTags=true?limit=100 | jq -r .tags[].name | sort -u | grep $REF)

0 commit comments

Comments
 (0)