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

Conditions Beta: When Expressions #3135

Merged
merged 1 commit into from
Sep 8, 2020
Merged

Commits on Sep 8, 2020

  1. Implement When Expressions

    Adding `WhenExpressions` used to efficiently specify guarded execution
    of `Tasks`, without spinning up new pods. We use `WhenExpressions` to
    avoid adding an opinionated and complex expression language to the Tekton
    API to ensure Tekton can be supported by as many systems as possible.
    Further details about the design are in [Conditions Beta TEP](https://github.com/tektoncd/community/blob/master/teps/0007-conditions-beta.md).
    
    The components of `WhenExpressions` are `Input`, `Operator`
    and `Values`:
    - `Input` is the input for the `Guard` checking which can be static
    inputs or variables, such as `Parameters` or `Results`.
    - `Operator` represents an `Input`'s relationship to a set of `Values`.
    `Operators` we will use in `WhenExpressions` are `In` and `NotIn`.
    - `Values` is an array of string values. The `Values` array must be
    non-empty. It can contain static values or variables (`Parameters` or
    `Results`).
    
    The declared `WhenExpressions` are evaluated before the `Task` is run.
    If all the `WhenExpressions` evaluate to `True`, the `Task` is run.
    If any of the `WhenExpressions` evaluate to `False`, the `Task` is
    skipped. When a `Task` is skipped, it's included in the `Skipped Tasks`
    section of the `PipelineRunStatus`.
    jerop committed Sep 8, 2020
    Configuration menu
    Copy the full SHA
    252170b View commit details
    Browse the repository at this point in the history