hello, how can i change a plan variables in tasks? or is plan variables == const?
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 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'.
—
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.
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.
It looks like you're new here. Sign in or register to get started.