-
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.
[TEP-0075]Pipeline results support object
This is part of work in TEP-0075. Previous to this commit, we have added support for pipeline array results. This commit supports object results, so pipeline can emit object results as whole or emit elements of the object from tasks. Before this commit the pipeline level result only support string and array.
- Loading branch information
1 parent
5126d15
commit ed65d7a
Showing
10 changed files
with
345 additions
and
83 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
40 changes: 0 additions & 40 deletions
40
examples/v1beta1/pipelineruns/alpha/pipeline-array-results.yaml
This file was deleted.
Oops, something went wrong.
61 changes: 61 additions & 0 deletions
61
examples/v1beta1/pipelineruns/alpha/pipeline-emitting-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,61 @@ | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: PipelineRun | ||
metadata: | ||
name: pipelinerun-array-indexing-results | ||
spec: | ||
pipelineSpec: | ||
tasks: | ||
- name: task1 | ||
taskSpec: | ||
results: | ||
- name: array-results | ||
type: array | ||
description: The array results | ||
steps: | ||
- name: write-array | ||
image: bash:latest | ||
script: | | ||
#!/usr/bin/env bash | ||
echo -n "[\"1\",\"2\",\"3\"]" | tee $(results.array-results.path) | ||
- name: task2 | ||
taskSpec: | ||
results: | ||
- name: object-results | ||
type: object | ||
description: The object results | ||
properties: | ||
foo: { | ||
type: string | ||
} | ||
hello: { | ||
type: string | ||
} | ||
steps: | ||
- name: write-array | ||
image: bash:latest | ||
script: | | ||
#!/usr/bin/env bash | ||
echo -n "{\"foo\":\"bar\",\"hello\":\"world\"}" | tee $(results.object-results.path) | ||
results: | ||
- name: array-results | ||
type: array | ||
description: whole array | ||
value: $(tasks.task1.results.array-results[*]) | ||
- name: array-indexing-results | ||
type: string | ||
description: array element | ||
value: $(tasks.task1.results.array-results[1]) | ||
- name: object-results | ||
type: object | ||
description: whole object | ||
value: $(tasks.task2.results.object-results[*]) | ||
- name: object-results-from-array-indexing-and-object-elements | ||
type: object | ||
description: whole object | ||
value: | ||
key1: $(tasks.task1.results.array-results[1]) | ||
key2: $(tasks.task2.results.object-results.hello) | ||
- name: object-element | ||
type: string | ||
description: object element | ||
value: $(tasks.task2.results.object-results.foo) |
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.