-
Type:
Bug
-
Resolution: Cannot Reproduce
-
Priority:
Low
-
None
-
Affects Version/s: 6.7.2
-
Component/s: None
-
None
-
Severity 3 - Minor
Issue Summary
Variable "version" cannot be used as Bamboo variables
Steps to Reproduce
- create a Bamboo variable (it can be either at Global or Plan level)
Variable name Variable value version 1234 - create a Default Stage >> Default Job
- add Script task with the following:
# print Plan/Global variable defined echo "version :: ${version}" # to be used by "Inject Bamboo variables" task echo "version=123" > properties.txt - add Inject Bamboo variables task
Path to properties file properties.txt Namespace inject Scope of the variables Result
- add Script task with the following:
- create a Second Stage >> Second Job
- add Script task with the following:
echo "bamboo.inject.version :: ${bamboo.inject.version}"
- add Script task with the following:
- run a build
Expected Results
Variable should display their values correctly.
Actual Results
In Default Job, Plan/Global variable does not display its content and Injected variable gets masked:
build 21-Mar-2019 12:11:54 version :: simple 21-Mar-2019 12:11:54 Finished task 'Script' with result: Success simple 21-Mar-2019 12:11:54 Starting task 'Inject Bamboo variables' of type 'com.atlassian.bamboo.plugins.bamboo-variable-inject-plugin:inject' simple 21-Mar-2019 12:11:54 Injected variable bamboo.inject.version=******** in RESULT scope simple 21-Mar-2019 12:11:54 Finished task 'Inject Bamboo variables' with result: Success
In Second Job, Injected variable seems to follow the same encryption as ("password", "sshKey", "secret", "passphrase" - com.atlassian.bamboo.util.PasswordMaskingUtils#PASSWORD_FIELD_NAMES) however variable's value does not eval
command 21-Mar-2019 11:59:42 Substituting variable: ${bamboo.inject.version} with ********
...
build 21-Mar-2019 11:59:42 bamboo.inject.version :: ********
simple 21-Mar-2019 11:59:42 Finished task 'Script' with result: Success
Notes
-
Workaround
Currently, there is no known workaround for this behavior. A workaround will be added here when available