-
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-0090: Matrix][tep-0090] proposed executing a `PipelineTask` in parallel `TaskRuns` and `Runs` with substitutions from combinations of `Parameters` in a `Matrix`. In this change, we implement consuming `Results` in a `Matrix`. This was disallowed in previous iterations of `Matrix` - validation failed. With this change, `Matrix` supports Results of type String that are passed in individually. `Results` of type Array are not yet available at the `Pipeline` level - this will be handled when it's available. [tep-0090]: https://github.com/tektoncd/community/blob/main/teps/0090-matrix.md
- Loading branch information
1 parent
470096a
commit c7af1d4
Showing
12 changed files
with
987 additions
and
18 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
64 changes: 64 additions & 0 deletions
64
examples/v1beta1/pipelineruns/alpha/pipelinerun-with-matrix-and-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,64 @@ | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: Task | ||
metadata: | ||
name: platform-browsers | ||
annotations: | ||
description: | | ||
A task that does something cool with platforms and browsers | ||
spec: | ||
params: | ||
- name: platform | ||
- name: browser | ||
steps: | ||
- name: echo | ||
image: alpine | ||
script: | | ||
echo "$(params.platform) and $(params.browser)" | ||
--- | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: PipelineRun | ||
metadata: | ||
generateName: matrixed-pr- | ||
spec: | ||
serviceAccountName: 'default' | ||
pipelineSpec: | ||
tasks: | ||
- name: get-platforms | ||
taskSpec: | ||
results: | ||
- name: one | ||
- name: two | ||
- name: three | ||
steps: | ||
- name: echo | ||
image: alpine | ||
script: | | ||
printf linux | tee /tekton/results/one | ||
printf mac | tee /tekton/results/two | ||
printf windows | tee /tekton/results/three | ||
- name: get-browsers | ||
taskSpec: | ||
results: | ||
- name: one | ||
- name: two | ||
- name: three | ||
steps: | ||
- name: echo | ||
image: alpine | ||
script: | | ||
printf chrome | tee /tekton/results/one | ||
printf safari | tee /tekton/results/two | ||
printf firefox | tee /tekton/results/three | ||
- name: platforms-and-browsers-dag | ||
matrix: | ||
- name: platform | ||
value: | ||
- $(tasks.get-platforms.results.one) | ||
- $(tasks.get-platforms.results.two) | ||
- $(tasks.get-platforms.results.three) | ||
- name: browser | ||
value: | ||
- $(tasks.get-browsers.results.one) | ||
- $(tasks.get-browsers.results.two) | ||
taskRef: | ||
name: platform-browsers |
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.