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

Conditionals: Support chaining conditions #1022

Closed
dibyom opened this issue Jun 26, 2019 · 5 comments
Closed

Conditionals: Support chaining conditions #1022

dibyom opened this issue Jun 26, 2019 · 5 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@dibyom
Copy link
Member

dibyom commented Jun 26, 2019

Expected Behavior

Users should be able to specify multiple conditions to gate a task and chain them using a type: "AND", "OR"
Part of implementation for #27

Additional Info

Strawperson of the potential API: https://gist.github.com/dibyom/557c9abc50f607e3e0cf5a8125adcb62 based on https://docs.google.com/a/google.com/document/d/1iTb0rDDlgQcPbiYIGJ-atkaML8aCyPCyhfucCPJmNLs/edit?disco=AAAADFnE658

ref: #1137

@dibyom dibyom mentioned this issue Jun 28, 2019
3 tasks
@vincent-pli
Copy link
Member

@dibyom
Do we plan to support nested conditions:

conditions:
  - type: AND
    checks:
      - type: OR
        checks: 
          - conditinRef: foo
          - conditinRef: foo_1
      - conditionRef: stringsEqual
        params: 
          - name: expected
            value: master
          - name: actual
            value: ${input.workspace.revision}

      - conditionRef: stringsEqual
        params:
          - name: expected
            value: foo
          - name: actual
value: ${input.workspace.somethingElse}

If yes, I think it's will be a big topic 😄

@dibyom
Copy link
Member Author

dibyom commented Jul 24, 2019

I was planning on only supporting basic AND or OR for top level conditions with no nesting.
Mainly because like you said, it will be a complex API and these scenarios can be also be implemented by writing your own Condition check container and referencing those in your pipelines.

@vincent-pli
Copy link
Member

Make these logic in container will make them hard to reuse.
need some research to find a solution 🤔

@vdemeester vdemeester added the kind/feature Categorizes issue or PR as related to a new feature. label Nov 7, 2019
@bobcatfish bobcatfish added this to Needs triage in Tekton Pipelines Feb 26, 2020
@tekton-robot
Copy link
Collaborator

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close.

/lifecycle rotten

Send feedback to tektoncd/plumbing.

@tekton-robot tekton-robot added the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Aug 12, 2020
@bobcatfish
Copy link
Collaborator

Conditions are being deprecated in https://github.com/tektoncd/community/blob/master/teps/0007-conditions-beta.md

( + @jerop )

Tekton Pipelines automation moved this from Needs triage to Closed Sep 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
No open projects
Tekton Pipelines
  
Closed
Development

No branches or pull requests

5 participants