forked from tektoncd/pipeline
-
Notifications
You must be signed in to change notification settings - Fork 0
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 params between Step and StepActions
Following the previous [PR](tektoncd#7317), which introduced Params to the `StepAction` CRD, this PR integrates `param` usage between `Steps` and `StepActions`. This completes support for params in `StepActions`. This work is part of issue tektoncd#7259.
- Loading branch information
1 parent
695311e
commit d335ab3
Showing
25 changed files
with
1,113 additions
and
27 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
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,67 @@ | ||
apiVersion: tekton.dev/v1alpha1 | ||
kind: StepAction | ||
metadata: | ||
name: step-action | ||
spec: | ||
params: | ||
- name: string-param | ||
default: "a string param" | ||
- name: array-param | ||
type: array | ||
default: | ||
- an | ||
- array | ||
- param | ||
- name: object-param | ||
type: object | ||
properties: | ||
key1: | ||
type: string | ||
key2: | ||
type: string | ||
key3: | ||
type: string | ||
default: | ||
key1: "step-action default key1" | ||
key2: "step-action default key2" | ||
key3: "step-action default key3" | ||
image: bash:3.2 | ||
args: [ | ||
"echo", | ||
"$(params.array-param[*])", | ||
"$(params.string-param)", | ||
"$(params.object-param.key1)", | ||
"$(params.object-param.key2)" | ||
] | ||
--- | ||
apiVersion: tekton.dev/v1 | ||
kind: PipelineRun | ||
metadata: | ||
name: step-action-pipeline-run-propagated | ||
spec: | ||
params: | ||
- name: stringparam | ||
value: "pipelinerun stringparam" | ||
- name: arrayparam | ||
value: | ||
- "pipelinerun" | ||
- "array" | ||
- "param" | ||
- name: objectparam | ||
value: | ||
key2: "pipelinerun key2" | ||
PipelineSpec: | ||
tasks: | ||
- name: run-action | ||
taskSpec: | ||
steps: | ||
- name: action-runner | ||
ref: | ||
name: step-action | ||
params: | ||
- name: string-param | ||
value: $(params.stringparam) | ||
- name: array-param | ||
value: $(params.arrayparam[*]) | ||
- name: object-param | ||
value: $(params.objectparam[*]) |
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,75 @@ | ||
apiVersion: tekton.dev/v1alpha1 | ||
kind: StepAction | ||
metadata: | ||
name: step-action | ||
spec: | ||
params: | ||
- name: string-param | ||
default: "a string param" | ||
- name: array-param | ||
type: array | ||
default: | ||
- an | ||
- array | ||
- param | ||
- name: object-param | ||
type: object | ||
properties: | ||
key1: | ||
type: string | ||
key2: | ||
type: string | ||
key3: | ||
type: string | ||
default: | ||
key1: "step-action default key1" | ||
key2: "step-action default key2" | ||
key3: "step-action default key3" | ||
image: bash:3.2 | ||
args: [ | ||
"echo", | ||
"$(params.array-param[*])", | ||
"$(params.string-param)", | ||
"$(params.object-param.key1)", | ||
"$(params.object-param.key2)", | ||
"$(params.object-param.key3)" | ||
] | ||
--- | ||
apiVersion: tekton.dev/v1 | ||
kind: TaskRun | ||
metadata: | ||
name: step-action-run | ||
spec: | ||
params: | ||
- name: stringparam | ||
value: "taskrun stringparam" | ||
- name: arrayparam | ||
value: | ||
- "taskrun" | ||
- "array" | ||
- "param" | ||
- name: objectparam | ||
value: | ||
key2: "taksrun key2" | ||
TaskSpec: | ||
params: | ||
- name: objectparam | ||
properties: | ||
key1: | ||
type: string | ||
key2: | ||
type: string | ||
default: | ||
key1: "taskspec default key1" | ||
key2: "taskspec default key2" | ||
steps: | ||
- name: action-runner | ||
ref: | ||
name: step-action | ||
params: | ||
- name: string-param | ||
value: $(params.stringparam) | ||
- name: array-param | ||
value: $(params.arrayparam[*]) | ||
- name: object-param | ||
value: $(params.objectparam[*]) |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.