GitLab CI Artifact Promotion

I’m trying to promote binary artifacts in GitLab.

I want my pipeline to build and publish a snapshot every time there’s a commit. But then when I tag, I want to refer to the artifact that was already built and call that artifact by the name of the tag.

For Docker images, this works quite well because I can build and tag the Docker image with the git sha on commit. Then on git tag I can retag my docker image:sha as image:ref.

I would like a way to do this with artifacts: that are native to GitLab CI, but I do not see a way for this to work. I’d need to refer to build of a sha, not a GitLab CI build number, and I’d need it to be dynamic.

Am I barking up the wrong tree? Is there an elegant way to handle this case?

Thank you.

–Harley

Hmmm, I think you’d want something like “releases from the CI config”, planned for 12.6.

https://gitlab.com/gitlab-org/gitlab/issues/26013

Cheers,
Michael