packit / .github

Workflow (Github Action) templates
MIT License
0 stars 3 forks source link

[build-and-push] tag remote prod as prod-1 before pushing new prod #2

Closed jpopelka closed 3 years ago

jpopelka commented 3 years ago

This should keep the previous image in the image repository in case we need to rollback, or redeploy (before importing the new image): https://github.com/packit/deployment/pull/208#issuecomment-842989232

csomh commented 3 years ago

:+1:

prod-1

jpopelka commented 3 years ago

So adding the tag via Quay.io (API) probably won't work, because the new tag has a different manifest digest, which is what the k8s/openshift image stream points to. And I don't quite understand why, because when I'm adding a tag (in tags tab, Options->Add New Tag), it says "Add Tag to Manifest sha256:abcxyz", but then the created tag has completely new/different manifest ???

On the other hand, tagging the image locally and pushing it does not change the manifest digest, so that can still be the way how to achieve this.

jpopelka commented 3 years ago

tagging the image locally and pushing it does not change the manifest digest, so that can still be the way how to achieve this.

I played with pulling/tagging/pushing images via podman/docker in the action, but wasn't able to make it work.

3 should fix the problem at a cost of having more tags in the repository.

But someone/something can purge them from time to time, if ever needed.