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 skipping single task only #3176

Closed
wants to merge 1 commit into from
Closed

Support skipping single task only #3176

wants to merge 1 commit into from

Commits on Mar 1, 2021

  1. Implement Skipping

    When  `WhenExpressions` evaluate to `False`, the `Task` and its branch
    (of dependent `Tasks`) will be skipped by default while the rest of the
    `Pipeline` will execute.
    
    A `Task` branch is made up of dependent `Tasks`, where there are two
    types of dependencies:
    - _Resource dependency_: based on resources needed from parent `Task`,
    which includes [`Results`](#using-results) and [`Resources`](#specifying-resources).
    - _Ordering dependency_: based on [`runAfter`](#using-the-runafter-parameter)
    which provides sequencing of `Tasks` when there may not be resource
    dependencies.
    
    In some use cases, when `WhenExpressions` evaluate to `False`,
    users need to skip the guarded `Task` only and allow ordering-dependent
    `Tasks` to execute.
    
    In `Tasks` guarded using `WhenExpressions` and that have ordering
    dependencies only, use `whenSkipped` to specify what happens when the
    guarded `Task` is skipped.
    
    The `whenSkipped` takes either `SkipBranch` or `RunBranch` policies.
    To allow execution of ordering-dependent `Tasks`, set `whenSkipped` to
    `RunBranch` in the guarded parent task.
    
    If neither `SkipBranch` nor `RunBranch` is specified, the default one
    is `SkipBranch`.
    
    However, setting `whenSkipped` in `Tasks` without `WhenExpressions` or
    `Tasks` with resource dependencies is invalid and will cause `Pipeline`
    validation errors.
    jerop committed Mar 1, 2021
    Configuration menu
    Copy the full SHA
    433219a View commit details
    Browse the repository at this point in the history