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

Is is possible to queue bamboo build if not all manual stages were executed?

sta-szek April 6, 2018

Is is possible to queue bamboo build if not all manual stages were executed?

Let's say I have:

  1. Stage 1 (auto)
  2. Stage 2 (manual)

And then I want to allow next build only when Stage 2 finished (never mind if green or red).

1 answer

0 votes
robhit
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 6, 2018

Hi Piotr,

Thanks for your question!

Yes, you can do that. The steps would be:

  • Set the concurrent builds configuration in Bamboo to allow more than 1 build at a time. 
  • Trigger the build. This will wait for the user input to manually start the stage 2
  • At the same time, you can trigger one more build of the same plan.
  • As this plan has 2 stages (1 Auto and another Manual) the new build will execute the auto stage and will wait for the user input to start the manual stage.
  • So you will now have two builds triggered of the same plan in Bamboo. Both waiting for user input to trigger the manual stage. Now, if the stage fails or passes it doesn't matter. The builds are already triggered. 

Hope this will help.

Thanks,

Robhit

sta-szek April 8, 2018

Hi @robhit,

First of all thanks for quick answer!

I think you didn't get my question. I had in mind to limit concurrent build to only one, even if previous build is in manual waiting stage.

Explanation:

  • On Monday I trigger build no. 1.
  • After 5s, someone pushed changes to repo, this should trigger build no. 2.
  • Build no. 2 waits in the queue.
  • Build no. 1 goes through automatic stage 1.
  • Build no. 1 finished auto stage, it waits for user input in manual stage 2
  • Build no. 2 still waits in the queue, as build no. 1 didn't finished stage 2.
  • Build no. 1 finishes stage 2.
  • Build no. 2 can start now -- both auto stage 1 and manual stage 2 were finished by build no.1

Is that possible?

robhit
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 9, 2018

Hi @sta-szek,

No, it's not possible!

Once the repository polling is triggered to get the changes and if Bamboo finds a new change added to the repo then it will trigger a new build and that build will execute the automatic stage straight ahead and then both build will wait for the user input to trigger the manual stages.

You could remove the triggers from the build plan and make it manual completely to ensure that it gets triggered only when required.

Thanks,

Robhit

Jeyanthan I
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 9, 2018

Hi @sta-szek,

Is it possible for you to configure your first stage into a child plan and keep your second stage as your parent plan?

This way, you can set the option Block build if parent builds are queued or in progress in Dependency blocking startegy section, so that new builds are blocked until the existing one is executed successfully.

You may also Enable quiet period to queue up and aggregate multiple commits if required as explained in this blog post.

sta-szek April 9, 2018

Thank you for response.

Unfortunately the only satisfying answer is `No, it's not possible!` :(

Can you or I create a feature request? It should be really easy to implement and put into plan options.

sta-szek April 9, 2018

@Jeyanthan I or @robhitcan you provide me some more info about bamboo API, so I can develop some plugin myself?

I would like to know where is the best point to hook that, do you provide any interfaces for such a thing?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events