Open samrocketman opened 7 years ago
Adding support for allow_failures seems relatively straight forward.
allow_failures
language: groovy env: - GROOVY_VERSION="1.8.9" - GROOVY_VERSION="2.4.12" - GROOVY_VERSION="2.5.0-beta-1" - GROOVY_VERSION="2.6.0-alpha-1" matrix: allow_failures: - env: GROOVY_VERSION="2.6.0-alpha-1"
lifecycleGenerator should have a method to determine if an axis is allowed to fail. The try/catch shell step should be in a separate pipeline step.
try/catch
def t = [a: 'hello2', b: 'world'] def x = [a: 'hello', b: 'world', c: 'mars'] t == t.intersect(x)
If allow_failures key is t and x is a matrix axis. allow_failures is typically a List so for more completeness.
allow_failures key
t
x
List
true in allow_failures.collect { t -> t == t.intersect(x) }
Which will wrap the shell step in a try/catch and set the build as unstable if a failure is allowed rather than marking it as failed.
Possible now that Jervis is migrating to pipelines. Formerly attempted in #7 which didn't yield much success for support of this feature.
See also:
catchError
Adding support for
allow_failures
seems relatively straight forward.Sample YAML
Groovy implementation
lifecycleGenerator should have a method to determine if an axis is allowed to fail. The
try/catch
shell step should be in a separate pipeline step.If
allow_failures key
ist
andx
is a matrix axis.allow_failures
is typically aList
so for more completeness.Which will wrap the shell step in a
try/catch
and set the build as unstable if a failure is allowed rather than marking it as failed.