-
Notifications
You must be signed in to change notification settings - Fork 126
/
self-tests.yml
930 lines (898 loc) · 27.5 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
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
command_type: test
stepback: true
ignore:
- "*.md" # don't schedule tests if a commit only changes markdown files
- "*.mdx"
- ".github/*" # github CODEOWNERS configuration
pre_error_fails_task: true
pre:
- func: assume-role
post:
- func: attach-test-results
- command: s3.put
display_name: Upload smoke test's app server logs to S3
type: system
params:
aws_key: ${AWS_ACCESS_KEY_ID}
aws_secret: ${AWS_SECRET_ACCESS_KEY}
aws_session_token: ${AWS_SESSION_TOKEN}
local_file: evergreen/app_server.log
remote_file: evergreen/${task_id}/app_server.log
bucket: mciuploads
content_type: text/plain
permissions: private
display_name: Evergreen smoke test application server logs
- command: s3.put
display_name: Upload smoke test agent logs to S3
type: system
params:
aws_key: ${AWS_ACCESS_KEY_ID}
aws_secret: ${AWS_SECRET_ACCESS_KEY}
aws_session_token: ${AWS_SESSION_TOKEN}
local_files_include_filter: evergreen/smoke*.log
remote_file: evergreen/${task_id}/
bucket: mciuploads
content_type: text/plain
permissions: private
display_name: (Evergreen smoke test agent logs)
#######################################
# YAML Templates #
#######################################
variables:
- &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
must_have_test_results: true
commands:
- func: get-project-and-modules
- func: setup-credentials
- func: run-make
vars: { target: "${task_name}" }
- &run-go-test-suite-with-docker
name: test
must_have_test_results: true
commands:
- func: get-project-and-modules
- func: setup-credentials
- func: setup-mongodb
- func: setup-docker-host
- 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
must_have_test_results: true
commands:
- func: get-project-and-modules
- func: setup-credentials
- func: setup-mongodb
- 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
must_have_test_results: true
commands:
- func: get-project-and-modules
- func: setup-credentials
- func: setup-mongodb
- func: run-make
vars: { target: "${task_name}", tz: "America/New_York" }
- &run-smoke-test
name: smoke
must_have_test_results: true
commands:
- command: timeout.update
params:
exec_timeout_secs: 900
timeout_secs: 900
- func: get-project-and-modules
- func: setup-mongodb
- func: setup-credentials
- func: run-make
vars: { target: "load-smoke-data" }
- command: github.generate_token
params:
expansion_name: github_token
- command: subprocess.exec
params:
silent: true
working_dir: evergreen
env:
GITHUB_APP_ID: ${staging_github_app_id}
GITHUB_APP_KEY: ${staging_github_app_key}
command: bash scripts/setup-smoke-config.sh
- func: run-make
vars: { target: "set-smoke-vars" }
- func: run-make
vars: { target: "set-smoke-git-config" }
- func: run-make
vars: { target: "${task_name}" }
- &run-generate-lint
name: generate-lint
commands:
- func: get-project-and-modules
- func: run-make
vars: { target: "${task_name}" }
- command: s3.put
type: system
params:
aws_key: ${AWS_ACCESS_KEY_ID}
aws_secret: ${AWS_SECRET_ACCESS_KEY}
aws_session_token: ${AWS_SESSION_TOKEN}
local_file: 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:
- evergreen/bin/generate-lint.json
- &build-and-push-client
name: build-and-push-client
commands:
- func: get-project-and-modules
- func: run-make
vars: { target: "${task_name}" }
- func: assume-role
vars:
assume_role_arn: ${client_assume_role_arn}
- command: s3.put
params:
aws_key: ${AWS_ACCESS_KEY_ID}
aws_secret: ${AWS_SECRET_ACCESS_KEY}
aws_session_token: ${AWS_SESSION_TOKEN}
local_files_include_filter_prefix: evergreen/clients
local_files_include_filter: "*_*/evergreen*"
remote_file: evergreen/clients/${version_id}/
content_type: binary/octet-stream
bucket: evg-bucket-evergreen
permissions: public-read
preserve_path: true
- &tar-and-push-static-assets
commands:
- func: get-project-and-modules
- func: run-make
vars: { target: "bin/static_assets.tgz" }
- func: assume-role
vars:
assume_role_arn: ${client_assume_role_arn}
- command: s3.put
params:
aws_key: ${AWS_ACCESS_KEY_ID}
aws_secret: ${AWS_SECRET_ACCESS_KEY}
aws_session_token: ${AWS_SESSION_TOKEN}
local_file: evergreen/bin/static_assets.tgz
remote_file: evergreen/clients/${version_id}/static_assets.tgz
content_type: application/gzip
bucket: evg-bucket-evergreen
permissions: public-read
#######################################
# Functions #
#######################################
functions:
get-project-and-modules:
- command: github.generate_token
params:
expansion_name: github_token
- command: git.get_project
type: setup
params:
directory: evergreen
token: ${github_token}
shallow_clone: true
- command: shell.exec
type: setup
params:
working_dir: evergreen
include_expansions_in_env: ["GOROOT"]
shell: bash
script: |
# Downloading modules is flaky in the ubuntu1604-arm64 distros, because the TCP connection is sometimes reset
# by the peer for unknown reasons (this does not happen in other distros). Retry the module download multiple
# times to reduce the flakiness.
for i in {1..5}; do
make mod-tidy;
[[ $? -eq 0 ]] && break;
done
assume-role:
command: ec2.assume_role
type: setup
params:
role_arn: ${assume_role_arn}
run-make:
command: subprocess.exec
params:
working_dir: evergreen
binary: make
args: ["${make_args|}", "${target}"]
include_expansions_in_env:
- GOROOT
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_SESSION_TOKEN
- MONGO_CREDS_FILE
- RUN_TEST
- RUN_EC2_SPECIFIC_TESTS
- IS_DOCKER
- task_id
- task_name
- execution
- version_id
- requester
- build_id
- build_variant
- project
- project_id
- distro_id
env:
DEBUG_ENABLED: ${debug}
DOCKER_HOST: ${docker_host}
EVERGREEN_ALL: "true"
GOARCH: ${goarch}
GOOS: ${goos}
KARMA_REPORTER: junit
NODE_BIN_PATH: ${nodebin}
RACE_DETECTOR: ${race_detector}
SETTINGS_OVERRIDE: creds.yml
TEST_TIMEOUT: ${test_timeout}
TZ: ${tz}
VENDOR_PKG: "github.com/${trigger_repo_owner}/${trigger_repo_name}"
VENDOR_REVISION: ${trigger_revision}
XC_BUILD: ${xc_build}
NOTARY_CLIENT_URL: ${notary_client_url}
NOTARY_SERVER_URL: ${notary_server_url}
MACOS_NOTARY_KEY: ${notary_server_id}
MACOS_NOTARY_SECRET: ${notary_server_secret}
EVERGREEN_BUNDLE_ID: ${evergreen_bundle_id}
OTEL_COLLECTOR_ENDPOINT: ${otel_collector_endpoint}
OTEL_TRACE_ID: ${otel_trace_id}
OTEL_PARENT_ID: ${otel_parent_id}
EVG_VERSION_ID: ${version_id}
EVG_CLIENT_S3_BUCKET: evg-bucket-evergreen
setup-credentials:
- command: github.generate_token
params:
expansion_name: github_token
- command: subprocess.exec
type: setup
params:
silent: true
working_dir: evergreen
env:
GITHUB_APP_ID: ${staging_github_app_id}
GITHUB_APP_KEY: ${staging_github_app_key}
JIRA_SERVER: ${jiraserver}
CROWD_SERVER: ${crowdserver}
PARSER_PROJECT_S3_PREFIX: ${task_id}/parser-projects
GENERATED_JSON_S3_PREFIX: ${task_id}/generated-json
JIRA_PRIVATE_KEY: ${jira_private_key}
JIRA_ACCESS_TOKEN: ${jira_access_token}
JIRA_TOKEN_SECRET: ${jira_token_secret}
JIRA_CONSUMER_KEY: ${jira_consumer_key}
PAPERTRAIL_KEY_ID: ${papertrail_key_id}
PAPERTRAIL_SECRET_KEY: ${papertrail_secret_key}
RUNTIME_ENVIRONMENTS_BASE_URL: ${staging_runtime_environments_base_url}
RUNTIME_ENVIRONMENTS_API_KEY: ${staging_runtime_environments_api_key}
command: bash scripts/setup-credentials.sh
setup-mongodb:
- command: subprocess.exec
type: setup
params:
env:
MONGODB_URL: ${mongodb_url}
MONGODB_DECOMPRESS: ${decompress}
working_dir: evergreen
command: make get-mongodb
- command: subprocess.exec
type: setup
params:
env:
MONGOSH_URL: ${mongosh_url}
MONGOSH_DECOMPRESS: ${mongosh_decompress|*decompress}
working_dir: evergreen
command: make get-mongosh
- command: subprocess.exec
type: setup
params:
background: true
working_dir: evergreen
command: make start-mongod
- command: subprocess.exec
type: setup
params:
working_dir: evergreen
command: make configure-mongod
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: evergreen/spawned_hosts.json
- command: subprocess.exec
type: setup
params:
working_dir: evergreen
command: make parse-host-file
include_expansions_in_env: ["GOROOT"]
env:
HOST_FILE: spawned_hosts.json
- command: expansions.update
params:
file: evergreen/bin/expansions.yml
verify-agent-version-update:
- command: subprocess.exec
params:
working_dir: evergreen
binary: bash
args: ["scripts/verify-agent-version-update.sh"]
env:
BRANCH_NAME: ${branch_name}
verify-swaggo-fmt:
- command: subprocess.exec
params:
working_dir: evergreen
binary: bash
args: ["scripts/verify-swaggo-fmt.sh"]
env:
GOPATH: ${workdir}/gopath
check-go-vulnerabilities:
- command: subprocess.exec
params:
working_dir: evergreen
binary: bash
args: ["scripts/check-go-vulnerabilities.sh"]
env:
GOPATH: ${workdir}/gopath
include_expansions_in_env:
- GOROOT
verify-client-version-update:
- command: subprocess.exec
params:
working_dir: evergreen
binary: bash
args: ["scripts/verify-client-version-update.sh"]
env:
BRANCH_NAME: ${branch_name}
verify-merge-function-update:
- command: subprocess.exec
params:
working_dir: evergreen
binary: bash
args: ["scripts/verify-merge-function-update.sh"]
env:
BRANCH_NAME: ${branch_name}
attach-test-results:
- command: gotest.parse_files
type: system
params:
files:
- "evergreen/bin/output.*"
- command: attach.xunit_results
type: system
params:
files:
- "evergreen/bin/jstests/*.xml"
remove-test-results:
- command: shell.exec
type: system
params:
shell: bash
script: |
set -o xtrace
rm evergreen/bin/output.*
rm evergreen/bin/jstests/*.xml
write-downstream-expansions-for-pine:
- command: shell.exec
params:
script: |
touch downstream_expansions_pine.yaml
echo "pine_repo_name: evergreen" | tee downstream_expansions_pine.yaml
#######################################
# Tasks #
#######################################
tasks:
- <<: *run-smoke-test
name: test-smoke-internal-host
tags: ["smoke"]
- <<: *run-smoke-test
name: test-smoke-internal-container
tags: ["smoke"]
- <<: *run-smoke-test
name: test-smoke-internal-endpoint
tags: ["smoke"]
# The endpoint smoke test needs to check that the Evergreen CLI can be downloaded.
depends_on:
- name: build-linux_amd64
variant: build-and-push
- <<: *run-smoke-test
name: test-smoke-internal-agentmonitor
tags: ["smoke"]
# The agent monitor smoke test needs to download the Evergreen CLI for this OS/arch.
depends_on:
- name: build-linux_amd64
variant: build-and-push
- <<: *run-generate-lint
- <<: *run-go-test-suite
name: js-test
- <<: *run-go-test-suite
tags: ["nodb", "test"]
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"]
name: test-rest-client
- <<: *run-go-test-suite-with-mongodb
name: test-rest-model
tags: ["db", "test"]
- <<: *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", "agent"]
name: test-agent-internal
- <<: *run-go-test-suite
tags: ["nodb", "test", "agent"]
name: test-agent-internal-client
- <<: *run-go-test-suite
tags: ["nodb", "test", "agent"]
name: test-agent-internal-taskoutput
- <<: *run-go-test-suite
tags: ["nodb", "test", "agent"]
name: test-agent-util
- <<: *run-go-test-suite-with-mongodb
tags: ["test", "db", "agent"]
name: test-agent-command
- <<: *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"]
name: test-cloud
- <<: *run-go-test-suite-with-mongodb
tags: ["nodb", "test"]
name: test-cloud-parameterstore
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test"]
name: test-cloud-parameterstore-fakeparameter
- <<: *run-go-test-suite
tags: ["nodb", "test"]
name: test-cloud-userdata
- <<: *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-useast
tags: ["db", "test"]
name: test-service-graphql
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test"]
name: test-evergreen
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test"]
name: test-taskoutput
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test"]
name: test-thirdparty
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test"]
name: test-trigger
- <<: *run-go-test-suite
tags: ["nodb", "test"]
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-annotations
- <<: *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-githubapp
- <<: *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-parsley
- <<: *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-pod
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test"]
name: test-model-pod-definition
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test"]
name: test-model-pod-dispatcher
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test"]
name: test-model-taskstats
- <<: *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-cache
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test"]
name: test-model-manifest
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test"]
name: test-model-testlog
- <<: *run-go-test-suite-with-mongodb
tags: ["db", "test"]
name: test-plugin
- <<: *run-go-test-suite-with-mongodb-useast
tags: ["db", "test"]
name: test-graphql
- name: test-repotracker
tags: ["db", "test"]
commands:
- command: github.generate_token
params:
expansion_name: github_token
- command: git.get_project
type: setup
params:
directory: evergreen
token: ${github_token}
shallow_clone: false
- func: setup-credentials
- func: setup-mongodb
- func: run-make
vars: { target: "test-repotracker" }
- name: verify-swaggo-fmt
tags: ["linter"]
commands:
- func: get-project-and-modules
- command: subprocess.exec
params:
binary: make
args: ["swaggo-install"]
working_dir: evergreen
env:
GOPATH: ${workdir}/gopath
include_expansions_in_env:
- GOROOT
- func: verify-swaggo-fmt
- name: check-go-vulnerabilities
disable: true # TODO: re-enable in DEVPROD-5453
tags: ["linter"]
commands:
- func: get-project-and-modules
- command: subprocess.exec
params:
binary: make
args: ["govul-install"]
working_dir: evergreen
env:
GOPATH: ${workdir}/gopath
include_expansions_in_env:
- GOROOT
- func: check-go-vulnerabilities
- name: verify-agent-version-update
tags: ["linter"]
patch_only: true
commands:
- func: get-project-and-modules
- func: verify-agent-version-update
- name: verify-client-version-update
tags: ["linter"]
patch_only: true
commands:
- func: get-project-and-modules
- func: verify-client-version-update
- name: verify-mod-tidy
tags: ["linter"]
commands:
- command: github.generate_token
params:
expansion_name: github_token
- command: git.get_project
type: setup
params:
directory: evergreen
token: ${github_token}
- func: run-make
vars: { target: "${task_name}" }
- name: verify-merge-function-update
tags: ["linter"]
patch_only: true
commands:
- func: get-project-and-modules
- func: verify-merge-function-update
- name: generate-api-docs
commands:
- func: get-project-and-modules
- command: subprocess.exec
params:
binary: make
args: ["swaggo-install"]
working_dir: evergreen
env:
GOPATH: ${workdir}/gopath
include_expansions_in_env:
- GOROOT
- command: shell.exec
params:
shell: bash
working_dir: evergreen
env:
GOPATH: ${workdir}/gopath
script: |
set -o verbose
set -o errexit
$GOPATH/bin/swag init -g service/service.go
- command: s3.put
params:
aws_key: ${AWS_ACCESS_KEY_ID}
aws_secret: ${AWS_SECRET_ACCESS_KEY}
aws_session_token: ${AWS_SESSION_TOKEN}
local_file: evergreen/docs/swagger.json
remote_file: evergreen/${task_id}/${execution}/swagger.json
bucket: mciuploads
content_type: application/json
permissions: public-read
display_name: swagger.json
- command: s3.put
params:
aws_key: ${AWS_ACCESS_KEY_ID}
aws_secret: ${AWS_SECRET_ACCESS_KEY}
aws_session_token: ${AWS_SESSION_TOKEN}
local_file: evergreen/docs/swagger.json
remote_file: evergreen/latest/swagger.json
bucket: mciuploads
content_type: application/json
permissions: public-read
display_name: swagger.json (latest)
patchable: false
- name: write-downstream-expansions-for-pine
commands:
- func: write-downstream-expansions-for-pine
- command: downstream_expansions.set
params:
file: downstream_expansions_pine.yaml
- <<: *build-and-push-client
name: build-linux_amd64
tags: ["build"]
- <<: *build-and-push-client
name: build-linux_s390x
tags: ["build"]
- <<: *build-and-push-client
name: build-linux_arm64
tags: ["build"]
- <<: *build-and-push-client
name: build-linux_ppc64le
tags: ["build"]
- <<: *build-and-push-client
name: build-windows_amd64
tags: ["build"]
- <<: *build-and-push-client
name: build-darwin_amd64
tags: ["build"]
- <<: *build-and-push-client
name: build-darwin_arm64
tags: ["build"]
- <<: *tar-and-push-static-assets
name: tar-and-push-static-assets
tags: ["build"]
- <<: *build-and-push-client
name: build-linux-staging_amd64
tags: ["build-staging"]
- <<: *build-and-push-client
name: build-windows-staging_amd64
tags: ["build-staging"]
- <<: *tar-and-push-static-assets
name: tar-and-push-static-assets-staging
tags: ["build-staging"]
- <<: *build-and-push-client
name: build-darwin-unsigned_amd64
tags: ["build-unsigned"]
- <<: *build-and-push-client
name: build-darwin-unsigned_arm64
tags: ["build-unsigned"]
#######################################
# Buildvariants #
#######################################
buildvariants:
- name: ubuntu2204
display_name: Ubuntu 22.04
run_on:
- ubuntu2204-small
- ubuntu2204-large
expansions:
goos: linux
goarch: amd64
nodebin: /opt/node/bin
GOROOT: /opt/golang/go1.20
RUN_EC2_SPECIFIC_TESTS: true
mongodb_url: https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2204-8.0.0.tgz
mongosh_url: https://downloads.mongodb.com/compass/mongosh-2.0.2-linux-x64.tgz
notary_client_url: https://macos-notary-1628249594.s3.amazonaws.com/releases/client/v3.1.2/linux_amd64.zip
tasks:
- name: ".smoke"
- name: ".test"
- name: ".linter"
- name: test-cloud
- name: "js-test"
- name: generate-api-docs
- name: write-downstream-expansions-for-pine
- name: race-detector
display_name: Race Detector
run_on:
- ubuntu2204-small
- ubuntu2204-large
expansions:
GOROOT: /opt/golang/go1.20
RUN_EC2_SPECIFIC_TESTS: true
mongodb_url: https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2204-8.0.0.tgz
mongosh_url: https://downloads.mongodb.com/compass/mongosh-2.0.2-linux-x64.tgz
race_detector: true
test_timeout: 15m
tasks:
- name: ".test"
- name: ubuntu2004-container
display_name: Ubuntu 20.04 (Container)
run_on:
- evg-container
expansions:
goos: linux
goarch: amd64
IS_DOCKER: true
GOROOT: /usr/local/go
mongodb_url: https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2004-8.0.0.tgz
mongosh_url: https://downloads.mongodb.com/compass/mongosh-2.0.2-linux-x64.tgz
decompress: tar zxvf
tasks:
- name: ".smoke"
- name: lint
display_name: Lint
run_on:
- ubuntu2204-small
- ubuntu2204-large
expansions:
GOROOT: /opt/golang/go1.20
tasks:
- name: generate-lint
- name: windows
display_name: Windows
run_on:
- windows-vsCurrent-small
- windows-vsCurrent-large
expansions:
GOROOT: c:/golang/go1.20
RUN_EC2_SPECIFIC_TESTS: true
mongodb_url: https://fastdl.mongodb.org/windows/mongodb-windows-x86_64-8.0.0.zip
mongosh_url: https://downloads.mongodb.com/compass/mongosh-2.0.2-win32-x64.zip
extension: ".exe"
archiveExt: ".zip"
tasks:
- name: ".agent .test"
- name: ".cli .test"
- name: ubuntu2204-arm64
display_name: Ubuntu 22.04 ARM
batchtime: 2880
run_on:
- ubuntu2204-arm64-large
expansions:
xc_build: yes
goarch: arm64
goos: linux
GOROOT: /opt/golang/go1.20
RUN_EC2_SPECIFIC_TESTS: true
mongodb_url: https://fastdl.mongodb.org/linux/mongodb-linux-aarch64-ubuntu2204-8.0.0.tgz
mongosh_url: https://downloads.mongodb.com/compass/mongosh-2.0.2-linux-arm64.tgz
tasks:
- name: ".agent .test"
- name: osx
display_name: OSX
batchtime: 2880
run_on:
- macos-1100-arm64
expansions:
GOROOT: /opt/golang/go1.20
mongodb_url: https://fastdl.mongodb.org/osx/mongodb-macos-arm64-8.0.0.tgz
mongosh_url: https://downloads.mongodb.com/compass/mongosh-2.0.2-darwin-arm64.zip
mongosh_decompress: unzip
tasks:
- name: ".agent .test"
- name: ".cli .test"
- name: build-and-push
display_name: Build and Push
run_on:
- ubuntu2204-small
tasks:
- name: ".build"
- name: ".build-staging"
activate: false
- name: ".build-unsigned"
activate: false
expansions:
GOROOT: /opt/golang/go1.20
notary_client_url: https://macos-notary-1628249594.s3.amazonaws.com/releases/client/v3.1.2/linux_amd64.zip
display_tasks:
- name: build-and-push
execution_tasks:
- ".build"
- name: build-and-push-staging
execution_tasks:
- ".build-staging"
- name: build-and-push-darwin-unsigned
execution_tasks:
- ".build-unsigned"
containers:
- name: evg-container
working_dir: /
image: ${container_image}
resources:
cpu: 4096
memory_mb: 8192
system:
cpu_architecture: x86_64
operating_system: linux