Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to trigger bamboo build pipeline through command prompt

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 Jun 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.

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 Jun 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
Community showcase
Published in Bamboo

Bamboo Data Center - Early Access Program 2

We’re preparing for Bamboo 8.0, which will be our first Data Center release. To make sure our app vendors and customers with written in-house apps are prepared, we’re launching Bamboo 8.0 Early Acces...

109 views 0 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you