How to create a build trigger with multiple build parameters

Mohana Krishna
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!
December 13, 2022

Hi Team,

I want to schedule a Bamboo build with various parameters. 

For example, if the build has variables like environment , user. 

I want to create multiple triggers as below.

1. run every Monday at 5 pm with environment=Dev, user=testuser

2. run every Monday at 6 pm with environment=PROD, user=produser

I want to know how to do this? Is it possible to achieve using cron?

Thanks

Mohan

1 answer

0 votes
Eduardo Alvarenga
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 13, 2022

Hello @Mohana Krishna

Welcome to Atlassian Community!

You can implement as many triggers as you want by using a Cron-based Scheduler, but that option will not allow you to set environment variables.

To have that set, you will need to trigger the builds via the REST API and then declare the variables you wish. To know more about how to trigger a Build please check the following documentation:

Make sure you provide the required variables by using the following format bamboo.variable.myVariable=valueForMyVariable as shown n the REST API example page.

You can then add the REST API scripts to cron and trigger them remotely.

Best regards,

Eduardo Alvarenga
Atlassian Support APAC

--please don't forget to Accept the answer if the reply is helpful-- 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events