You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Prior to this, we allowed parameter propagation in an inlined
pipelinerun. However, within a pipeline, we requrie a verbose spec.
This was an oversight as indicated in
#7901.
This PR fixes that issue by updating the validation logic in the
webhook.
Fixes#7901.
Propagate params in pipelines
Prior to this, we allowed parameter propagation in an inlined
pipelinerun. However, within a pipeline, we requrie a verbose spec.
This was an oversight as indicated in
#7901.
This PR fixes that issue by updating the validation logic in the
webhook.
Fixes#7901.
Copy file name to clipboardExpand all lines: docs/pipelines.md
+39
Original file line number
Diff line number
Diff line change
@@ -369,6 +369,45 @@ any resolved `param` value against the `enum` specified in each `PipelineTask` b
369
369
370
370
See usage in this [example](../examples/v1/pipelineruns/alpha/param-enum.yaml)
371
371
372
+
#### Propagated Params
373
+
374
+
Like with embedded [pipelineruns](pipelineruns.md#propagated-parameters), you can propagate `params` declared in the `pipeline` down to the inlined `pipelineTasks` and its inlined `Steps`. Wherever a resource (e.g. a `pipelineTask`) or a `StepAction` is referenced, the parameters need to be passed explicitly.
375
+
376
+
For example, the following is a valid yaml.
377
+
378
+
```yaml
379
+
apiVersion: tekton.dev/v1 # or tekton.dev/v1beta1
380
+
kind: Pipeline
381
+
metadata:
382
+
name: pipelien-propagated-params
383
+
spec:
384
+
params:
385
+
- name: HELLO
386
+
default: "Hello World!"
387
+
- name: BYE
388
+
default: "Bye World!"
389
+
tasks:
390
+
- name: echo-hello
391
+
taskSpec:
392
+
steps:
393
+
- name: echo
394
+
image: ubuntu
395
+
script: |
396
+
#!/usr/bin/env bash
397
+
echo "$(params.HELLO)"
398
+
- name: echo-bye
399
+
taskSpec:
400
+
steps:
401
+
- name: echo-action
402
+
ref:
403
+
name: step-action-echo
404
+
params:
405
+
- name: msg
406
+
value: "$(params.BYE)"
407
+
```
408
+
The same rules defined in [pipelineruns](pipelineruns.md#propagated-parameters) apply here.
409
+
410
+
372
411
## Adding `Tasks` to the `Pipeline`
373
412
374
413
Your `Pipeline` definition must reference at least one [`Task`](tasks.md).
0 commit comments