Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for allow_failures #108

Open
samrocketman opened this issue Oct 28, 2017 · 2 comments
Open

Support for allow_failures #108

samrocketman opened this issue Oct 28, 2017 · 2 comments

Comments

@samrocketman
Copy link
Owner

samrocketman commented Oct 28, 2017

Adding support for allow_failures seems relatively straight forward.

Sample YAML

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"

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.

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.

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.

@samrocketman samrocketman added this to the jervis-1.1 milestone Oct 28, 2017
@samrocketman
Copy link
Owner Author

Possible now that Jervis is migrating to pipelines. Formerly attempted in #7 which didn't yield much success for support of this feature.

@samrocketman samrocketman removed this from the jervis-1.1 milestone Dec 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant