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

Bamboo stop ongoing build when a new one is scheduled

Oleksii Kotukhov July 1, 2024

 

If there are multiple pushes to branch, Bamboo schedules separated builds for every push which creates redundancy on the queue. We only care about the last build with the latest changes for ours pull requests. Therefore, is there any way/configuration to cancel ongoing/scheduled builds if new build is scheduled?

2 answers

1 accepted

1 vote
Answer accepted
Marcin Gardias
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 2, 2024

The feature is coming in Bamboo 10.

Oleksii Kotukhov July 2, 2024

Is there any official reference I can use?
Thank you in advance

Marcin Gardias
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 2, 2024

The official release is still few weeks away, but we've just published a release candidate: https://community.developer.atlassian.com/t/bamboo-data-center-10-0-early-access-program-release/81426

Charlie Misonne
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 16, 2024

that's good to know!

@Marcin Gardias is this a feature we can find in JAC?

I tried searching but I don't see it https://jira.atlassian.com/issues/?jql=project%20%3D%20%22Bamboo%20Data%20Center%22%20%20and%20fixVersion%20%3D%2010.0.0%20

No problem if it is not in there :-)

Marcin Gardias
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 16, 2024

Not everything is in JAC, that site is driven by customers' requests, but sometimes we have our own ideas, you know ;-)

It is listed on Bamboo 10 Release Notes: https://confluence.atlassian.com/bambooreleases/bamboo-10-0-release-notes-1426032299.html#Bamboo10.0releasenotes-Newexecutionstrategyforconcurrentbuilds

Like Charlie Misonne likes this
2 votes
Charlie Misonne
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 1, 2024

Hi @Oleksii Kotukhov and welcome to the Atlassian Community!

I'm not aware of such a setting. Canceling a build each time a new one starts does not sound ideal. What if your build is quite long and every time it almost completes there is a new push. Theoretically you could end up with commits all day long without a single completed build.

Instead you could use the quiet period setting: Globally enabling the repository quiet period | Bamboo Data Center 9.6 | Atlassian Documentation

With this setting Bamboo will not execute a build immediately but it will wait for some time to allow consecutive pushes to be built in a single run.

 

Oleksii Kotukhov July 1, 2024

Hello @Charlie Misonne we have cases when the build can take a long time to be executed. This can lead to a long queue with scheduled builds for the same branch. So I'm looking for some feature to allow canceling such "duplicates" automatically. 

Charlie Misonne
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 1, 2024

Hi Oleski,

Well nothing like that exists so you'd have to create your own plugin.

Or creating external script listening checking the queue with this API endpoint: Get api latest queue and this one to stop a build if another one has been queued.

You can also rethink your build process: do you really need to build on every commit? Why not just every hour, or every 2 hours, or...
Or you could only build when a pull request is created.
Just some ideas :-)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events