github tektoncd/pipeline v0.27.0
Tekton Pipeline release v0.27.0 "Tonkinese Talos"

latest releases: v0.59.0, v0.50.6, v0.47.9...
2 years ago

🎉 Step onError Handling, Skipping Strategies and Custom Task Timeouts! 🎉

-Docs @ v0.27.0
-Examples @ v0.27.0

Installation one-liner

kubectl apply -f https://storage.googleapis.com/tekton-releases/pipeline/previous/v0.27.0/release.yaml

Upgrade Notices

⚠️ Kubernetes 1.19 is the new minimum required version. ⚠️

Changes

Features

  • ✨ TEP-0040 Specifying onError behaviour for Steps (#4106)

This is a brand new Alpha feature: Use onError: continue for a Step if you would like to ignore any errors and continue executing the rest of the Steps in a Task. When onError is set to continue, the Step's exit code is recorded and made available to subsequent Steps via two new variables in Tasks. A Step with onError set to continue does not fail a TaskRun and continues executing the rest of the steps in a task.

The default value for the onError field is fail, which matches existing Step behavior: an error results in the Task stopping and entering a failed state. 🚨 NOTE The name of the default value may change in a subsequent release from fail to stopAndFail to make this behaviour more explicit. Follow tektoncd/community#497 to keep informed about this potential change. A Backwards Incompatibility note will be included with the release if this change moves ahead. 🚨

  • ✨ TEP-0059 Skipping Strategies (#4085)

⚠️ This is a change to existing behaviour. It is behind its own feature flag to give time to adapt. ⚠️

When Expressions are changing scope: in a future release (and today, if you enable the flag) a when stanza will guard only the Task it is attached to instead of the Task and all of its dependents. To guard both a Task and its dependents the when stanza will need to be attached to each dependent Task as well. This change will roll out for all users of v1beta1 resources in 9 months, per our beta deprecation policy, and will be the default behaviour for When Expressions in any new apiVersions of Tekton's resources going forward.

New Feature Flag: scope-when-expressions-to-task
Default Value: "false"

To guard a Task only and unblock execution of its dependent Tasks, set the scope-when-expressions-to-task feature flag to "true".

Action Required: when expressions guarding a Task and its dependent Tasks is deprecated and will be removed - migrate by setting scope-when-expressions-to-task feature flag to "true" and updating your Pipelines to cascade when expressions to subsequent Tasks as needed.

For the rationale and use-cases that inspired this change please see TEP-0059.

  • ✨ Implement timeout for custom tasks. (#3976)

⚠️ Existing custom task controllers will need to add support for this new field - by default it will be ignored. ⚠️

Custom Tasks can now include a timeout as part of their spec. Custom Task controllers can add support for responding to this field with new behaviour such as cleanup processes. Here's an example usage in a Run leveraging the TaskLoop Custom Task controller:

apiVersion: tekton.dev/v1alpha1
kind: Run
metadata:
  generateName: simpletasklooprun
spec:
  timeout: 10s # set timeout here.
  params:
    - name: word
      value:
        - jump
        - land
        - roll
    - name: suffix
      value: ing
  ref:
    apiVersion: custom.tekton.dev/v1alpha1
    kind: TaskLoop
    name: simpletaskloop
  • ✨ A new label for TaskRuns to identify their place in Pipelines (#4121)

TaskRuns and Runs in a Pipeline will now receive an additional label, tekton.dev/memberOf. The value of this label will be: tekton.dev/memberOf=tasks for entries in the "tasks" section of a Pipeline and tekton.dev/memberOf=finally for entries in the "finally" section of a Pipeline.

  • ✨ Add variable expansion in the workspaces.mountPath field of Tasks (#3934)

Users are now able to utilize variable substitution in the mountPath field of a Workspace within a Task. This is useful, for example, to parameterize the directory under which source code from a Workspace should appear in a Task's filesystem.

Deprecation Notices

  • 🚨 Early Warning: When Expressions will change their scope in a future release

Please see the "Skipping Strategies" feature description above for fuller information. In short: When Expressions currently guard both a Task and all of that Task's dependents. In future this behaviour will be changed so that When Expressions only guard the Task they are attached to. As part of this release a new feature flag has been added called scope-when-expressions-to-task. The default value is "false", indicating no immediate change to behaviour. In 9 months, per our beta deprecation policy, this value will be changed to "true" by default and eventually the flag will be removed completely. It is strongly advised that you assess your current suite of Pipelines for any impact this change might have on you and your teams. (#4085).

Fixes

  • 🐛 Graceful Termination: Cancelled Task is Failed (even with Retries) (#4136)

PipelineTasks with retries that were "gracefully cancelled" could result in a PipelineRun being left in a hung state. This has been fixed.

  • 🐛 Invalidate passing Results between Finally Tasks (#4132)

Pipelines that attempted to pass results from one Finally Task to another were not being caught during validation. This is not supported because Finally Tasks are not allowed to have dependencies among themselves. This has been fixed.

In addition this bug fix also dramatically improves the validation of Finally Tasks by ensuring that all validation errors are returned to the user at once rather than only the first error that was encountered.

  • 🐛 Mark webhook and controller as safe-to-evict (#4124)

By default, controller components are now marked as safe-to-evict by the cluster autoscaler. See docs/enabling-ha.md for more details.

  • 🐛 Passes pipelines/tasks from bundles through defaulting before execution (#4117)

Pipelines and Tasks fetched from Tekton Bundles were not being passed through a defaulting step before being validated, which could result in spurious validation errors. This has been fixed.

  • 🐛 Loosen permission checks on TestCp to handle umasks. (#4100)

  • 🐛 support referencing array params in when expression values (#4075)

When expression values can now use array parameter references, for example: values: [$(params.arrayParam[*])]

Misc

  • 🔨 Update to latest knative.dev/pkg (#4129)
  • 🔨 Fix Example with Completed and Succeeded Execution Status (#4140)
  • 🔨 Add e2e tests for Windows (#4139)
  • 🔨 Get default sa from configmap defaultconfigs (#4095)
  • 🔨 Small entrypoint unit test fixes prior to 0.27 release (#4149)
  • 🔨 Switch Errorf to Fatalf in retry tests. (#4133)
  • 🔨 Use knative.dev/pkg/changeset (#4126)
  • 🔨 Use controller.FilterController(&v1beta1.TaskRun{}) (#4113)
  • 🔨 Drop the tracker. (#4111)
  • 🔨 Take advantage of kmeta.OwnerRefable. (#4110)
  • 🔨 cleanup - homeDir constant and hardcoded path (#4079)
  • 🔨 Cleanup multi-arch tests (#4045)

Docs

  • 📖 GoogleContainerTools/skaffold mainline branch is called 'main' rather than 'master' (#4120)
  • 📖 docs: rename to expressions (#4104)
  • 📖 Add WhenExpressions to variable substitution documentation (#4091)
  • 📖 updating readme to include 0.26 (#4089)
  • 📖 minor doc fix (#4109)
  • 📖 Fix misplaced fields in API spec (#4094)
  • 📖 Always refer to "finally" tasks 📖 (#4090)
  • 📖 Add issue link to comment in controller yaml (#4088)

Thanks

Thanks to these contributors who contributed to v0.27.0!

Extra shout-out for awesome release notes:

Don't miss a new pipeline release

NewReleases is sending notifications on new releases.