forked from evergreen-ci/evergreen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
self-tests.yml
579 lines (557 loc) · 17.3 KB
/
self-tests.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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
command_type: test
stepback: true
ignore:
- "*.md" # don't schedule tests if a commit only changes markdown files
- "scripts/*" # our scripts are untested, so don't schedule tests for them
post:
- command: gotest.parse_files
type: system
params:
files:
- "gopath/src/github.com/evergreen-ci/evergreen/bin/output.*"
- command: s3.put
type: system
params:
aws_key: ${aws_key}
aws_secret: ${aws_secret}
local_files_include_filter: ["gopath/src/github.com/evergreen-ci/evergreen/bin/output.*.coverage.html"]
remote_file: evergreen/${task_id}/
bucket: mciuploads
content_type: text/html
permissions: public-read
display_name: "(html) coverage:"
- command: s3.put
type: system
params:
aws_key: ${aws_key}
aws_secret: ${aws_secret}
local_files_include_filter: ["gopath/src/github.com/evergreen-ci/evergreen/bin/output.*.coverage"]
remote_file: evergreen/${task_id}/
bucket: mciuploads
content_type: text/plain
permissions: public-read
display_name: "(txt) coverage:"
#######################################
# YAML Templates #
#######################################
variables:
- &run-build
# runs a build operations. The task name in evergreen should
# correspond to a make target for the build operation.
name: test
commands:
- command: git.get_project
type: system
params:
directory: gopath/src/github.com/evergreen-ci/evergreen
- func: run-make
vars: { target: "${task_name}" }
- command: s3.put
type: system
params:
optional: true
aws_key: ${aws_key}
aws_secret: ${aws_secret}
local_file: gopath/src/github.com/evergreen-ci/evergreen/bin/${task_name}.tar.gz
remote_file: evergreen/${build_id}-${build_variant}/evergreen-${task_name}-${revision}.tar.gz
bucket: mciuploads
content_type: application/x-gzip
permissions: public-read
display_name: dist.tar.gz
- &run-go-test-suite
# runs a make target and then uploads gotest output to
# evergreen. The test name should correspond to a make target for
# that suite
name: test
commands:
- command: git.get_project
type: system
params:
directory: gopath/src/github.com/evergreen-ci/evergreen
- func: setup-credentials
- func: run-make
vars: { target: "${task_name}" }
- &run-go-test-suite-with-mongodb
# runs a make target above, but only on systems that have a
# running mongod started for testing.
name: test
commands:
- command: git.get_project
type: system
params:
directory: gopath/src/github.com/evergreen-ci/evergreen
- func: setup-credentials
- func: set-up-mongodb
- func: run-make
vars: { target: "${task_name}" }
#######################################
# Functions #
#######################################
functions:
run-make:
command: shell.exec
params:
script: |
set -o errexit
set -o verbose
# Configure a local go path for this build.
export GOPATH=`pwd`/gopath
cd gopath/src/github.com/evergreen-ci/evergreen
# configure path to the settings file
export SETTINGS_OVERRIDE=`pwd`/creds.yml
# on windows we need to turn the slashes the other way
if [ "Windows_NT" == "$OS" ]; then
export GOPATH=$(cygpath -m $GOPATH)
export SETTINGS_OVERRIDE=$(cygpath -m $SETTINGS_OVERRIDE)
fi
# Run make, called with proper environment variables set,
# running the target.
${build_env} make ${make_args|} vendor ${target}
setup-credentials:
- command: shell.exec
type: system
params:
silent: true
script: |
set -o errexit
echo "building creds file!"
cat > gopath/src/github.com/evergreen-ci/evergreen/creds.yml <<EOF
credentials: {
github: "${github_token}",
}
jira:
host: ${jiraserver}
username: ${crowduser}
password: ${crowdpw}
providers:
aws:
aws_id: "${aws_key}"
aws_secret: "${aws_secret}"
auth:
crowd:
username: ${crowduser}
password: ${crowdpw}
urlroot: ${crowdserver}
plugins:
manifest:
github_token: "${github_token}"
EOF
set-up-mongodb:
- command: shell.exec
type: system
params:
script: |
set -o errexit
set -o verbose
rm -rf mongodb
mkdir mongodb
cd mongodb
curl ${mongodb_url} -o mongodb${archiveExt|.tgz}
${decompress} mongodb${archiveExt|.tgz}
chmod +x ./mongodb-*/bin/*
mv ./mongodb-*/bin/* .
rm -rf db_files
rm -rf db_logs
mkdir db_files
mkdir db_logs
- command: shell.exec
type: system
params:
background: true
script: |
set -o errexit
set -o verbose
cd mongodb
echo "starting mongod..."
./mongod${extension|} --dbpath ./db_files &
echo "waiting for mongod to start up"
- command: shell.exec
type: system
params:
script: |
set -o errexit
set -o verbose
cd mongodb
./mongo${extension|} --nodb --eval 'assert.soon(function(x){try{var d = new Mongo("localhost:27017"); return true}catch(e){return false}}, "timed out connecting")'
echo "mongod is up."
#######################################
# Tasks #
#######################################
tasks:
- name: coverage
tags: [ "report" ]
commands:
- command: git.get_project
type: system
params:
directory: gopath/src/github.com/evergreen-ci/evergreen
- func: setup-credentials
- func: set-up-mongodb
- func: run-make
vars:
target: "coverage-html || true"
make_args: "-k"
- name: lint
tags: [ "report" ]
commands:
- command: git.get_project
type: system
params:
directory: gopath/src/github.com/evergreen-ci/evergreen
- func: run-make
vars: { target: "${task_name}" }
make_args: "-k"
- <<: *run-build
name: dist
- <<: *run-build
name: dist-race
- <<: *run-go-test-suite
tags: ["nodb", "test"]
name: test-hostutil
- <<: *run-go-test-suite
tags: ["nodb", "test"]
name: test-remote
- <<: *run-go-test-suite
tags: ["nodb", "test"]
name: test-auth
- <<: *run-go-test-suite
tags: ["nodb", "test"]
name: test-apiv3-route
- <<: *run-go-test-suite
tags: ["nodb", "test"]
name: test-apiv3-model
- <<: *run-go-test-suite
tags: ["nodb", "test", "agent"]
name: test-command
- <<: *run-go-test-suite
tags: ["nodb", "test"]
name: test-db-bsonutil
- <<: *run-go-test-suite
tags: ["nodb", "test", "agent"]
name: test-agent-comm
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test", "agent"]
name: test-agent
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test"]
name: test-apiv3-servicecontext
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test", "cli"]
name: test-cli
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test"]
name: test-db
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test"]
name: test-cloud-providers
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test"]
name: test-cloud-providers-ec2
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test"]
name: test-hostinit
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test"]
name: test-repotracker
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test"]
name: test-scheduler
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test"]
name: test-service
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test"]
name: test-monitor
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test"]
name: test-taskrunner
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test"]
name: test-evergreen
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test"]
name: test-notify
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test"]
name: test-alerts
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test"]
name: test-thirdparty
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test", "agent"]
name: test-util
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test", "agent"]
name: test-archive
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test"]
name: test-validator
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test"]
name: test-model
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test"]
name: test-model-patch
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test"]
name: test-model-artifact
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test"]
name: test-model-host
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test"]
name: test-model-build
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test"]
name: test-model-event
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test"]
name: test-model-task
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test", "agent"]
name: test-plugin
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test", "agent"]
name: test-plugin-builtin-git
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test", "agent"]
name: test-plugin-builtin-gotest
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test", "agent"]
name: test-plugin-builtin-attach
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test", "agent"]
name: test-plugin-builtin-attach-xunit
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test", "agent"]
name: test-plugin-builtin-manifest
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test", "agent"]
name: test-plugin-builtin-shell
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test", "agent"]
name: test-plugin-builtin-s3copy
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test", "agent"]
name: test-plugin-builtin-expansions
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test", "agent"]
name: test-plugin-builtin-s3
- <<: *run-go-test-suite
tags: ["nodb", "race"]
name: race-hostutil
- <<: *run-go-test-suite
tags: ["nodb", "race"]
name: race-remote
- <<: *run-go-test-suite
tags: ["nodb", "race"]
name: race-auth
- <<: *run-go-test-suite
tags: ["nodb", "race", "agent"]
name: race-command
- <<: *run-go-test-suite
tags: ["nodb", "race"]
name: race-db-bsonutil
- <<: *run-go-test-suite
tags: ["nodb", "race", "agent"]
name: race-agent-comm
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "race", "cli"]
name: race-cli
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "race", "agent"]
name: race-agent
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "race"]
name: race-db
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "race"]
name: race-cloud-providers
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "race"]
name: race-cloud-providers-ec2
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "race"]
name: race-repotracker
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "race"]
name: race-scheduler
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "race"]
name: race-service
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "race"]
name: race-monitor
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "race"]
name: race-taskrunner
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "race"]
name: race-evergreen
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "race"]
name: race-notify
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "race"]
name: race-alerts
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "race"]
name: race-thirdparty
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "race", "agent"]
name: race-util
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "race", "agent"]
name: race-archive
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "race"]
name: race-validator
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "race"]
name: race-model
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "race"]
name: race-model-patch
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "race"]
name: race-model-artifact
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "race"]
name: race-model-host
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "race"]
name: race-model-build
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "race"]
name: race-model-event
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "race"]
name: race-model-task
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "race", "agent"]
name: race-plugin
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "race", "agent"]
name: race-plugin-builtin-git
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "race", "agent"]
name: race-plugin-builtin-gotest
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "race", "agent"]
name: race-plugin-builtin-attach
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "race", "agent"]
name: race-plugin-builtin-attach-xunit
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "race", "agent"]
name: race-plugin-builtin-manifest
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "race", "agent"]
name: race-plugin-builtin-shell
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "race", "agent"]
name: race-plugin-builtin-s3copy
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "race", "agent"]
name: race-plugin-builtin-expansions
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "race", "agent"]
name: race-plugin-builtin-s3
buildvariants:
- name: ubuntu1604
display_name: Ubuntu 16.04
run_on:
- ubuntu1604-test
- ubuntu1604-build
expansions:
build_env: "GOROOT=/opt/go DISABLE_COVERAGE=yes EVERGREEN_ALL=true"
mongodb_url: https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1604-3.2.9.tgz
tasks:
- name: "dist"
- name: ".test"
- name: race-detector
display_name: Race Detector
run_on:
- archlinux-test
- archlinux-build
expansions:
build_env: "EVERGREEN_ALL=true"
mongodb_url: http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.2.9.tgz
tasks:
- name: "dist-race"
- name: ".race"
- name: ".report"
- name: osx
display_name: OSX
run_on:
- osx-1010
expansions:
build_env: "EVERGREEN_ALL=true DISABLE_COVERAGE=yes"
mongodb_url: https://fastdl.mongodb.org/osx/mongodb-osx-x86_64-3.2.9.tgz
tasks:
- name: "dist"
- name: ".test"
- name: windows
display_name: Windows
run_on:
- windows-64-vs2010-compile
- windows-64-vs2010-test
- windows-64-vs2013-compile
- windows-64-vs2013-test
- windows-64-vs2015-compile
- windows-64-vs2015-large
- windows-64-vs2015-small
- windows-64-vs2015-test
expansions:
build_env: "GOROOT=c:/go DISABLE_COVERAGE=yes"
mongodb_url: https://fastdl.mongodb.org/win32/mongodb-win32-x86_64-2008plus-3.2.9.zip
extension: ".exe"
archiveExt: ".zip"
tasks:
- name: "dist"
- name: ".nodb .test"
- name: ".agent .test"
- name: ".cli .test"
- name: rhel62-gccgo
display_name: RHEL 6.2 (gccgo)
run_on:
- rhel62-test
- rhel62-small
expansions:
mongodb_url: https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-rhel62-3.2.9.tgz
build_env: "PATH=/opt/mongodbtoolchain/v2/bin:$PATH DISABLE_COVERAGE=yes"
tasks:
- name: ".test"
- name: rhel71-power
display_name: "RHEL7.1 POWER8"
run_on:
- rhel71-power8-test
expansions:
build_env: "PATH=/opt/mongodbtoolchain/v2/bin:$PATH DISABLE_COVERAGE=yes"
mongodb_url: http://downloads.10gen.com/linux/mongodb-linux-ppc64le-enterprise-rhel71-3.3.12.tgz
tasks:
- name: ".nodb .test"
- name: ".agent .test"
- name: ".cli .test"
- name: rhel71-s390x
display_name: "RHEL7.1 s390x"
run_on:
- rhel72-zseries-test
expansions:
build_env: "PATH=/opt/mongodbtoolchain/v2/bin:$PATH DISABLE_COVERAGE=yes"
mongodb_url: http://downloads.10gen.com/linux/mongodb-linux-s390x-enterprise-rhel72-3.3.12.tgz
tasks:
- name: ".nodb .test"
- name: ".agent .test"
- name: ".cli .test"
- name: ubuntu1604-arm64
display_name: "Ubuntu 16.04 arm64"
run_on:
- ubuntu1604-arm64-small
expansions:
build_env: "PATH=/opt/mongodbtoolchain/v2/bin:$PATH DISABLE_COVERAGE=yes"
mongodb_url: http://downloads.10gen.com/linux/mongodb-linux-arm64-enterprise-ubuntu1604-3.3.12.tgz
tasks:
- name: ".nodb .test"
- name: ".agent .test"
- name: ".cli .test"