Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

Chceck if any previous step failed #3981

krumanox ·

Is there any way to use groovy to easily get to a variable something like "if any previous step failed" and bool as an answer?

I know I can getParent till I get to master and check if any child is failed, but that's not a pretty way to do this in my opinion.

  • replies 5
  • views 3671
  • stars 0
robinshen ADMIN ·

Below script will do the job:

groovy:
step.getParent()!=null && step.getParent().isAnyChildFailedExcept(step)
krumanox ·

No signature of method: com.pmease.quickbuild.plugin.basis.CommandBuildStep$$EnhancerByCGLIB$$2108c300.isAnyChildFailedExcept() is applicable for argument types: (com.pmease.quickbuild.plugin.basis.CommandBuildStep$$EnhancerByCGLIB$$2108c300)

robinshen ADMIN ·

It works at my side. What is your QB version?

krumanox ·

6.1.19, 2016-07-07

robinshen ADMIN ·

This method is added in QB7. For QB6 please use:

groovy:
step.getParent()!=null && step.getParent().isAnyChildFailed()