CNG CI: some stable pipelines pushing tagged images
Summary
In some recent instances, we've found that X-Y-stable
branches may be pushing tagged images (e.g. v13.1.4), when they should only be tag/push according to the branch name itself.
The "problem" here is that we're building things twice, which includes the layers from which they are based.
The external impact is reduced, because:
- Dev overwrite Com @
sync-images
(Release) - The contents are identical, though layers / timestamps are not.
Steps to reproduce
- Commit gitlab-org/build/CNG@5e1c8fa6
- Pipeline https://gitlab.com/gitlab-org/build/CNG/-/pipelines/164790149
- Dev Pipeline on tag https://dev.gitlab.org/gitlab/charts/components/images/-/pipelines/161068
Current behavior
- Dev pipeline builds and pushed appropriately tagged images, @ Dev
- Com branch pipeline pushes tagged images based on commit, pushed to registry @ Com (
X-Y-stable(-ee)
, andvX.Y.Z(-ee)
) - Dev "releases" images (
sync-images
), overwriting tags @ Com
Expected behavior
- Dev pipeline builds and pushed appropriately tagged images, @ Dev
- Com branch pipeline pushes branch-name images, pushed to registry @ Com (only
X-Y-stable(-ee)
) - Dev "releases" images (
sync-images
), pushing layers & tags @ Com
Versions
Relevant logs
See pipelines for CE/EE Rails Jobs
layer inspection of "same" tag on dev/com
$ docker image inspect registry.gitlab.com/gitlab-org/build/cng/gitlab-rails-ce:v13.1.4 | jq '.[].RootFS.Layers' [ "sha256:333e2cb4c707229901f45d7f5e4e3caf5a983229da7fefb0605975ff3a1eaf6f", "sha256:766fe2e9acc0b0f9a0ea2a449f840073b774b36966139b6db045d9d35a0ab719", "sha256:38940d2d140124fc4e22fa55de05b83d69b60b139a3e46eeeb34dd6b794c216f", "sha256:f367614841959bb8c4862e5a18f6eb4db409e63eacd7479f90fd4ad68117a496", "sha256:0245fc62252286cdd203786ddaa5ec009b49dfff6047d682c77293e325b1a2f4", "sha256:8d74e0a9bc69f34e2a98ae2538e0cd2eb64fa824d08d07f2c7ceec1da8c09267", "sha256:1e0a834718c498809efd85dd18f3a2ad917b87da638fdbcae3a5b949545e909d", "sha256:efd4f41c2c571212361ae72f4c5586386b43c97f60f4cbcc5bad08017c9c76f5", "sha256:21f53b7ea67629aefdc54b5ee36158b76e650ccb6bb064bc940be69d35238523", "sha256:76ef60ba69cc48082ac8c33d72454d9e3a8b7db407505d0d40ea025ede246713", "sha256:e6621e1a1dc4eeb185b893f38e360a555a8acec86194a80cc7767e135d6dbfb6", "sha256:7ea1385450423063a8864d10e76ef1f2ae190edce09ffb1484a0e4d3a7a1f18f", "sha256:0eb098c9bd4bdafa89037f970436da89fe4412a34350a5cee03a7d3422d9425f", "sha256:362fabf01dc484875fb12d68ef4269e54c8e5cec41466b34001932588f53e02b", "sha256:45ebce9f4bfe97e8cc577cc6d33d9ee5724fb6200e4dc277e4a6cee5d28aaa7a", "sha256:07253fab75341dcd2aa694e4fdc6b18164e260f1687934c3dfc83623b2c31645", "sha256:fba5773a0478bd94394acaf765c00b657784b6a4f74644c7c71df789f0a63355" ]$ docker image inspect dev.gitlab.org:5005/gitlab/charts/components/images/gitlab-rails-ce:v13.1.4 | jq '.[].RootFS.Layers' [ "sha256:83b43189420d069cbdc1421b94c396c6b74d1ad8150933d411a223b145b981ab", "sha256:db2c6c2242c42eb67fb7059c70f007f51e743294201f83ad39e387fdcddf9075", "sha256:e63cf9c074b3062970029fe4456a30440cd17a289ab5f9a04709be0caa2021a1", "sha256:c96ad4a0c1dd951a7b2de148fa6f019ad14cd54e07415fba693984c86aa1b010", "sha256:0c47f206f2e4ed10d8d384935f3029a2101d4910cdfaf915477aea2f363d10a6", "sha256:2caa7d15f5bc7587d60ccbf5ab0d1836c380781d25e41dd10a7c57ec27258298", "sha256:22aec34645f0b2b5e9f92dd2b82ee0a47f63a67db767e8047e2c47dbc81030a7", "sha256:c47874565cb4a2280b52102fe9952adcbd27779e716d5cccadd4264603a332e9", "sha256:96c4cd533eaa7705f6e1070be5d81c57e0ba62f30db0c6cf91b0f68329cad1c4", "sha256:21446b01ba871df2a06d68fd3c94a7563922d6a51f01abf3f8b705f6e76fdb92", "sha256:6849598d7963e86d6e54f789ad4b31bcbbd3593bce56ec7d28793af0b050a0fc", "sha256:e1cfe0f3aa1ff7e94263fd2c7ad3121e8c05ec963e06f95be460385ef9c04613", "sha256:2e57c2c922a2c87898e181756b0d6f9181fc84140392afb2b1e3a0dfdb73e855", "sha256:aa1dd483d537c496790da0c35d6debe7ec9c72647130148c3031961a82c64212", "sha256:6520f551fc68d7e65f2a141103835a44d2f8c116c1e6da7a1bef475a4102688a", "sha256:a4d934de14939844f3c844d24da0e3e0be9bacd2a26389bec88fd2ad11355e48", "sha256:31eef88ffe89205a0af3834a39681c64f234b3a893f4f69cff6ec7005bd10169" ]