Skip to content

Expose per-branch pipeline ID ($CI_PIPELINE_BRANCH_IID)

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Issue gitlab-ce#3691 added $CI_PIPELINE_IID which exposes auto-incremented project-wide ID of pipeline.

It would be very useful if also each branch could have it's own auto-incremented pipeline number. Just like jenkins pipeline creates job for each branch with is own build number.

We use pipeline IID as version number of our application in master branch. We also have several feature/development/experimental/temporary branches with very often commits which creates many pipelines that increment this IID. Now pipeline's IIDs of master branch increments very fast and non-continuously so we end up with big gaps in version number.

It should be also possible to manually set/reset this variable for each branch to maintain continuous versioning in case of migrating from existing CI solution.

Edited by 🤖 GitLab Bot 🤖