Push the snapshot:<sha> image tag on tag pipelines for components

  • ⚠️🤖 This MR has been automatically generated and must be reviewed by the assignee

What does this MR do and why?

On tag pipelines, the component rule template only pushed :<tag> and :latest. Jobs referencing $CI_REGISTRY_IMAGE/snapshot:$CI_COMMIT_SHA (components testing themselves, for instance) could therefore only work by accident on tag pipelines, relying on an earlier branch pipeline having pushed that image — which breaks for release commits that never had a branch pipeline (semantic-release commits, for example).

The tag rule now also pushes snapshot:<commit sha>, so every pipeline of a component repository can pull the snapshot image of the commit it runs on. Release tags and :latest are unchanged, and existing consumers of the component see no difference until they bump.

This is needed by the helm component, whose self-test publish job always uses the snapshot image and must work on tag pipelines too (see the MR adding it: helm!2 (merged)).

Edited by Jonathan GAYVALLET

Merge request reports

Loading
Loading