To be able to configure a task to run after 1 or more conditional tasks.
I'm trying to create the following pipeline:
Task(git clone repo) -> Task(run tests) -> Task(create git issue if tests failed) -> Task(Send out slack notification)
The create git issue task is conditional based on the results of the tests that were run previously.
I'd like to be able to run the last slack notification task after either the create git issue task completed or if it was not run due to condition (the slack message is dynamically created based on execution flow).
@prantaa we're designing solutions to address the issues in Conditions, including providing more options upon Condition failure -- please see the _Failure Handling_ sections of this design doc and share any feedback you may have
I'm trying to create the following pipeline:
Task(git clone repo) -> Task(run tests) -> Task(create git issue if tests failed) -> Task(Send out slack notification)
The create git issue task is conditional based on the results of the tests that were run previously.
I'd like to be able to run the last slack notification task after either the create git issue task completed or if it was not run due to condition (the slack message is dynamically created based on execution flow).
@prantaa when the second Task (run tests) fails, the whole pipeline will fail so the subsequent Tasks won't be executed.
Separately, you can explore using finally in pipelines to send out notifications. Final Tasks are guaranteed to be executed after other Tasks have completed regardless of the outcome (success/failure), which may be useful for notifications.
@jerop The second task doesn't necessarily need to fail. The second task runs the tests which if the tests fail then that could be indicated in a task result variable without failing the task and further passed onto later tasks which work conditionally based on the previous task result.
I don't think finally tasks support referencing task results from other tasks which is what we would need.
@jerop The second task doesn't necessarily need to fail. The second task runs the tests which if the tests fail then that could be indicated in a task result variable without failing the task and further passed onto later tasks which work conditionally based on the previous task result.
I don't think
finallytasks support referencing task results from other tasks which is what we would need.
@prantaa in that case, using WhenExpressions (that support referencing task results) and whenSkipped which are coming out soon should solve your use case -- will update you when they're available
Supporting task results in a finally taskis in progress, its been delayed by few weeks now, hoping to have changes in soon.