Details
Description
Inject variable task as final task does not work when a build fails
Issue Summary
If a job has inject variables task ( injecting in build Result ) in the list of final tasks, those variables are not injected in case the build fails.
This is reproducible on Data Center: (yes)
Steps to Reproduce
- create a plan with two final tasks, one that generates the file containing the variables to be injected and the inject variable task.
- ensure that the plan will fail
- run the plan
You can use: inj.specs
Expected Results
The variable is injected in the build context and available on the build results metadata (tab on the build result)
Actual Results
The variable is not injected in the build context
The logs indicate that the variable should be injected:
21-Sep-2022 10:26:27 Finished task 'error' with result: Failed 21-Sep-2022 10:26:27 Starting task 'generate variable' of type 'com.atlassian.bamboo.plugins.scripttask:task.builder.script' 21-Sep-2022 10:26:27 Beginning to execute external process for build 'project one - artifact handling - Default Job #12 (PO-AH-JOB1-12)' ... running command line: /var/atlassian/application-data/bamboo/temp/PO-AH-JOB1-12-ScriptBuildTask-2878369868830523477.sh ... in: /var/atlassian/application-data/bamboo/local-working-dir/1146881/PO-AH-JOB1 21-Sep-2022 10:26:27 hello 21-Sep-2022 10:26:27 Finished task 'generate variable' with result: Success 21-Sep-2022 10:26:27 Starting task 'inject variable' of type 'com.atlassian.bamboo.plugins.bamboo-variable-inject-plugin:inject' 21-Sep-2022 10:26:27 Injected variable bamboo.inject.testingvariable=test in RESULT scope 21-Sep-2022 10:26:27 Finished task 'inject variable' with result: Success
Workaround
Currently there is no known workaround for this behavior. A workaround will be added here when available
Attachments
Issue Links
- mentioned in
-
Page Loading...