I have a bamboo plan that does the following
- Deploys test sources to oracle
- Executes
FOO.BEFORE_ALL
proc - Executes database tests in various stages and jobs
- Executes
FOO.AFTER_ALL
proc in a final stage
This works fine for normal bamboo execution but doesn't work how I'd like in re-run scenarios.
Since FOO.AFTER_ALL
is executed in a final stage it executes regardless of pass/fail of previous stages/jobs.
Is there any way to force FOO.BEFORE_ALL
to be run in re-run scenarios?
The default bamboo behavior for re-runs is to start at the first failed job which is after my BEFOREALL job. Is there any way to force this job to run in re-run scenario?
Sample Bamboo plan java
private Plan createPlan() {
return new Plan(project(), "Plan Name", "PLANKEY")
.stages(
new Stage("Deploy").jobs(new MyDeployJob()),
new Stage("Setup").jobs(
new Job("Before All", "BEFOREALL")
.tasks(new SqlTask().inlineBody("FOO.BEFORE_ALL;"))
),
new Stage("Unit Tests").jobs(
new PlSqlTestJob("FOO.UNIT_TESTS_1"),
new PlSqlTestJob("FOO.UNIT_TESTS_2"),
new PlSqlTestJob("FOO.UNIT_TESTS_3")
),
new Stage("Integration Tests").jobs(
new PlSqlTestJob("FOO.INTEG_TESTS_1"),
new PlSqlTestJob("FOO.INTEG_TESTS_2"),
new PlSqlTestJob("FOO.INTEG_TESTS_3")
),
new Stage("Tear Down")
.finalStage(true)
.jobs(
new Job("After All", "AFTERALL")
.tasks(new SqlTask().inlineBody("FOO.AFTER_ALL;"))
)
)
);
}