Hi, I have tried below code
version: 2
plan:
project-key: MYPROJECT
key: MYPLAN
name: My Plan
stages:
- Stage 1:
jobs:
- job1
- Stage 2:
final: true
jobs:
- job2
jobs:
- job1:
key: JOB1
tasks:
- script:
- echo "Running Job 1"
- exit 1 # Simulate failure
- job2:
key: JOB2
tasks:
- script:
- echo "Running Job 2"
- if [ "$bamboo_buildFailed" = "true" ]; then
echo "Job 1 failed, but continuing with Job 2";
else
echo "Job 1 succeeded, continuing with Job 2";
fiExpectation:-
Plan should be marked as successful. <br>AIM:-
Overall plan should not be marked as failed even if Stage 1 fails, and Stage 2 will always run.