-
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-0118: Implement Matrix Fanning Out logic to support Matrix Includ…
…e Parameters in a Task Run This commit adds implementation logic and testing for fanning out the Matrix Include Parameters in a Task Run to allow users to generate explicit combinations and support adding a specific combination of input values for Matrix Parameters.
- Loading branch information
1 parent
8638170
commit f6e1499
Showing
13 changed files
with
2,214 additions
and
51 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
48 changes: 48 additions & 0 deletions
48
examples/v1beta1/pipelineruns/alpha/pipelinerun-with-matrix-include-explicit.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,48 @@ | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: Task | ||
metadata: | ||
name: mytask | ||
annotations: | ||
description: | | ||
A task that does something cool with platforms and browsers | ||
spec: | ||
params: | ||
- name: IMAGE | ||
- name: DOCKERFILE | ||
steps: | ||
- name: echo | ||
image: alpine | ||
script: | | ||
echo "$(params.IMAGE) and $(params.DOCKERFILE)" | ||
--- | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: PipelineRun | ||
metadata: | ||
generateName: explicit-combos | ||
spec: | ||
serviceAccountName: 'default' | ||
pipelineSpec: | ||
tasks: | ||
- name: matrix-include | ||
matrix: | ||
include: | ||
- name: build-1 | ||
params: | ||
- name: IMAGE | ||
value: image-1 | ||
- name: DOCKERFILE | ||
value: path/to/Dockerfile1 | ||
- name: build-2 | ||
params: | ||
- name: IMAGE | ||
value: image-2 | ||
- name: DOCKERFILE | ||
value: path/to/Dockerfile2 | ||
- name: build-3 | ||
params: | ||
- name: IMAGE | ||
value: image-3 | ||
- name: DOCKERFILE | ||
value: path/to/Dockerfile3 | ||
taskRef: | ||
name: mytask |
68 changes: 68 additions & 0 deletions
68
examples/v1beta1/pipelineruns/alpha/pipelinerun-with-matrix-include.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,68 @@ | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: Task | ||
metadata: | ||
name: mytask | ||
annotations: | ||
description: | | ||
A task that does something cool with GOARCH and version | ||
spec: | ||
params: | ||
- name: GOARCH | ||
default: '' | ||
- name: version | ||
default: '' | ||
- name: flags | ||
default: '' | ||
- name: context | ||
default: '' | ||
- name: package | ||
default: '' | ||
steps: | ||
- name: echo | ||
image: alpine | ||
script: | | ||
echo $(params.GOARCH) and $(params.version) flags? $(params.flags) context? $(params.context) package? $(params.package) | ||
--- | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: PipelineRun | ||
metadata: | ||
generateName: matrixed-include-pr | ||
spec: | ||
serviceAccountName: default | ||
pipelineSpec: | ||
tasks: | ||
- name: matrix-include | ||
matrix: | ||
params: | ||
- name: GOARCH | ||
value: | ||
- linux/amd64 | ||
- linux/ppc64le | ||
- linux/s390x | ||
- name: version | ||
value: | ||
- go1.17 | ||
- go1.18.1 | ||
include: | ||
- name: common-package | ||
params: | ||
- name: package | ||
value: path/to/common/package/ | ||
- name: s390x-no-race | ||
params: | ||
- name: GOARCH | ||
value: linux/s390x | ||
- name: flags | ||
value: '-cover -v' | ||
- name: go117-context | ||
params: | ||
- name: version | ||
value: go1.17 | ||
- name: context | ||
value: path/to/go117/context | ||
- name: non-existent-arch | ||
params: | ||
- name: GOARCH | ||
value: I-do-not-exist | ||
taskRef: | ||
name: mytask |
Oops, something went wrong.