-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add support for reserved default object param
This commit adds support for reserved default object param.Users can reference to default object param values without needing to declaring them in remote Task&Pipeline. Validation err will be returned if referencing to non-existent object key. Signed-off-by: Yongxuan Zhang [email protected]
- Loading branch information
1 parent
416c35c
commit d4fe76d
Showing
18 changed files
with
817 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
examples/v1/pipelineruns/alpha/remote-pipeline-ref-reserved-param.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
apiVersion: tekton.dev/v1 | ||
kind: Pipeline | ||
metadata: | ||
name: echo-message-pipeline | ||
spec: | ||
params: | ||
- name: hello | ||
properties: | ||
project_id: | ||
type: string | ||
type: object | ||
tasks: | ||
- name: task1 | ||
params: | ||
- name: foo | ||
value: | ||
project_id: $(params.hello.project_id) | ||
taskSpec: | ||
params: | ||
- name: foo | ||
type: object | ||
properties: | ||
project_id: | ||
type: string | ||
steps: | ||
- name: echo | ||
image: ubuntu | ||
script: | | ||
#!/bin/bash | ||
echo $(params.provider.project_id) | ||
echo $(params.foo.project_id) | ||
--- | ||
kind: PipelineRun | ||
apiVersion: tekton.dev/v1 | ||
metadata: | ||
name: test-pipelinerun | ||
spec: | ||
params: | ||
- name: provider | ||
value: | ||
project_id: foo | ||
- name: hello | ||
value: | ||
project_id: foo | ||
pipelineRef: | ||
name: echo-message-pipeline |
37 changes: 37 additions & 0 deletions
37
examples/v1/taskruns/alpha/remote-task-ref-reserved-param.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
kind: Task | ||
apiVersion: tekton.dev/v1 | ||
metadata: | ||
name: example-task | ||
spec: | ||
params: | ||
- name: foo | ||
type: object | ||
properties: | ||
project_id: | ||
type: string | ||
digest: | ||
type: string | ||
steps: | ||
- image: ubuntu | ||
name: echo | ||
script: | | ||
echo -n $(params.foo.project_id) | ||
echo -n $(params.provider.project_id) | ||
--- | ||
kind: TaskRun | ||
apiVersion: tekton.dev/v1 | ||
metadata: | ||
name: example-tr | ||
spec: | ||
params: | ||
- name: foo | ||
value: | ||
project_id: foo | ||
digest: bar | ||
- name: provider | ||
value: | ||
project_id: foo | ||
digest: bar | ||
taskRef: | ||
name: example-task | ||
kind: task |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.