forked from jfrog/jfrog-pipelines-matrix-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpipelines.yml
96 lines (90 loc) · 2.74 KB
/
pipelines.yml
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
template: true # required for local templates
valuesFilePath: ./values.yml
resources:
- name: matrix_repo
type: GitRepo
configuration:
path: {{ .Values.repoPath }} # Change to your own path
branches:
include: ^master$
gitProvider: {{ .Values.gitProvider }} # Change to your own GitHub integration name
pipelines:
- name: matrix_single_dimension_pipeline
steps:
- name: matrix_step
type: Matrix
stepMode: Bash
configuration:
inputResources:
- name: matrix_repo
stepletMultipliers:
environmentVariables: # Sets of environment variables for steplets
- animal: dog # - Set 1
mineral: copper
vegetable: carrot
- animal: goat # - Set 2
mineral: iron
vegetable: broccoli
- animal: lizard # - Set 3
mineral: lead
execution:
onExecute:
- echo "Executing matrix step on ${steplet_id}"
- echo "Variation animal = ${animal}, mineral = ${mineral}, vegetable = ${vegetable}"
- name: matrix_two_dimension_pipeline
steps:
- name: setup
type: PreMatrix
configuration:
inputResources:
- name: matrix_repo
execution:
onExecute:
- echo "Preparing the code base"
- pushd "${res_matrix_repo_resourcePath}/app"
- npm install
- popd
- mkdir -p app
- cp -r "${res_matrix_repo_resourcePath}/app/." ./app/
- name: test
type: Matrix
stepMode: Bash
configuration:
inputSteps:
- name: setup
stepletMultipliers:
environmentVariables:
- module: mod_1
- module: mod_2
- module: mod_3
- module: mod_4
runtimes:
- type: image
image:
auto:
language: node
versions:
- 12
- type: image
image:
auto:
language: node
versions:
- 8.17.0
execution:
onExecute:
- pushd ./setup/app
- MODULE="$module" npm run test
- popd
onComplete:
- save_tests ./setup/app/reports
- name: output
type: PostMatrix
configuration:
inputSteps:
- name: test
execution:
onExecute:
- echo "Executing the output step"
- ls -ltr ./test/setup/app/reports
- save_tests ./test/setup/app/reports