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 can i change a bamboo variable in a script task

Hi,

One of my build task it getting a variable from my pom file, the version number.  This step place the value in variable bamboo_maven_version.

Later, i have another build task, a script one, where i want to change the bamboo_maven_version

In this script :

 

echo "Hello $bamboo_maven_version"

set "bamboo_maven_version=0.0.11"

echo "Hello $bamboo_maven_version"

 

The end result is :

build	16-Sep-2016 12:33:41	Hello 0.0.10-SNAPSHOT
build	16-Sep-2016 12:33:41	Hello 0.0.10-SNAPSHOT

 

Is it possible to change, from a script task, a bamboo variable ?

 

1 answer

4 votes

There is no way to change build variable. If you need to propagate some variable to other tasks in same job, you can export it into file, then use Inject variable task, then use this variable in next tasks - https://confluence.atlassian.com/display/BAMBOO/Configuring+a+variables+task

is there a plan to implement that feature?

I don't thinks so, looks like Inject variable task covers all flows

Like Simone Chiaretta likes this

Suggest an answer

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

Unable to add or edit Bitbucket Cloud repository in Bamboo

On 31 May, a GDPR-related change went live in the Bitbucket Cloud API that resulted in users not being able to create or edit Bitbucket Cloud Linked repositories in Bamboo. This API update removed t...

659 views 2 7
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