Skip to content

Instantly share code, notes, and snippets.

@rhopp
Created October 29, 2019 11:42
Show Gist options
  • Save rhopp/78b001964edc877aeabab67d2e599e48 to your computer and use it in GitHub Desktop.
Save rhopp/78b001964edc877aeabab67d2e599e48 to your computer and use it in GitHub Desktop.
Gets latest images (highest version numbers) for some CRW images
#!/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