forked from evergreen-ci/evergreen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathself-tests.yml
701 lines (684 loc) · 20.4 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
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
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
- ".github/*" # github CODEOWNERS configuration
post:
- func: attach-test-results
- 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:
- func: get-project
- 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:
- func: get-project
- func: setup-credentials
- func: run-make
vars:
target: revendor
- func: run-make
vars: { target: "${task_name}" }
- &run-go-test-suite-with-docker
name: test
commands:
- func: get-project
- func: setup-credentials
- func: setup-mongodb
- func: setup-docker-host
- func: run-make
vars:
target: revendor
- 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:
- func: get-project
- func: setup-credentials
- func: setup-mongodb
- func: run-make
vars:
target: revendor
- func: run-make
vars: { target: "${task_name}" }
- &run-go-test-suite-with-mongodb-useast
# runs a make target above, but only on systems that have a
# running mongod started for testing.
name: test
commands:
- func: get-project
- func: setup-credentials
- func: setup-mongodb
- func: run-make
vars:
target: revendor
- func: run-make
vars: { target: "${task_name}", tz: "America/New_York" }
- &run-smoke-test
name: smoke
commands:
- command: timeout.update
params:
exec_timeout_secs: 900
timeout_secs: 900
- func: get-project
- func: setup-mongodb
- func: run-make
vars: { target: "set-var" }
- func: run-make
vars: { target: "set-project-var" }
- func: run-make
vars: { target: "load-smoke-data" }
- command: subprocess.exec
params:
silent: true
working_dir: gopath/src/github.com/evergreen-ci/evergreen
command: bash scripts/setup-smoke-config.sh ${github_token}
- func: run-make
vars:
target: set-smoke-vars
- func: run-make
vars:
target: "${task_name}"
- &run-smoke-test-with-client-url
name: smoke
commands:
- command: timeout.update
params:
exec_timeout_secs: 900
timeout_secs: 900
- func: get-project
- func: run-make
vars: { target: "cli" }
- command: s3.put
type: system
params:
aws_key: ${aws_key}
aws_secret: ${aws_secret}
local_file: gopath/src/github.com/evergreen-ci/evergreen/clients/${goos}_${goarch}/evergreen
remote_file: evergreen/${task_id}/evergreen-ci/evergreen/clients/${goos}_${goarch}/evergreen
bucket: mciuploads
content_type: application/octet-stream
permissions: public-read
display_name: evergreen
- func: setup-mongodb
- func: run-make
vars: { target: "set-var" }
- func: run-make
vars: { target: "set-project-var" }
- func: run-make
vars: { target: "load-smoke-data" }
- command: subprocess.exec
params:
silent: true
working_dir: gopath/src/github.com/evergreen-ci/evergreen
command: bash scripts/setup-smoke-config.sh ${github_token}
- func: run-make
vars:
target: set-smoke-vars
- func: run-make
vars:
target: "${task_name}"
- &version-constants
nodejs_version: "6.11.1"
- &run-generate-lint
name: generate-lint
commands:
- func: get-project
- func: run-make
vars: { target: "${task_name}" }
- command: s3.put
type: system
params:
aws_key: ${aws_key}
aws_secret: ${aws_secret}
local_file: gopath/src/github.com/evergreen-ci/evergreen/bin/generate-lint.json
remote_file: evergreen/${build_id}-${build_variant}/bin/generate-lint.json
bucket: mciuploads
content_type: application/json
permissions: public-read
display_name: generate-lint.json
- command: generate.tasks
params:
files:
- gopath/src/github.com/evergreen-ci/evergreen/bin/generate-lint.json
#######################################
# Functions #
#######################################
functions:
get-project:
command: git.get_project
type: setup
params:
directory: gopath/src/github.com/evergreen-ci/evergreen
token: ${github_token}
shallow_clone: true
run-make:
command: subprocess.exec
params:
working_dir: gopath/src/github.com/evergreen-ci/evergreen
binary: make
args: ["${make_args|}", "${target}"]
env:
AWS_KEY: ${aws_key}
AWS_SECRET: ${aws_secret}
CLIENT_URL: https://s3.amazonaws.com/mciuploads/evergreen/${task_id}/evergreen-ci/evergreen/clients/${goos}_${goarch}/evergreen
DEBUG_ENABLED: ${debug}
DISABLE_COVERAGE: ${disable_coverage}
DOCKER_HOST: ${docker_host}
EVERGREEN_ALL: "true"
GOARCH: ${goarch}
GO_BIN_PATH: ${gobin}
LEGACY_GO_BIN_PATH: ${legacyGobin}
GOOS: ${goos}
GOPATH: ${workdir}/gopath
GOROOT: ${goroot}
IS_DOCKER: ${is_docker}
KARMA_REPORTER: junit
NODE_BIN_PATH: ${nodebin}
RACE_DETECTOR: ${race_detector}
SETTINGS_OVERRIDE: creds.yml
SMOKE_TEST_FILE: ${smoke_test_file}
TEST_TIMEOUT: ${test_timeout}
TZ: ${tz}
VENDOR_PKG: "github.com/${trigger_repo_owner}/${trigger_repo_name}"
VENDOR_REVISION: ${trigger_revision}
XC_BUILD: ${xc_build}
setup-credentials:
command: subprocess.exec
type: setup
params:
silent: true
working_dir: gopath/src/github.com/evergreen-ci/evergreen
env:
GITHUB_TOKEN: ${github_token}
JIRA_SERVER: ${jiraserver}
CROWD_SERVER: ${crowdserver}
CROWD_USER: ${crowduser}
CROWD_PW: ${crowdpw}
AWS_KEY: ${aws_key}
AWS_SECRET: ${aws_secret}
command: bash scripts/setup-credentials.sh
setup-mongodb:
- command: subprocess.exec
type: setup
params:
env:
gobin: /opt/golang/go1.9/bin/go
MONGODB_URL: ${mongodb_url}
DECOMPRESS: ${decompress}
working_dir: gopath/src/github.com/evergreen-ci/evergreen/
command: make get-mongodb
- command: subprocess.exec
type: setup
params:
background: true
working_dir: gopath/src/github.com/evergreen-ci/evergreen/
command: make start-mongod
- command: subprocess.exec
type: setup
params:
working_dir: gopath/src/github.com/evergreen-ci/evergreen
command: make check-mongod
- command: subprocess.exec
type: setup
params:
working_dir: gopath/src/github.com/evergreen-ci/evergreen/
command: make init-rs
setup_docker:
- command: shell.exec
params:
shell: bash
script: |
gopath/src/github.com/evergreen-ci/evergreen/scripts/setup-docker.sh
setup-docker-host:
- command: host.create
type: setup
params:
distro: archlinux-parent
provider: ec2
retries: 3
scope: build
security_group_ids:
- sg-097bff6dd0d1d31d0
- command: host.list
type: setup
params:
wait: true
timeout_seconds: 900
num_hosts: 1
path: gopath/src/github.com/evergreen-ci/evergreen/spawned_hosts.json
- command: subprocess.exec
type: setup
params:
working_dir: gopath/src/github.com/evergreen-ci/evergreen
command: make parse-host-file
env:
HOST_FILE: spawned_hosts.json
GO_BIN_PATH: ${gobin}
GOROOT: ${goroot}
- command: expansions.update
params:
file: gopath/src/github.com/evergreen-ci/evergreen/bin/expansions.yml
attach-test-results:
- command: gotest.parse_files
type: system
params:
files:
- "gopath/src/github.com/evergreen-ci/evergreen/bin/output.*"
- command: attach.xunit_results
type: system
params:
files:
- "gopath/src/github.com/evergreen-ci/evergreen/bin/jstests/*.xml"
remove-test-results:
- command: shell.exec
type: system
params:
shell: bash
script: |
set -o xtrace
rm gopath/src/github.com/evergreen-ci/evergreen/bin/output.*
rm gopath/src/github.com/evergreen-ci/evergreen/bin/jstests/*.xml
#######################################
# Tasks #
#######################################
tasks:
- name: coverage
tags: ["report"]
commands:
- command: git.get_project
type: setup
params:
directory: gopath/src/github.com/evergreen-ci/evergreen
token: ${github_token}
shallow_clone: false
- func: setup-credentials
- func: setup-mongodb
- func: run-make
vars:
target: "coverage-html"
make_args: "-k"
tz: "America/New_York"
- <<: *run-smoke-test
name: smoke-test-task
tags: ["smoke"]
- <<: *run-smoke-test
name: smoke-test-endpoints
tags: ["smoke"]
- <<: *run-smoke-test-with-client-url
name: smoke-test-agent-monitor
tags: ["smoke"]
- <<: *run-generate-lint
- <<: *run-go-test-suite
name: js-test
- <<: *run-build
name: dist
- <<: *run-go-test-suite
tags: ["nodb", "test", "agent"]
name: test-thirdparty-docker
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test"]
name: test-auth
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test"]
name: test-rest-route
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test", "agent"]
name: test-rest-client
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test"]
name: test-rest-model
- <<: *run-go-test-suite-with-mongodb
tags: ["test", "db", "agent"]
name: test-command
- <<: *run-go-test-suite-with-mongodb
tags: ["test", "db"]
name: test-units
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test", "agent"]
name: test-agent
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test"]
name: test-rest-data
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test", "cli"]
name: test-operations
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test"]
name: test-db
- <<: *run-go-test-suite-with-docker
tags: ["db", "test"]
name: test-cloud
- <<: *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-evergreen
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test", "agent"]
name: test-thirdparty
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test"]
name: test-trigger
- <<: *run-go-test-suite-with-mongodb
tags: ["nodb", "test", "agent"]
name: test-util
- <<: *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-alertrecord
- <<: *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-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-host
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test"]
name: test-model-notification
- <<: *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-stats
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test"]
name: test-model-task
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test"]
name: test-model-testresult
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test"]
name: test-model-user
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test"]
name: test-model-distro
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test"]
name: test-model-commitqueue
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test"]
name: test-model-manifest
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test"]
name: test-plugin
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test"]
name: test-migrations
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test"]
name: test-model-grid
- <<: *run-go-test-suite-with-mongodb-useast
tags: ["db", "test"]
name: test-graphql
- name: docker-cleanup
commands:
- func: get-project
- func: setup-credentials
- func: setup_docker
- func: run-make
vars:
target: revendor
- func: run-make
vars: { target: "test-thirdparty-docker" }
- name: test-repotracker
tags: ["db", "test"]
commands:
- command: git.get_project
type: setup
params:
directory: gopath/src/github.com/evergreen-ci/evergreen
token: ${github_token}
shallow_clone: false
- func: setup-credentials
- func: setup-mongodb
- func: run-make
vars:
target: revendor
- func: run-make
vars: { target: "test-repotracker" }
buildvariants:
- name: ubuntu1604
display_name: Ubuntu 16.04
run_on:
- ubuntu1604-test
- ubuntu1604-build
expansions:
disable_coverage: yes
goos: linux
goarch: amd64
nodebin: /opt/node/bin
gobin: /opt/golang/go1.13/bin/go
goroot: /opt/golang/go1.13
legacyGobin: /opt/golang/go1.9/bin/go
mongodb_url: https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1604-4.0.3.tgz
tasks:
- name: "dist"
- name: ".smoke"
- name: ".test"
- name: "js-test"
- name: ubuntu1604-docker
display_name: Ubuntu 16.04 (Docker)
run_on:
- ubuntu1604-container
expansions:
goos: linux
goarch: amd64
gobin: /opt/golang/go1.13/bin/go
goroot: /opt/golang/go1.13
legacyGobin: /opt/golang/go1.9/bin/go
mongodb_url: https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-4.0.3.tgz
test_timeout: 15m
nodebin: /opt/node/bin
is_docker: "true"
tasks:
- name: "dist"
- name: ".smoke"
- name: ".test"
- name: race-detector
display_name: Race Detector
run_on:
- archlinux-test
- archlinux-build
expansions:
gobin: /opt/golang/go1.13/bin/go
goroot: /opt/golang/go1.13
legacyGobin: /opt/golang/go1.9/bin/go
mongodb_url: https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-4.0.3.tgz
race_detector: true
test_timeout: 15m
tasks:
- name: ".test"
- name: lint
display_name: Lint
run_on:
- archlinux-test
- archlinux-build
expansions:
gobin: /opt/golang/go1.13/bin/go
goroot: /opt/golang/go1.13
legacyGobin: /opt/golang/go1.9/bin/go
tasks:
- name: generate-lint
- name: coverage
display_name: Coverage
run_on:
- archlinux-test
- archlinux-build
expansions:
gobin: /opt/golang/go1.13/bin/go
goroot: /opt/golang/go1.13
legacyGobin: /opt/golang/go1.9/bin/go
mongodb_url: https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-4.0.3.tgz
test_timeout: 15m
tasks:
- name: ".report"
stepback: false
- name: osx
display_name: OSX
batchtime: 2880
run_on:
- macos-1014
expansions:
disable_coverage: yes
gobin: /opt/golang/go1.13/bin/go
goroot: /opt/golang/go1.13
legacyGobin: /opt/golang/go1.9/bin/go
mongodb_url: https://fastdl.mongodb.org/osx/mongodb-osx-ssl-x86_64-4.0.3.tgz
tasks:
- name: "dist"
- name: ".test"
- name: windows
display_name: Windows
run_on:
- windows-64-vs2015-small
- windows-64-vs2015-test
- windows-64-vs2015-small
- windows-64-vs2015-large
- windows-64-vs2015-compile
- windows-64-vs2013-test
- windows-64-vs2013-compile
- windows-64-vs2017-test
- windows-64-vs2017-compile
expansions:
disable_coverage: yes
gobin: /cygdrive/c/golang/go1.11/bin/go
goroot: c:/golang/go1.11
legacyGobin: /cygdrive/c/golang/go1.9/bin/go
mongodb_url: https://fastdl.mongodb.org/win32/mongodb-win32-x86_64-2008plus-ssl-4.0.3.zip
extension: ".exe"
archiveExt: ".zip"
tasks:
- name: ".agent .test"
- name: ".cli .test"
- name: rhel71-power8
display_name: RHEL 7.1 POWER8
batchtime: 2880
run_on:
- rhel71-power8-test
expansions:
disable_coverage: yes
xc_build: yes
goarch: ppc64le
gobin: /opt/golang/go1.13/bin/go
legacyGobin: /opt/golang/go1.9/bin/go
goos: linux
goroot: /opt/golang/go1.13
mongodb_url: https://downloads.mongodb.com/linux/mongodb-linux-ppc64le-enterprise-rhel71-4.0.3.tgz
tasks:
- name: ".agent .test"
- name: rhel72-s390x
display_name: RHEL 7.2 zLinux
batchtime: 2880
run_on:
- rhel72-zseries-test
expansions:
xc_build: yes
disable_coverage: yes
goarch: s390x
gobin: /opt/golang/go1.11/bin/go
goroot: /opt/golang/go1.11
legacyGobin: /opt/golang/go1.9/bin/go
goos: linux
# No official release of 4.0 for rhel72 zseries
mongodb_url: https://downloads.mongodb.com/linux/mongodb-linux-s390x-enterprise-rhel72-3.6.4.tgz
tasks:
- name: ".agent .test"
- name: ubuntu1604-arm64
display_name: Ubuntu 16.04 ARM
batchtime: 2880
run_on:
- ubuntu1604-arm64-small
expansions:
disable_coverage: yes
xc_build: yes
goarch: arm64
goos: linux
gobin: /opt/golang/go1.13/bin/go
goroot: /opt/golang/go1.13
legacyGobin: /opt/golang/go1.9/bin/go
mongodb_url: https://downloads.mongodb.com/linux/mongodb-linux-arm64-enterprise-ubuntu1604-4.0.3.tgz
tasks:
- name: ".agent .test"
- name: linux-docker
display_name: ArchLinux (Docker)
run_on:
- archlinux-test
expansions:
goos: linux
goarch: amd64
tasks:
- name: "docker-cleanup"