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

how to make common steps with variables

송진택 September 25, 2019

 

Is it possible to configure multiple build plans that triggered to one deployment plan match using variables or parameters rather than triggering one build plan and one deployment plan?

I want to configure bamboo like below

 

AS-IS

3 build plans --> 3 deployment plan


a build , artifact name : aaa.war --> a deployment directory : /apps/a/aaa.war
b build , artifact name : bbb.war --> b deployment directory : /apps/b/bbb.war

c build , artifact name : ccc.war --> c deployment directory : /apps/c/ccc.war

TO-BE

3 build plans  --> only one deployment plan
using variabes in a build / var=a , artifact_name=aaa.war
using variabes in b build / var=b , artifact_name=bbb.war

using variabes in c build / var=c , artifact_name=ccc.war

deployment plan
${artifact_name} --> ${var} deployment directory : /apps/${var}/${artifact_name}

 

Thank you for your help.

1 answer

0 votes
Jimmy Seddon
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 26, 2019

Hi @송진택,

Welcome to the Community!

I'm not going to say this is the best option.  But, the way we accomplished this was to make a single build plan "D" that downloaded the artifacts from A, B & C and re-published them so that the deployment plan would have access to the artifacts from all three plans, but still had the one to one mapping from build plan D.

I'm not sure of any other way to accomplish this, but this is one option as a workaround.

I hope that helps!

-Jimmy

송진택 September 29, 2019

Thank you for your help!!

I have one more question.

 

Is there a way to trigger from build A,B,C to build D ??

using cli?? plugin??

Jimmy Seddon
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 30, 2019

It's actually Core functionality within the build plan itself.  On plans A, B and C configure the plans and go to the "Dependencies" tab.  There you can specify a "Child Plan", which actually means a plan you would like to automatically trigger once the current one passes successfully.BuildPlanDependencies.JPG

At that point any time plan A, B or C runs, it will automatically run plan D to get the latest artifacts from those plans.

I hope that helps!

-Jimmy

송진택 September 30, 2019

Thank you for your help . i really appreciate your help

I have another question 

How can I trigger variable values??

 

for example , I defined  artifact_name=test.war in plan A (or plan configuration --> variables tab)

I don't know how to get this value in plan D and deployment plan 

Thank you for your kind reply

Jimmy Seddon
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 1, 2019

I'm not sure that this is possible at the moment.  if you look at: 

https://community.atlassian.com/t5/Answers-Developer-Questions/Bamboo-parent-build-passing-variables-to-dependent-child/qaq-p/530264

It references an open feature request for the functionality you are looking for:

https://jira.atlassian.com/browse/BAM-3175

Sorry I can't be of more help on that one.

-Jimmy

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events