Skip to content

Automated Release Candidates

David Diederich requested to merge release-candidate-creation into master

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.

Test Project

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 auto-commit with read_repository and write_repository access. The corresponding access token should be added as a project CI variable named AUTO_COMMIT_TOKEN.

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.

Edited by David Diederich

Merge request reports

Loading