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

0 votes
Accepted answer

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
Community showcase
Asked Thursday in Jira Ops

I'm John Allspaw, Ask Me Anything about incident analysis and postmortems

I'm John Allspaw, co-founder of   Adaptive Capacity Labs, where we help teams use their incidents to learn and improve. We bring research-driven methods and approaches to drive effective inciden...

5,393 views 21 17
View question

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