elemental-toolkit
elemental-toolkit copied to clipboard
push repo is using a tagged reference
due to how we calculate the tags, commits and references when pushing the repo, after tagging the repo if the main job runs before the release job, it will use the tagged reference instead of a commit. This is due to our calculation to get the proper tag/reference to push the repo to the remote.
This doesnt really affect anything as the tag and the commit need to match, so we are effectively pushing the same tag and artifacts as the release job, but it would be nice to fix so we dont have issues down the line, like the release job failing due to the tag existing or something like that, as that could lead to confusion.
Also not nice that a main job is pushing the repo with the tagged values.
Not sure how can it be fixed, without breaking the normal main pushes. This was done this way as to diff between a normal main merge and a tagged merge, as the Makefile doesnt necessarily know what is being pushed, it just expects a SNAPSHOT_ID to use when pushing the repo.
Probably the jobs could push the SNAPSHOT_IT themselves, and we let the Makefile not have that calculation in place, but we would rely more on github again, and more vars in the jobs.
Here is the calculation for the reference id: https://github.com/rancher/elemental-toolkit/blob/main/Makefile#L116