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

Complete all stages before running queued plans

Lee Winder November 14, 2013

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
Answer accepted
Lee Winder December 4, 2013

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

0 votes
Gretchen
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 17, 2013

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.)
Lee Winder November 23, 2013

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
TAGS
AUG Leaders

Atlassian Community Events