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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.