Created
October 29, 2019 11:42
-
-
Save rhopp/78b001964edc877aeabab67d2e599e48 to your computer and use it in GitHub Desktop.
Gets latest images (highest version numbers) for some CRW images
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
QUAY_ACCESS_TOKEN=<PUT YOUR TOKEN HERE> | |
for image in operator-rhel8 server-rhel8 devfileregistry-rhel8 pluginregistry-rhel8 pluginbrokerinit-rhel8 pluginbroker-rhel8 jwtproxy-rhel8 | |
do | |
echo ${image} | |
curl -X GET -s -H "Authorization: Bearer $QUAY_ACCESS_TOKEN" https://quay.io/api/v1/repository/crw/${image}/image/ | jq --raw-output ".images[].tags[] |select(. != null)" |sort -Vr | head -n 3 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment