How to trigger bamboo build pipeline through command prompt

Vetri June 21, 2021

i wanna to trigger one bamboo build pipeline from another bamboo build pipeline ,

is there any command to trigger using script or command CLI, bamboo cli?

pls respond asap. thanks

1 answer

0 votes
Charlie Misonne
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 21, 2021

3 options in mind:

1)

Instead of a command you could add the other plan as a child plan of your build. See Setting up plan build dependencies.

2)

If that's not flexible enough for you you could use Bamboo's REST API and call that from your pipeline. I believe you can use the /queue endpoint to add a build to the queue: https://docs.atlassian.com/atlassian-bamboo/REST/7.2.4/#d2e2959

3)

If you have the Bamboo CLI plugin or want to purchase it you can use the queueBuild action. Behind the scenes this will use the REST API.

Vetri June 21, 2021

Hi Charlie,

Thanks, bt i have one more issue, pls help

as per the 1st idea i have created a child plan in the pipeline.java file (bamboo spec) like below

GenericBuild genericBuild = new GenericBuild(PIPELINE_CONFIGURATION) {

@Override
protected Dependencies dependencies() {
return super.dependencies()
.configuration(new DependenciesConfiguration().blockingStrategy(
DependenciesConfiguration.DependencyBlockingStrategy.BLOCK_IF_PARENT_IN_PROGRESS))
.childPlans(new PlanIdentifier(PIPELINE_CONFIGURATION.projectKey(), "GWAC"));
}

 

we have two separate pipelines DEV and TEST, once dev deployment has done TEST build need to start automatically. its wrking as expected, bt now the problem is its running always when the parent build(DEV) pipeline deployment has done, it do not run alwys

bcoz we have 5environments configured in the DEV pipeline, so it needs to run only after the UAT env deployment not any other environment deployments,

so where i need to add the condition now, how to stop the build running alwys?

1-how to get the bamboo script variables into that pipeline,java file- bcoz environment variables are written in the release. sh files separately and added as a task.

2-how to get script variables into .java file (bamboo spec)?

3-otherwise tell me how to pass the bamboo build variables from one parent pipeline to integrated child pipeline.

please dont send the Atlassian bamboo variables guide page, i already searched , there answers are available related to bamboo UI changes not bamboo spec users.

please help its very urgent

Charlie Misonne
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 21, 2021

Hi Vetri,

I'm afraid it has been a while since I used Bamboo myself. I can't give you a clear answer immediately so I hope someone else can . I noticed you created another post for this new question here so that's fine: https://community.atlassian.com/t5/Bamboo-questions/How-to-pass-bamboo-build-variables-from-one-pipeline-to-child/qaq-p/1730312

On a side note: please try to use clear language on the Atlassian Community. I had to read your post several times to understand it because of the shortened words.
It will increase your chances in getting an answer.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events