ci(gitlab-ci): use curl instead of wget again; more output for wait

This commit is contained in:
Sarah Vaupel 2024-09-12 11:30:12 +02:00
parent 7600862444
commit 4513634a0c

View File

@ -86,8 +86,7 @@ setup:containers:frontend: &setup-container
- IMAGE_TAG=${IMAGE_TYPE}/${CI_COMMIT_REF_SLUG}:${IMAGE_VERSION}
- REGISTRY_DESTINATION=${CI_REGISTRY_IMAGE}/${IMAGE_TYPE}/${CI_COMMIT_REF_SLUG}:${IMAGE_VERSION}
script:
- yum install wget -y
- wget --header "PRIVATE-TOKEN:${REGISTRY_AUTH_TOKEN}" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/registry/repositories?tags=true" -o wget.log -O .gitlab-ci/.container-registry-contents.json
- curl --request GET --header "PRIVATE-TOKEN:${REGISTRY_AUTH_TOKEN}" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/registry/repositories?tags=true" > .gitlab-ci/.container-registry-contents.json
- IMAGE_EXISTS=`grep \""${REGISTRY_DESTINATION}"\" .gitlab-ci/.container-registry-contents.json || :`
- test "${CI_JOB_MANUAL}" = true && echo "Force rebuilding container."
- >
@ -114,6 +113,7 @@ setup:containers:frontend:wait: &setup-container-wait
echo "Waiting for container ${IMAGE_TAG} to appear in the container registry..."
sleep 5
done
- echo "Image ${IMAGE_TAG} has been found in the container registry. Proceeding with the pipeline."
rules:
- if: $CI_MERGE_REQUEST_ID
when: always