Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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 change build variables in a deployment project

Having some trouble working out how to get a deployment project to change the plan's variables depending on the type of build.

So if deploying to say Test or Prod I would want to change the build plan's variables accordingly as this will affect the artifact produced.

1 answer

0 votes

Hi @Sergio Walter Ruz

If I understood you correctly, you are trying to overwrite the value of an existing plan variable with a different value for each of your deployment environments, is that correct?

I just tested in Bamboo 6.10.2 and I was able to do this by declaring a variable with exact same name as the one available when the plan build was run. This allowed me to give it a different value.

To do this you need to navigate to the environment configuration and access the variables button.

Is that what you need or am I missing something?

Thanks Daniel

I will try that. It sounds like what I needed. I thought that the variables you declare for a deployment where only for after the plan was already built and for use only during deployment. 

Regards

Sergio

Wait, I think I didn't understand you correctly and we have some ambiguity to eliminate.

What I understood was:

Plan A has a variable A with value X
Deployment environment test wants to have the variable A with value Y
Deployment environment prod wants to have the variable with value Z

This is the normal flow.

From your last comment I got confused:

I thought that the variables you declare for a deployment where only for after the plan was already built and for use only during deployment. 

It looks like that you are triggering a plan from a deployment and want to change the plan variables. Can you confirm that?

Hi Daniel.

Yes that is correct.

I was hoping to only have one Build plan with it's own variables that get replaced depending on what type of build you are doing, say a test or production build.

So if I was to trigger a test deployment it would be using a test build and a production deployment it would use a production build. This means the artifacts produced by each build would be different. They would also be using a different Git branch. The test build would use the develop branch and the production build the master branch.

Hi @Sergio Walter Ruz

I think it was not clear since the beginning that you were trying to use different branches in the same deployment project.

A deployment plan is associated with only one plan and just one branch can be configured at each time. In other words, you can deploy from multiple branches, but you will need to manually change the deployment configuration every time you need it to build for a different branch.

My answer is still valid about the variables. You can rewrite them on each environment, but you can't configure each environment to build using a different plan branch (git branch).

We have the following feature request that seems to be aligned with your inquiry.

What you can do instead is creating a new deployment project. One would have the dev environment and the other a production environment. Each will be configured for its respective branch. Would it be a viable solution for you?

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo 101 Video

G’day Community! As we gear up to introduce Bamboo Data Center to the world, we wanted to make sure that we shared a bit more about Bamboo, the product. Our team has put together an overview video ...

254 views 4 6
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