What I want to accomplish:
-
As standard, we have two branches. staging and production. The idea is that, both pipeline manifests are same, so whenever a commit arrives to one of the branches, it runs and build an image. However, when we merge staging to production, we are already sure that staging image is safe and consistent. Therefore, we do not want to run another build, we just want to use the same staging image.
-
To do that, I have to change the tag from staging to production, which is still easy with Skopeo. However, when I do that, the metadata of the image will not changed. I have to change the metadata also, because we launched ImageUpdater from ArgoCD which scans the images based on their update date. Therefore, if I built an image in staging, and another production image is built after that, my merge will be useless since ImageUpdater can not update the deployment.
-
However, changing metadata is difficult. The main issue for me is that I can not use “docker pull-push” or similar rebuild events because ,as you will agree, this is the total contradiction to what I achieved. We are trying to reduce the runtime of builds, thus I have to find a way to solve this issue without any unnecesssary builds.
I’ve checked Podman, buildah and not satisfied. Is there a way to change metadata of the Artifact Registry Docker images without any need of builds?
ihatefuncprog is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.