forked from stIncMale/mongo-hibernate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.yml
204 lines (182 loc) · 4.81 KB
/
config.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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
# Mark a failure as a system/bootstrap failure (purple box) rather then a task
# failure by default.
# Actual testing tasks are marked with `type: test`
command_type: system
# Protect ourselves against rogue test case, or curl gone wild, that runs forever
exec_timeout_secs: 3600
# When a task that used to pass starts to fail, go through all versions that may have been skipped
# to detect when the task started failing
stepback: true
functions:
fetch-source:
# Executes git clone and applies the submitted patch, if any.
- command: git.get_project
params:
directory: src
create-expansions:
- command: subprocess.exec
params:
working_dir: src
binary: bash
include_expansions_in_env:
- is_patch
- version_id
- project
args:
- .evergreen/create-expansions.sh
- command: expansions.update
params:
file: src/expansion.yml
prepare-resources:
- command: subprocess.exec
params:
working_dir: src
binary: bash
include_expansions_in_env:
- DRIVERS_TOOLS
args:
- .evergreen/fetch-drivers-tools.sh
bootstrap-mongo-orchestration:
- command: subprocess.exec
params:
binary: bash
include_expansions_in_env:
- TOPOLOGY
- MONGODB_VERSION
- MONGODB_BINARIES
args:
- ${DRIVERS_TOOLS}/.evergreen/run-orchestration.sh
# run-orchestration generates expansion file with the MONGODB_URI for the cluster
- command: expansions.update
params:
file: mo-expansion.yml
stop-mongo-orchestration:
- command: subprocess.exec
params:
working_dir: src
binary: bash
include_expansions_in_env:
- MONGO_ORCHESTRATION_HOME
args:
- .evergreen/stop-mongo-orchestration.sh
upload-test-results:
- command: attach.xunit_results
params:
files:
- src/build/test-results/test/TEST-*.xml
- src/build/test-results/integrationTest/TEST-*.xml
cleanup:
- command: subprocess.exec
params:
command: rm -rf ${DRIVERS_TOOLS}
# Functions to run before all tasks (except those in task groups).
pre:
- func: fetch-source
- func: create-expansions
- func: prepare-resources
# Functions to run after all tasks (except those in task groups).
post:
- func: stop-mongo-orchestration
- func: upload-test-results
- func: cleanup
#######################################
# Tasks #
#######################################
tasks:
- name: static-analysis
type: test
tags:
- pr
commands:
- command: subprocess.exec
params:
working_dir: src
binary: bash
add_to_path:
- .evergreen
args:
- static-checks.sh
- name: run-unit-tests
type: test
tags:
- pr
commands:
- command: subprocess.exec
params:
working_dir: src
binary: bash
add_to_path:
- .evergreen
args:
- run-unit-tests.sh
- name: run-integration-tests
type: test
tags:
- pr
commands:
- func: bootstrap-mongo-orchestration
- command: subprocess.exec
params:
working_dir: src
binary: bash
add_to_path:
- .evergreen
args:
- run-integration-tests.sh
########################################
# Axes #
########################################
axes:
- id: mongo-version
display_name: "MongoDB Version"
values:
- id: "8.0"
display_name: "8.0"
variables:
MONGODB_VERSION: "8.0"
- id: "7.0"
display_name: "7.0"
variables:
MONGODB_VERSION: "7.0"
- id: "6.0"
display_name: "6.0"
variables:
MONGODB_VERSION: "6.0"
- id: topology
display_name: Topology
values:
- id: replicaset
display_name: "Replica Set"
variables:
TOPOLOGY: replica_set
- id: os
display_name: OS
values:
- id: linux
display_name: Linux
run_on: rhel80-small
########################################
# Build Variants #
########################################
buildvariants:
- name: static-checks
tags:
- pr
display_name: "Static Checks"
run_on: rhel80-small
tasks:
- name: static-analysis
- name: unit-tests
tags:
- pr
display_name: "Unit Tests"
run_on: rhel80-medium
tasks:
- name: run-unit-tests
- matrix_name: mongo-hibernate
matrix_spec: { mongo-version: "*", topology: "*", os: "*" }
display_name: "${mongo-version} ${topology} ${os}"
tags:
- pr
tasks:
- name: run-integration-tests