-
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 params between Step and StepActions
Following the previous [PR](#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 #7259.
- Loading branch information
1 parent
695311e
commit 1bb89d3
Showing
25 changed files
with
1,101 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,62 @@ | ||
apiVersion: tekton.dev/v1alpha1 | ||
kind: StepAction | ||
metadata: | ||
name: step-action | ||
spec: | ||
params: | ||
- name: not | ||
default: "a mysterious GH action" | ||
- name: array-param | ||
type: array | ||
default: | ||
- ho | ||
- ho | ||
- ho | ||
- name: object-param | ||
type: object | ||
properties: | ||
foo: | ||
type: string | ||
bar: | ||
type: string | ||
default: | ||
foo: "default foo" | ||
image: bash:3.2 | ||
args: [ | ||
"echo", | ||
"$(params.array-param[*])", | ||
"$(params.not)", | ||
"$(params.object-param.foo)", | ||
"$(params.object-param.bar)" | ||
] | ||
--- | ||
apiVersion: tekton.dev/v1 | ||
kind: PipelineRun | ||
metadata: | ||
name: step-action-pipeline-run | ||
spec: | ||
params: | ||
- name: notaction | ||
value: "a github, mysterious or Task action" | ||
- name: arrayparam | ||
value: | ||
- "hello, " | ||
- "hi!!" | ||
- name: objectparam | ||
value: | ||
bar: "chocolate bar" | ||
PipelineSpec: | ||
tasks: | ||
- name: run-action | ||
taskSpec: | ||
steps: | ||
- name: action-runner | ||
ref: | ||
name: step-action | ||
params: | ||
- name: not | ||
value: $(params.notaction) | ||
- 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,68 @@ | ||
apiVersion: tekton.dev/v1alpha1 | ||
kind: StepAction | ||
metadata: | ||
name: step-action | ||
spec: | ||
params: | ||
- name: not | ||
default: "a mysterious GH action" | ||
- name: array-param | ||
type: array | ||
default: | ||
- ho | ||
- ho | ||
- ho | ||
- name: object-param | ||
type: object | ||
properties: | ||
foo: | ||
type: string | ||
bar: | ||
type: string | ||
default: | ||
foo: "default foo" | ||
image: bash:3.2 | ||
args: [ | ||
"echo", | ||
"$(params.array-param[*])", | ||
"$(params.not)", | ||
"$(params.object-param.foo)", | ||
"$(params.object-param.bar)" | ||
] | ||
--- | ||
apiVersion: tekton.dev/v1 | ||
kind: TaskRun | ||
metadata: | ||
name: step-action-run | ||
spec: | ||
params: | ||
- name: notaction | ||
value: "a github, mysterious or Task action" | ||
- name: arrayparam | ||
value: | ||
- "hello, " | ||
- "hi!!" | ||
- name: objectparam | ||
value: | ||
bar: "chocolate bar" | ||
TaskSpec: | ||
#params: | ||
# - name: objectparam | ||
# properties: | ||
# foo: | ||
# type: string | ||
# bar: | ||
# type: string | ||
# default: | ||
# bar: "default bar" | ||
steps: | ||
- name: action-runner | ||
ref: | ||
name: step-action | ||
params: | ||
- name: not | ||
value: $(params.notaction) | ||
- 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.