Description
Summary:
While implementing conditional tasks in a script task by making user of Bamboo variables. The bamboo variable bamboo.shortPlanName if exists condition task is not getting executed and it is failing.
Environment:
- Bamboo 7.2.4
Steps to Reproduce:
1. Configure a script task in the plan.
2. Enter in the body of the script task as "pwd"
2. In the script task add the conditional task
3. Make bamboo.shortPlanName exists
4. Run the plan
Expected Results:
Build should pass with the below logs
simple 26-May-2022 10:16:49 Running pre-build action: VCS Version Collector simple 26-May-2022 10:16:49 All conditions for task 'new' were met. Conditions: Variable bamboo.shortPlanName exists command 26-May-2022 10:16:49 Substituting variable: ${bamboo.shortPlanNamee} with My New Plan
Actual Results:
Build fails with the below logs
simple 26-May-2022 10:15:59 Running pre-build action: VCS Version Collector simple 26-May-2022 10:15:59 Skipping task 'new' because of unfulfilled condition. Reason: Variable bamboo.shortPlanName exists simple 26-May-2022 10:15:59 Running post build plugin 'NCover Results Collector'
Root Cause
The conditional tasks plugin doesn't understand 'automatic' variables.
Workaround:
Download plugin v7.1.1 from https://packages.atlassian.com/maven-public/com/atlassian/bamboo/plugins/bamboo-conditional-tasks/7.1.1/ and install it using UPM