You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I have a TODAY variable defined in a properties file for my build:
It's injected successfully (as far as I can tell) but I try using it and I just get the literal of what I try, so far
What am I doing wrong?
Hi @Mark McWiggins,
Since you are using Inject Bamboo Variables task, there is a field called Namespace where its default is "inject". At the same time, there is a property called Scope of the variables in which you can select Local or Result.
If you want to make use of the variable in the JOB where Bamboo Variables task is being called, then you should select Local under Scope of the variables, otherwise Result.
On Windows, you should be able to call this variable as:
echo "bamboo.inject.TODAY: " %bamboo.inject.TODAY%
echo "bamboo_inject_TODAY: " %bamboo_inject_TODAY%
Please, notice inject in variable, which is the Namespace provided in Bamboo Variables task
If you are unsure on which variables are available to your JOB, please add Dump variables to log task just after the Bamboo Variables task and you should find the following entry in build log:
simple 05-Oct-2018 10:27:31 Starting task 'Dump variables to log' of type 'com.atlassian.bamboo.plugins.bamboo-variable-inject-plugin:dump'
simple 05-Oct-2018 10:27:31 ---- DUMPING VARIABLES TO LOG ---
simple 05-Oct-2018 10:27:31 key: [inject.TODAY] value:  type: CUSTOM
simple 05-Oct-2018 10:27:31 ---- END DUMPING VARIABLES TO LOG ---
simple 05-Oct-2018 10:27:31 Finished task 'Dump variables to log' with result: Success