Schedule customised build

I have a build plan in Bamboo to build a project. The build uses a script which require 3 parameters. These are configured as variables and I can set them by Run > Run Customised.

I need to set up a cron job to build several version of this project. Is there a way to provide these parameters somehow in a scheduled job?

Also, would it be possible to save popular configurations so they can be re-run easily without having to provide the parameters each time? Even if that would require some other scripting or calling a bamboo url directly. 

2 answers

1 accepted

This widget could not be displayed.

You can use the "Inject Bamboo variables" Task for this.

Let the cron job start a script that generates a file with the proper key=value pairs, and then starts the Bamboo build through REST.
The "Inject Bamboo variables" Task uses the generated file.
Note that the variables read from the file will be in their own namespace, e.g. ${bamboo_namespace_myvar} instead of just ${bamboo_myvar}. 

Alternatively you can override variables in the REST call itself, as described in the Resetting Variables via a REST API call and Dynamic Release versioning Knowledge Base article.


I think I can do what I want with the REST call. thanks!

This widget could not be displayed.

Create a new branch plan and set its repository path to your original one (so it will use the same sources). In a branch override variables you need.

Then you can add scheduled builds and so on.

At the moment I have 11 x 3 x 2 possible configurations. One branch for each is not really feasible. This is really what I wanted to avoid by using variables in the first place. But thanks for the suggestion.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted yesterday in Jira

Atlassian Research Workshop opportunity on Sep. 28th in Austin, TX

We're looking for participants for a workshop at Atlassian! We need Jira admins who have interesting custom workflows, issue views, or boards. Think you have a story to sha...

59 views 2 2
Join discussion

Atlassian User Groups

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!

Find my local user group

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

Groups near you