Hello,
I would like to prevent custom revision on Bamboo. I know that it's not really possible in the interface. So I was thinking about a solution like failing the build whenever it's a custom revision. But when I try to use bamboo.planRepository.<position>.branchName variable even though it's a custom revision with a different branch, I still see the default branch in the build plan from the repository setting.
So is there a way to prevent custom revisions? Or at least fail the build if it's a custom revision with a message?
Thanks in advance,
Best,
Elifcan
Hello @Elifcan Çakmak
When running a Build with customized revisions via Run >> Run Customized >> Revision, Bamboo adds a "customRevision" variable to the build, or "${bamboo_customRevision}" when used by a shell script.
You can add a Script task as the first task of a Plan and check if the variable exists and cancel the build accordingly.
You can also combine it with checking the "planRepository.branch" variable to look for non-Default Plan branches.
Kind regards,
Eduardo Alvarenga
Atlassian Support APAC
--please don't forget to Accept the answer if the reply is helpful--
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.