Automated Release Candidates
This pipeline include allows a maven-based library to add a step to the pipeline to create new release candidate tags when the default branch changes.
I created a library, OSDU / Platform / System / Lib / Core / Test Project for RCs, to play around with this pipeline logic in a safe way. Feel free to open MRs, merge them, make direct commits, re-run old pipelines, etc. to test the logic.
Auto Commit Access Token
In order to use this, you must create an access token for the project named
write_repository access. The corresponding access token should be added as a project CI variable named
When does this make a new RC tag?
Roughly, any time a commit is pushed to the default branch of a project including this
release/maven-release-candidates.yml file. Generally, that means after every MR merges through. Any commit can be ignored by adding the text
[no rc] to the commit message.
To avoid creating out-of-order candidates, or recreating them when a pipeline is launched, the tag is only created if the pipeline commit is ahead of the latest existing release candidate tag.
What does it do to make the tag?
One commit is made from the branch HEAD, which changes the maven version to match the
X.Y.Z-rcN pattern, then it is tagged and pushed up. This commit should not be merged back to the default, nor should the tag be moved, deleted, or modified.