/
How to run all builds for a project one at a time

How to run all builds for a project one at a time

Description

It is a best practice to run your builds at least every day to keep them current and have an early indication of any environment problems. Using Bamboo's build scheduling for daily runs can be problematic:

  1. The timing of the builds can change or need exceptions and it is a pain to adjust large numbers of plan schedules (even though easier using CLI actions (wink)).
  2. Schedule builds can delay or prevent normal development builds from running in a timely fashion or swamp the Bamboo agents with lower priority work. This is especially important for cross-site and international operations where there never seems to be a time that some developers need high priority builds run.

Our best practice for this is to remove daily builds from all plans and instead use the technique described here.

Steps

--action runFromPlanList --project XXX --excludeDisabled --continue --common "-a queueBuild --plan @plan@ --wait" 

Notes

  • Use the wait parameter to have only one build run at a time and report status back to this process.
  • Use continue to keep going, even if a build fails along the way.
  • Use excludeDisabled to not bother with disabled builds in the the list and reporting.
  • If necessary, use the regex parameter to subset the list of plans.

Related content