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

Bamboo Specs and masked variables

 Hi,

i have already defined variable

DAILY_BUILD=True

RELEASE_BUILD_NUMBER=2

 

If DAILY_BUILD==true then; 

 ${bamboo.RELEASE_BUILD_NUMBER}=2_daily

But it is not allowed in bamboo. So i am using INJECT VARIABLE.

 

So now,

If DAILY_BUILD==true then; 

 RELEASE_BUILD_NUMBER=2_daily

echo "RELEASE_BUILD_NUMBER=${bamboo.RELEASE_BUILD_NUMBER}"_daily>dailyBuild.properties
cat dailyBuild.properties 

This will create properties file tat can be used in further stages.

 

but to access new value i have to

${bamboo.inject.RELEASE_BUILD_NUMBER} but want ${bamboo.RELEASE_BUILD_NUMBER}

 

How to do that??or is there any way

1 answer

1 accepted

0 votes
Answer accepted

Hi @Mahesh Pawar,

You cannot change the variable bamboo.RELEASE_BUILD_NUMBER from the build itself, you will need to inject a different one.

Injecting a variable will require a different namespace right after bamboo, e.g. bamboo.<NAME_SPACE>.<VARIABLE> .The namespace can be defined in the inject task. It doesn't need to be inject, but it needs to exist.

hey Thanks Daniel for confirmation.

Like Daniel Santos likes this

You are welcome!

Suggest an answer

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

Bamboo Data Center on Kubernetes

Hi, If you are running self-managed environments and looking to adopt modern infrastructure, Bamboo Data Center can now be deployed in a Kubernetes cluster. By leveraging Kubernetes, you can easily...

52 views 0 3
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