Skip to content

Commit e24df83

Browse files
chitrangpateltekton-robot
authored andcommitted
Deprecated implicit parameters
Tekton Pipelines resources are verbose mostly because of explicitly propagating Parameters. Implicit Parameters feature was added to reduce the verbosity. However, there are challenges caused by mutating specifications to support Implicit Parameters. This PR deprecates existing implementation of implicit parameters. A followup PR will address improvements to this and allow propagating paramaters that the task requires.
1 parent a67eee4 commit e24df83

File tree

11 files changed

+0
-1082
lines changed

11 files changed

+0
-1082
lines changed

docs/pipelineruns.md

Lines changed: 0 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ weight: 500
1515
- [Remote Pipelines](#remote-pipelines)
1616
- [Specifying <code>Resources</code>](#specifying-resources)
1717
- [Specifying <code>Parameters</code>](#specifying-parameters)
18-
- [Implicit Parameters](#implicit-parameters)
1918
- [Specifying custom <code>ServiceAccount</code> credentials](#specifying-custom-serviceaccount-credentials)
2019
- [Mapping <code>ServiceAccount</code> credentials to <code>Tasks</code>](#mapping-serviceaccount-credentials-to-tasks)
2120
- [Specifying a <code>Pod</code> template](#specifying-a-pod-template)
@@ -284,75 +283,6 @@ case is when your CI system autogenerates `PipelineRuns` and it has `Parameters`
284283
provide to all `PipelineRuns`. Because you can pass in extra `Parameters`, you don't have to
285284
go through the complexity of checking each `Pipeline` and providing only the required params.
286285

287-
#### Implicit Parameters
288-
289-
**([alpha only](https://github.com/tektoncd/pipeline/blob/main/docs/install.md#alpha-features))**
290-
291-
When using an inlined spec, parameters from the parent `PipelineRun` will be
292-
available to any inlined specs without needing to be explicitly defined. This
293-
allows authors to simplify specs by automatically propagating top-level
294-
parameters down to other inlined resources.
295-
296-
```yaml
297-
apiVersion: tekton.dev/v1beta1
298-
kind: PipelineRun
299-
metadata:
300-
generateName: echo-
301-
spec:
302-
params:
303-
- name: MESSAGE
304-
value: "Good Morning!"
305-
pipelineSpec:
306-
tasks:
307-
- name: echo-message
308-
taskSpec:
309-
steps:
310-
- name: echo
311-
image: ubuntu
312-
script: |
313-
#!/usr/bin/env bash
314-
echo "$(params.MESSAGE)"
315-
```
316-
317-
On creation, this will resolve to a fully-formed spec and will be returned back
318-
to clients to avoid ambiguity:
319-
320-
```yaml
321-
apiVersion: tekton.dev/v1beta1
322-
kind: PipelineRun
323-
metadata:
324-
generateName: echo-
325-
spec:
326-
params:
327-
- name: MESSAGE
328-
value: Good Morning!
329-
pipelineSpec:
330-
params:
331-
- name: MESSAGE
332-
type: string
333-
tasks:
334-
- name: echo-message
335-
params:
336-
- name: MESSAGE
337-
value: $(params.MESSAGE)
338-
taskSpec:
339-
params:
340-
- name: MESSAGE
341-
type: string
342-
spec: null
343-
steps:
344-
- name: echo
345-
image: ubuntu
346-
script: |
347-
#!/usr/bin/env bash
348-
echo "$(params.MESSAGE)"
349-
```
350-
351-
Note that all implicit Parameters will be passed through to inlined resources
352-
(i.e. PipelineRun -> Pipeline -> Tasks) even if they are not used.
353-
Extra parameters passed this way should generally be safe (since they aren't
354-
actually used), but may result in more verbose specs being returned by the API.
355-
356286
### Specifying custom `ServiceAccount` credentials
357287

358288
You can execute the `Pipeline` in your `PipelineRun` with a specific set of credentials by

docs/taskruns.md

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ weight: 300
1414
- [Tekton Bundles](#tekton-bundles)
1515
- [Remote Tasks](#remote-tasks)
1616
- [Specifying `Parameters`](#specifying-parameters)
17-
- [Implicit Parameters](#implicit-parameters)
1817
- [Extra Parameters](#extra-parameters)
1918
- [Specifying `Resources`](#specifying-resources)
2019
- [Specifying `Resource` limits](#specifying-resource-limits)
@@ -198,60 +197,6 @@ spec:
198197

199198
**Note:** If a parameter does not have an implicit default value, you must explicitly set its value.
200199

201-
#### Implicit Parameters
202-
203-
**([alpha only](https://github.com/tektoncd/pipeline/blob/main/docs/install.md#alpha-features))**
204-
205-
When using an inlined `taskSpec`, parameters from the parent `TaskRun` will be
206-
available to the `Task` without needing to be explicitly defined.
207-
208-
```yaml
209-
apiVersion: tekton.dev/v1beta1
210-
kind: TaskRun
211-
metadata:
212-
generateName: hello-
213-
spec:
214-
params:
215-
- name: message
216-
value: "hello world!"
217-
taskSpec:
218-
# There are no explicit params defined here.
219-
# They are derived from the TaskRun params above.
220-
steps:
221-
- name: default
222-
image: ubuntu
223-
script: |
224-
echo $(params.message)
225-
```
226-
227-
On creation, this will resolve to a fully-formed spec and will be returned back
228-
to clients to avoid ambiguity:
229-
230-
```yaml
231-
apiVersion: tekton.dev/v1beta1
232-
kind: TaskRun
233-
metadata:
234-
generateName: hello-
235-
spec:
236-
params:
237-
- name: message
238-
value: "hello world!"
239-
taskSpec:
240-
params:
241-
- name: message
242-
type: string
243-
steps:
244-
- name: default
245-
image: ubuntu
246-
script: |
247-
echo $(params.message)
248-
```
249-
250-
Note that all implicit Parameters will be passed through to inlined resource,
251-
even if they are not used. Extra parameters passed this way should generally
252-
be safe (since they aren't actually used), but may result in more verbose specs
253-
being returned by the API.
254-
255200
#### Extra Parameters
256201

257202
**([alpha only](https://github.com/tektoncd/pipeline/blob/main/docs/install.md#alpha-features))**

examples/v1beta1/pipelineruns/alpha/pipelinerun-implicit-params.yaml

Lines changed: 0 additions & 18 deletions
This file was deleted.

examples/v1beta1/taskruns/alpha/implicit-params.yaml

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)