forked from tektoncd/pipeline
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpipelinerun-with-matrix-and-results.yaml
65 lines (65 loc) · 1.76 KB
/
pipelinerun-with-matrix-and-results.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
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:
params:
- 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