I just wanted to show people exactly what I did to implement this within the Bamboo rest API. I used groovy rest and then created a cron job to kick off the script. I hope this helps someone in the future:
@Grab(group='org.codehaus.groovy.modules.http-builder', module='http-builder', version='0.7.1')
import static groovyx.net.http.ContentType.JSON
def client = new RESTClient ('https://myhost:8000/bamboo/')
client.defaultRequestHeaders.'Authorization' = 'Basic <base-64 encoded username:password>'
//I needed to use this because I was having certificate issues
def response = client.get (
path : "rest/api/latest/result/<project key>-<plan key>",
query : [
'os_authType' : "basic", 'buildstate': "Successful", 'max-results' : "1"
def buildNumber = response.getData().results.result.@number
def kickoff = client.put (
path : "rest/api/latest/queue/<project-key>-<plan-key>-" + buildNumber,
body : [
'os_authType' : "basic", 'stage' : "<stage-name>"
requestContentType : JSON
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...
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!
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