Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hack/build-and-push.sh: fix digest existence check
The current check queries Quay's custom API and expects that the tags in the response always exist. This is not the case for deleted/expired tags. See for example: curl 'https://quay.io/api/v1/repository/redhat-appstudio-tekton-catalog/pull-request-builds/tag/?specificTag=buildah-0.1-2f4e137b5ed645c6d5279c52eaf1d20b071729f1' { "tags": [ { "name": "buildah-0.1-2f4e137b5ed645c6d5279c52eaf1d20b071729f1", "reversion": false, "start_ts": 1709804197, "end_ts": 1711038680, "manifest_digest": "sha256:ebb2fe8fe89005229962167b9a31015a023a49a7169c52edfc34d18fcb1270dd", "is_manifest_list": false, "size": 5920, "last_modified": "Thu, 07 Mar 2024 09:36:37 -0000", "expiration": "Thu, 21 Mar 2024 16:31:20 -0000" } ], "page": 1, "has_additional": false } This tag has expired (and Quay reports it as such), but our script does not notice that. Fix the problem by using `skopeo inspect` instead of querying Quay's custom API. Signed-off-by: Adam Cmiel <[email protected]>
- Loading branch information