How to make a xl release fail gracefully

568 views Asked by At

I have xl release to accomplish for . It is having multiple phases and each phase is containing multiple tasks. There is a templet(orchestor) responsible for multiple application deployment. I want the scenario to achieve where even if one of the application release is failed the rest application will continue to get deployed.This whole process is getting done by a groovy script.

So basically i want a graceful way to handle the task failure in groovy for the xl realese. the code goes like this:

if(condition)
{ 
throw new Exception("Build Failed as the TAF sanity or TAF consumer failed")
}
1

There are 1 answers

0
Hes Siemelink On

You can introduce a boolean variable to the release, for example tafBuildSucceeded. Set the variable to false by default and true when the build succeeds.

After the tasks completes, you can use the release variable in preconditions of subsequent tasks.