The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to schedule a stage within a plan in Bamboo?

Heather Wells
Contributor
December 22, 2011

I would like to schedule the Deploy stage in my plan to run nightly instead of running automatically after the previous step or running manually. Is this possible?

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
Przemek Bruski
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 22, 2011

You can't do it in Bamboo. What you can do is have an external script trigger continuation of that build using the following REST API. Have a look a REST tutorial.

0 votes
James McShane
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 29, 2015

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 groovyx.net.http.RESTClient

import groovy.xml.XmlUtil

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 

client.ignoreSSLIssues()

 

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[0].@number

 

def kickoff = client.put (

    path : "rest/api/latest/queue/<project-key>-<plan-key>-" + buildNumber,

    body : [

        'os_authType' : "basic", 'stage' : "<stage-name>"

    ],

    requestContentType : JSON

)

TAGS
AUG Leaders

Atlassian Community Events