Skip to content

Tekton Triggers v0.5.0

Compare
Choose a tag to compare
@wlynch wlynch released this 12 May 15:17

Installation

kubectl -n tekton-pipelines delete deployments tekton-triggers-controller tekton-triggers-webhook
kubectl apply -f https://storage.googleapis.com/tekton-releases/triggers/previous/v0.5.0/release.yaml

Changes

This is an overview of new changes. For all changes, see Milestone.

  • Triggers now uses Go modules! #527
  • Updated cel-go dependency to support new string library. #472
  • New CEL Interceptor parseJSON function to sub-select fields in JSON payloads. #538
  • EventListeners now serve readiness probe at /live. #467
  • TriggerBindings can now be embedded in EventListeners. #371
  • Trigger resources are now annotated with app.kubernetes.io labels. #556

🚨 Breaking changes 🚨

  • #556 Tekton Trigger controllers will need to be updated (by deleting and creating the deployments) in order to apply the new labels:

    kubectl -n tekton-pipelines delete deployments tekton-triggers-controller tekton-triggers-webhook
    kubectl apply -f https://storage.googleapis.com/tekton-releases/triggers/previous/v0.5.0/release.yaml
    
  • #532 removes the undocumented and unsupported type field from TriggerTemplate params. If you were using the field in your TriggerTemplate, you'll have to delete the resource, and recreate it after deleting the type field.

  • #472 requires users to update to new cel-go strings syntax.

It brings in the upstream cel-go Strings library, with a number of additional methods in your CEL expressions, see below for more information:

This also standardises the CEL extensions as "instance overloads", which changes the way they are called:

old style:

expression: "truncate(body.pull_request.head.sha, 7)"

new style:

expression: "body.pull_request.head.sha.truncate(7)"

The new functions that the Strings extension library brings in are:

  • CharAt - Returns the character at the given position. If the position is negative, or greater than the length of the string, the function will produce an error:
  • IndexOf Returns the integer index of the first occurrence of the search string. If the search string is not found the function returns -1.
  • LastIndexOf Returns the integer index of the last occurrence of the search string. If the search string is not found the function returns -1.
  • Replace Produces a new string based on the target, which replaces the occurrences of a search string with a replacement string if present. The function accepts an optional limit on the number of substring replacements to be made.
  • Substring Returns the substring given a numeric range corresponding to character positions. Optionally may omit the trailing range for a substring from a given character position until the end of a string.
  • Trim Returns a new string which removes the leading and trailing whitespace in the target string. The trim function uses the Unicode definition of whitespace which does not include the zero-width spaces.

Deprecation Warnings

  • The name field in triggers.bindings within an EventListener has been deprecated in favor of the ref field and will be removed in a future release. See #371 for details.

Thanks

Thanks to these contributors who contributed to v0.5.0!

  • Alan Greene
  • Alex Ashley
  • Andrea Frittoli
  • Dibyo Mukherjee
  • Gabe Montero
  • James Turley
  • Kevin McDermott
  • Khurram Baig
  • Pierre Grimaud
  • Prachi Pendse
  • Vincent Demeester
  • charles-edouard.breteche
  • savitaashture