tektoncd / pipeline

A cloud-native Pipeline resource.
https://tekton.dev
Apache License 2.0
8.44k stars 1.77k forks source link

Common Expression Language Custom Task #3149

Open jerop opened 4 years ago

jerop commented 4 years ago

Feature request

Add a CelRun Custom Task to provide CEL support in Pipelines. This allows us to experiment with CEL in Pipelines without adding CEL directly to the Tekton API surface. CelRun Custom Task is discussed in further detail as an alternative in Conditions Beta TEP.

Use cases

Related Issues:

/cc @bobcatfish @bitsofinfo

imjasonh commented 4 years ago

FWIW when I was prototyping Custom Tasks I made https://github.com/imjasonh/cel-task to help demonstrate a simple CEL Task. It'll need some work to make sure it still works, and to add tests especially, but it might be a useful starting point.

tekton-robot commented 3 years ago

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with /close.

/lifecycle stale

Send feedback to tektoncd/plumbing.

jerop commented 3 years ago

/lifecycle frozen

because supporting CEL through a custom task is important for experimenting with the expression language without adding it to Tekton API surface -- expression language support is still highly requested (https://github.com/tektoncd/pipeline/issues/2812)

chitrangpatel commented 1 year ago

Example that shows a usecase for CEL

In our plumbing repo we have a pipeline that computes go coverage, I was forced to write an additional task that split a string into two results so that I could use them as parameters into my next task that used a clone.

The ability to split the main param into two would have been incredibly useful (for e.g. something like https://tekton.dev/docs/triggers/cel_expressions/).