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

Bamboo Specs and masked variables

Mahesh Pawar January 22, 2019

 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
Daniel Santos
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 24, 2019

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.

Mahesh Pawar January 27, 2019

hey Thanks Daniel for confirmation.

Like Daniel Santos likes this
Daniel Santos
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 28, 2019

You are welcome!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events