-
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.
debug example passes tests added result ref coverage up entrypointer tests added
- Loading branch information
1 parent
5e3b0dc
commit 8bdd145
Showing
10 changed files
with
809 additions
and
16 deletions.
There are no files selected for viewing
66 changes: 66 additions & 0 deletions
66
examples/v1/taskruns/alpha/stepaction-passing-results.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,66 @@ | ||
apiVersion: tekton.dev/v1alpha1 | ||
kind: StepAction | ||
metadata: | ||
name: step-action | ||
spec: | ||
params: | ||
- name: param1 | ||
type: array | ||
- name: param2 | ||
type: string | ||
- name: param3 | ||
type: object | ||
properties: | ||
IMAGE_URL: | ||
type: string | ||
IMAGE_DIGEST: | ||
type: string | ||
image: bash:3.2 | ||
env: | ||
- name: STRINGPARAM | ||
value: $(params.param2) | ||
args: [ | ||
"$(params.param1[*])", | ||
"$(params.param1[0])", | ||
"$(params.param3.IMAGE_URL)", | ||
"$(params.param3.IMAGE_DIGEST)", | ||
] | ||
script: | | ||
echo "$@" | ||
echo "$STRINGPARAM" | ||
--- | ||
apiVersion: tekton.dev/v1 | ||
kind: TaskRun | ||
metadata: | ||
name: step-action-run | ||
spec: | ||
TaskSpec: | ||
steps: | ||
- name: inline-step | ||
results: | ||
- name: result1 | ||
type: array | ||
- name: result2 | ||
type: string | ||
- name: result3 | ||
type: object | ||
properties: | ||
IMAGE_URL: | ||
type: string | ||
IMAGE_DIGEST: | ||
type: string | ||
image: alpine | ||
script: | | ||
echo -n "[\"image1\", \"image2\", \"image3\"]" | tee $(step.results.result1.path) | ||
echo -n "foo" | tee $(step.results.result2.path) | ||
echo -n "{\"IMAGE_URL\":\"ar.com\", \"IMAGE_DIGEST\":\"sha234\"}" | tee $(step.results.result3.path) | ||
- name: action-runner | ||
ref: | ||
name: step-action | ||
params: | ||
- name: param1 | ||
value: $(steps.inline-step.results.result1[*]) | ||
- name: param2 | ||
value: $(steps.inline-step.results.result2) | ||
- name: param3 | ||
value: $(steps.inline-step.results.result3[*]) |
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.