Reputation: 109
I'm working with jenkins file pipeline and i want to show the hg branch name in the current build name ( instead of the build number ). I tried with this code: currentBuild.displayName = "${BRANCH_NAME}" but it returned null. Is there other solution ?
Upvotes: 3
Views: 202
Reputation: 7385
There is another environment variable for mercurial:
${MERCURIAL_REVISION_BRANCH}
. This should not be null in case it is a branch being built. The feature got inserted by this pull request
Upvotes: 4