how can i change a plan variables in tasks

hello, how can i change a plan variables in tasks? or is plan variables == const? 

2 answers

This widget could not be displayed.

Hello,

This is what you cannot do:

# in a Script task
${bamboo.myGlobalVariable} = 'new value'
${bamboo.myPlanVariable} = 'new value'

This is what you can do:

  • Running a plan build manually, by running a customised build
  • running a cURL command to run a particular build overwriting a Global/Plan variable

    curl -u USERNAME:PASSWORD -X POST -d 'bamboo.yourVariable=newValue' 'http://localhost:8085/rest/api/latest/queue/PROJ-PLAN'

    The above will trigger a build 'PROJ-PLAN' and will overwrite the variable 'yourVariable' with 'newValue'.

  • Injecting Bamboo Variables

Kind regards,
Rafael P. Sperafico

Yes it is possible but IMO you should not do it. This can easily lead to chaos in your build configuration.

This widget could not be displayed.

Maybe you should look at https://marketplace.atlassian.com/plugins/com.atlassian.bamboo.plugins.bamboo-variable-inject-plugin/server/overview which handles this problem elegantly and you can limit the scope of visible change just for the scope of the job execution.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted 11 hours ago in Jira

Atlassian Research Workshop opportunity on Sep. 28th in Austin, TX

We're looking for participants for a workshop at Atlassian! We need Jira admins who have interesting custom workflows, issue views, or boards. Think you have a story to sha...

32 views 1 2
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you