If you need a Drone pipeline (.drone.yml) step in which you’re waiting for a Docker image tag to be available in Quay.io, here is my solution that is working fine. Basically a loop that is using curl and grep checking if tag string is present
--- kind: pipeline type: kubernetes name: deployment platform: os: linux arch: amd64 trigger: event: - push branch: - main steps: - name: Wait for image tag to be present in Quay.io image: alpine/curl:8.2.1 commands: - | while ! curl -s -L 'https://quay.io/api/v1/repository/repository_name_here/tag?specificTag=${DRONE_COMMIT_SHA}' | grep -q '${DRONE_COMMIT_SHA}' ; do echo "Tag not present, waiting 10 seconds" sleep 10 done
0 Komentarzy