Complete all stages before running queued plans

We have a few plans, all of which contain multiple stages which in turn contain a number of jobs and tasks. For example:

Plan 1

* Stage 1

* Stage 2

Plan 2

*Stage 1

* Stage 2

When Plan 1: Stage 1 is running, if another Plan is triggered, Plan 2: Stage 1 is queued, running before Plan 1: Stage 2.

So the run order becomes

Plan 1: Stage 1

Plan 2: Stage 1

Plan 1: Stage 2

Plan 2: Stage 2

We need currently running plan to finish before starting a new plan as (even though I know it's not recommended but our middleware requires it) there are artefacts shared between stages that may also be used/updated/modified by stages in another plan hence we cannot use artefacts between stages.

Without this, previous plans future stages can be corrupted before the next stages run, breaking out build process.

So ideally it needs to be

Plan 1: Stage 1

* Plan 2 triggered *

Plan 1: Stage 2

Plan 2: Stage 1

Plan 2: Stage 2

Is this possible without putting our entire plans steps into a single job with a lot of individual tasks because this would get rid of the stages that do have elements that can run in parallel?

Thanks Lee

Ps. Appologies for the formatting

2 answers

1 accepted

Doesn't look like this is possible - quite a simple addition though I'd imagine

You can configure the plan to run as a dependency. Or rather configure your dependent build to be blocked if the other build is running. Take a look on the dependencies tab. There are a bunch of options there.

Block build if parent builds are queued or in progress If parent builds are queued or building, the current build will be blocked.

You can designate a plan as a child plan without requiring it to be built (though the parent must build before the child will run.)

Thanks Gretchen that would be fine if I only had two plans on my build server (granted my description only had two plans as an example), but my build server had upwards of 20 plans, all of which I'd like to complete fully before kicking off any queued plans.

I've gotten around this by doing what I originally suggested myself (putting the entire plan contents in a single job) but it's not very managable or scalable.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,814 views 0 6
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you