Hello - I want to define an environment variable in bamboo so that certain tasks are completed during execution. How do I do this through the web interface? bamboo_run script is looking for the value of this variable and I want to set it to true instead of false so that it performs the task from within bamboo.
Hello @Karen West
Welcome to Atlassian Community!
In your Plan configuration, you can use a Script Task or any other task that would create a variables file, then add an Inject Variables task that would consume that file.
The Inject Bamboo variables task allows you to read the values for variables from a file, and create those variables in your build plan.
The file should use a 'key=value' format. Note that starting from Bamboo version 5.14, you must provide relative paths to the property file.
You can choose if those variables should have a local scope (in which case they cease to exist when the job finishes) or result scope (in which case they are persisted and passed into subsequent stages or related deployment releases).
Then, after the variables are set you can configure a Conditional Task to evaluate the new variable and then proceed with its execution in case it matches.
Thank you,
Eduardo Alvarenga
Atlassian Support APAC
--please don't forget to Accept the answer if the reply is helpful--
Thank you Eduardo. I will try that tomorrow and let you know if it solved my issue.
Cheers - Karen West
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.