Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,466,890
Community Members
 
Community Events
176
Community Groups

Disable re-build option

Edited

Is there a way to disable the option of re-building an existing build in a plan? The plan is currently set up to be manually triggered and I don't want users to re-build a plan even if it fails; they should start a new build.

Essentially I want to disable this feature: https://confluence.atlassian.com/bamboo/rerunning-a-failed-stage-289276867.html

1 answer

1 accepted

2 votes
Answer accepted

Simon says:

"

Bamboo plans run when they are triggerred. The types of available triggers are explained here: https://confluence.atlassian.com/bamboo/triggering-builds-289276897.html.

To avoid Bamboo running a plan you can remove all defined triggers and leave only the option to trigger the plan manually from the UI. Then let the users of Bamboo know that they should not run the plan manually.

Also make sure that the plan was not configured to be triggered by the successful build of another plan.

"

Simon out

Hi Simon,

This didn't answer my question. Possibly a mistake on my part for not giving more details. I've updated my answer to provide the scenario. 

Sam Out

Simon says:

" Thank you for the clarification. There is no way to completely disable the functionality.

What you can do is to hide that menu entry in the UI so the users will not see it anymore. However if a user knows the endpoint to call and the arguments she will be able to rerun failed builds. (In your unmodified instance go mouse over that menu entry and your browser will display in the status bar the request URL; that is what the user should know to be able to rerun failed builds.)

To hide the menu entry edit the file <Bamboo install directory>/atlassian-bamboo/lib/menus.ftl and comment out line 712.  The line would look like:

[#-- [@ui.displayLink id="restartBuild_${resultsSummary.planResultKey}" titleKey=buttonLabel href=restartPlanUrl showIcon=false inList=true mutative=true/] --]

Observe that to comment out the line you can use [#-- ... --] construct.

I hope this helps.

 

Note that if you reinstall Bamboo or upgrade it the menus.ftl file will be overriden so you will have to apply the comment again.

"

Simon out.

Like # people like this

Works like a charm! Thank you very much!!!

Just to help someone that has got to do the same thing in the future, I would like to add that line 730 of this same file declares another link, but for Successful builds. I have also commented it to disable Rerun at all (via UI, as Simon said).

[#-- [@ui.displayLinkForAUIDialog id="rerunBuild_${immutablePlan.key}"
titleKey="chain.restart.build.button.rerun"
inList=true
href=editRerunBuild/] --]

Hope this helps!

Like Steffen Opel _Utoolity_ likes this

I tried this and it removed the rebuild button for all jobs under the same stage, even if some jobs passed and some failed.  We still want to see the option "Rerun failed/incomplete jobs only" for the failed jobs. It seems that commenting out that line does not cover multiple jobs in one stage.  This would be a big impact for integration builds, since most integration system tests are running multiple jobs in one single stage. Is there a way to only remove the rebuild option for passed jobs but keep it for failed jobs within the same stage?

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events