How to handle multiple builds/releases for same commit? #1373
Replies: 1 comment 1 reply
-
Not sure how that would be possible.
The way the
This is not possible, the release version must be a number.
I would not recommend to use the run attempt, because then builds are not really reproducible. I think the build should be reproducible to solve this properly. We generally recommend to use the commit hash (or some other hash) as part of the docker image. If a build is triggered again, it should create the exact same image with the exact same name. It's fine if your process creates a new image, but it then should be the same image & tag name. Using digests is an interesting idea that's not fully supported by kuberpult when retrying. You could use the You could also use math to get out of this. E.g. increase the release number by 10 each time (#number of commits times 10), so you have 9 more "retry attempts". I would not recommend this though. I think the simplest solution is to tag each image, and use the tag instead of the digest. |
Beta Was this translation helpful? Give feedback.
-
Our build pipeline roughly works like this:
We now face an issue when a build is maunally retriggered. All steps from above run again but create a new image (image build is not reproducible). The new images is tagged with the commit sha but the manifest in kuberpult is not updated with the new digest (see #1372).
This means an image that is not used is tagged with the commit sha tag and the image that is referenced in the manifest is not tagged with the commit sha anymore. This is misleading and causes issues if we try to delete images that are seemingly not related to any release (e.g. local test builds).
Do you have a suggestion how to handle this? Ideas I had:
${{ github.run_attempt }}
to release version (is this possible? Can a release version be 12345-1?)${{ github.run_attempt }}
to image tag. We would still use the first image but at least the second one would have a tag where we can prevent it from being deleted.Beta Was this translation helpful? Give feedback.
All reactions