-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci(build): query scorecard image tags with registry v2 api #915
Conversation
Signed-off-by: Thuan Vo <thuan.votann@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks @tthvo!
Signed-off-by: Thuan Vo <thuan.votann@gmail.com> (cherry picked from commit 54ca044)
A bit late now, but I think $ skopeo inspect --no-tags docker://quay.io/cryostat/cryostat:3.0.0 >/dev/null 2>&1
$ echo $?
0
$ time skopeo inspect --no-tags docker://quay.io/cryostat/cryostat:3.0.0 >/dev/null 2>&1
real 0m1.074s
user 0m0.020s
sys 0m0.026s
$ skopeo inspect --no-tags docker://quay.io/cryostat/cryostat:4.0.0 >/dev/null 2>&1
$ echo $?
1
$ time skopeo inspect --no-tags docker://quay.io/cryostat/cryostat:4.0.0 >/dev/null 2>&1
real 0m0.853s
user 0m0.020s
sys 0m0.019s |
Oh nicee! Thanks @andrewazores, I didn't know |
If you leave off the $ skopeo inspect --no-tags docker://quay.io/cryostat/cryostat:4.0.0
FATA[0000] Error parsing image name "docker://quay.io/cryostat/cryostat:4.0.0": reading manifest 4.0.0 in quay.io/cryostat/cryostat: manifest unknown
$ skopeo inspect --no-tags --username notme --password incorrect docker://quay.io/cryostat/cryostat:4.0.0
FATA[0000] Error parsing image name "docker://quay.io/cryostat/cryostat:4.0.0": unable to retrieve auth token: invalid username/password: unauthorized: Invalid Username or Password But in both of these cases, |
Make sense thanks! I think we can note this for future refactoring of the ci yaml. |
Welcome to Cryostat! 👋
Before contributing, make sure you have:
main
branch[chore, ci, docs, feat, fix, test]
git commit -S -m "YOUR_COMMIT_MESSAGE"
Fixes: #914
Description of the change:
podman search
withcurl
to registry v2 api (quay.io
is compatible). References: https://docker-docs.uclv.cu/registry/spec/api/#existing-manifestsHEAD
request to/v2/<name>/manifests/<reference>
to check if an image exists for the specified tag.Motivation for the change:
See #914. I avoided fetching tags since the tag list can grow rather large with time. This method should basically query in constant time and also skip pulling the image layers.
How to manually test:
Check if a image for specified tag exists:
Sample run: https://github.com/tthvo/cryostat-operator/actions/runs/9884455121/job/27300862066