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

Document how to use failwhen to revert condition expected result #649

Open
olblak opened this issue Feb 2, 2023 · 0 comments
Open

Document how to use failwhen to revert condition expected result #649

olblak opened this issue Feb 2, 2023 · 0 comments

Comments

@olblak
Copy link
Member

olblak commented Feb 2, 2023

Summary

While answering this updatecli/updatecli#1137
I noticed that it's not obvious how to revert condition result

Basic example

conditions:
  jenkinsexist:
    name: Expect condition to succeed as Jenkins version exist
    kind: jenkins
    spec:
      version: '2.235'
      release: weekly
    failwhen: false
  jenkindonotexist:
    name: Expect condition to fail due to failwhen even if Jenkins version exist
    kind: jenkins
    spec:
      version: '2.235'
      release: weekly
    failwhen: true
  wrongjenkinsexist:
    name: Expect condition to fail as Jenkins version do not exist
    kind: jenkins
    spec:
      version: '2.999'
      release: weekly
    failwhen: false
  wrongjenkindonotexist:
    name: Expect condition to success due to failwhen even if Jenkins version do not exist
    kind: jenkins
    spec:
      version: '2.999'
      release: weekly
    failwhen: true

Motivation

Why are we doing this? What use cases does it support? What is the expected outcome?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

1 participant