googleapis / storage-testbench

A testbench for Google Cloud Storage client libraries.
Apache License 2.0
9 stars 19 forks source link

Add automated docker tagging for "infrastructure-public-image-{hash}" #671

Closed andrewsg closed 3 weeks ago

andrewsg commented 3 weeks ago

This PR: https://github.com/googleapis/storage-testbench/pull/660 was intended to prefix published images with "infrastructure-public-image". However, it will be overwritten after subsequent deploys, resulting in older images becoming untagged. We need a way to automatically tag the images and include either a UUID, timestamp, or (preferred) hash so that they uniformly look like this:

$ gcloud container images list-tags gcr.io/cloud-devrel-public-resources/storage-testbench
DIGEST        TAGS                                                                                                  TIMESTAMP
71c00d870b99  infrastructure-public-image-71c00d870b99557f316e8844385411f981813326d5018cb2900cfb971ffae2b2,v0.42.0  2024-03-08T19:24:39
cd8e30563796  infrastructure-public-image-cd8e30563796ea67bb32a4dfc3a11340cb2a30c22846f4ecf0addf513249cc3d,v0.41.0  2024-02-16T18:39:26
7f3bc7eb9113  infrastructure-public-image-7f3bc7eb911317a21d86b516e5b39808d19f342d83d765b86e46a287cc6a658c,v0.40.0  2023-11-16T19:56:51

Until this is done, new images should be tagged with a command similar to gcloud container images add-tag gcr.io/cloud-devrel-public-resources/storage-testbench:v0.45.0 gcr.io/cloud-devrel-public-resources/storage-testbench:infrastructure-public-image-6c858425e58ea2a2add60822b1dd8767373bd2ab65a6d7481bb238aeb84fd226 (the hash of the target image can be discovered with gcloud container images list-tags --format=json gcr.io/cloud-devrel-public-resources/storage-testbench) manually after release.