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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,556,741
Community Members
 
Community Events
184
Community Groups

Overwrite global variable in deployment

Hi

Is it possible to overwrite global variables for a build in deployment?

 

Let's say I have a global variable FOOBAR = 1 while build no 1 was done

If I add a variable FOOBAR = 2 in a deployment environment for that project and refer to it in deployment script:

echo ${bamboo_FOOBAR}

 

Will it be 1 or 2?

1 answer

1 accepted

0 votes
Answer accepted
Steffen Opel _Utoolity_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Nov 27, 2017 • edited

The answer is 2, i.e. it is indeed possible to override global Bamboo variables with plan variables for builds and deployments:

 

Plan variables are similar to global variables, but are defined for specific plans. Plan variables override global variables with the same name. You can also override a plan variable for a build if you trigger the build manually. See Defining plan variables.

While not explicated with a similar precise phrase, the same override mechanism also works for deployment variables:

Variables later in the following list override the previous ones in case of repeating names:

  • global variables
  • release variables as defined below
  • user variables defined at environment level
  • the autogenerated variables in the following table:

[...]

 

Hi @Steffen Opel _Utoolity_ , I am trying to override the global variable planRepository.revision using the strategy that you said above, but the value is not overriding when my plan is started by an API call. I tried to pass the variable in this call, but it is not working.

Have you already done this kind of override?

 

Thanks in Advance.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events