0

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")
}
  • Please add the code you have tried and how it failed (e.g. errors, stacktraces, logs, ...) so we can improve on it. – cfrick Jul 31 '20 at 08:27
  • if(condition){ throw new Exception("Build Failed as the TAF sanity or TAF consumer failed") }this exception i want to handle in more graceful way. So that the release will continue for other applications. – hrusikesh nandy Jul 31 '20 at 14:54
  • Please [edit](https://stackoverflow.com/posts/63188238/edit) the question – cfrick Jul 31 '20 at 16:45

1 Answers1

0

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.