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

TEP-0040 implementation - specifying onError in a step #4106

Merged
merged 1 commit into from
Aug 11, 2021

Commits on Aug 10, 2021

  1. specifying onError for a step

    this commit implements tep-0049 - ignore a step error
    
    When a `step` in a `task` results in a failure, the rest of the steps in the
    `task` are skipped and the `taskRun` is declared a failure. If you would like
    to ignore such step errors and continue executing the rest of the steps in
    the task, you can specify `onError` for such a `step`.
    
    `onError` can be set to either `continue` or `fail` as part of the
    step definition. If `onError` is set to `continue`, the entrypoint sets the
    original failed exit code of the script in the container terminated state.
    A `step` with `onError` set to `continue` does not fail the `taskRun` and
    continues executing the rest of the steps in a task.
    
    This is an alpha feature. The `enable-api-fields` feature flag must be set to
    `"alpha"` to specify `onError` for a `step`.
    
    This commit includes following changes:
    
    * Changing entrypoint to include three new flags `onError`, `stepMetadataDir`, and
    `stepMetadataDirLink`.
    * Adding one new function as part of the runner CreateDirWithSymlink
    * Creating a volume `/tekton/steps/`
    * Supporting a path variable $(steps.step-<stepName>.exitCode.path) and
    $(steps.step-unnamed-<stepIndex>.exitCode.path)
    * API spec `onError` while defining a step
    * Writing exitCode at /tekton/steps/step-<step-name>/exitCode or
    /tekton/steps/step-unnamed-<step-index>/exitCode
    * Set the exitCode of a terminated state to a non-zero exit code
    * Doc, unit test, and examples for this feature
    pritidesai committed Aug 10, 2021
    Configuration menu
    Copy the full SHA
    fdeb0b1 View commit details
    Browse the repository at this point in the history