-
Notifications
You must be signed in to change notification settings - Fork 384
Expand file tree
/
Copy pathcommon.yml
More file actions
3334 lines (3124 loc) · 94.8 KB
/
Copy pathcommon.yml
File metadata and controls
3334 lines (3124 loc) · 94.8 KB
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
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Support for mongodump+mongorestore passthrough tests.
include:
- filename: "mongodump_passthrough/globals.yml"
- filename: "mongodump_passthrough/parameters.yml"
- filename: "mongodump_passthrough/modules.yml"
- filename: "mongodump_passthrough/functions.yml"
- filename: "mongodump_passthrough/tasks.yml"
- filename: "mongodump_passthrough/variants.yml"
#######################################
# Tools Driver Config for MCI #
#######################################
# default command type
command_type: system
# 3 hour default timeout
exec_timeout_secs: 10800
# run the same task in the previous revision if the current task fails
stepback: true
variables:
# Common mongodb arguments
mongod_arguments:
default: &mongod_default_startup_args
mongod_args: ""
mongod_port: 33333
ssl: &mongod_ssl_startup_args
mongod_args:
"--sslMode requireSSL --sslCAFile common/db/testdata/ca-ia.pem --sslPEMKeyFile
common/db/testdata/test-server.pem"
replsettest_ssl_config:
'sslMode: "requireSSL",sslPEMKeyFile: "common/db/testdata/test-server.pem", sslCAFile:
"common/db/testdata/ca-ia.pem", sslAllowInvalidHostnames: ""'
mongod_port: 33333
tls: &mongod_tls_startup_args
mongod_args_tls:
"--tlsMode requireTLS --tlsCAFile common/db/testdata/ca-ia.pem --tlsCertificateKeyFile
common/db/testdata/test-server.pem"
replsettest_tls_config:
'tlsMode: "requireTLS",tlsCertificateKeyFile: "common/db/testdata/test-server.pem",
tlsCAFile: "common/db/testdata/ca-ia.pem", tlsAllowInvalidHostnames: ""'
mongod_port: 33333
mongo_arguments:
default: &mongo_default_startup_args
mongo_args: &mongo_default_startup_args_string "--port 33333"
mongod_port: 33333
ssl: &mongo_ssl_startup_args
mongo_args:
"--port 33333 --ssl --sslCAFile common/db/testdata/ca-ia.pem --sslPEMKeyFile
common/db/testdata/test-server.pem --sslAllowInvalidCertificates"
mongod_port: 33333
tls: &mongo_tls_startup_args
mongo_args_tls:
"--port 33333 --tls --tlsCAFile common/db/testdata/ca-ia.pem --tlsCertificateKeyFile
common/db/testdata/test-server.pem --tlsAllowInvalidCertificates"
mongod_port: 33333
# Used to determine load_libs_version for *-latest builds.
# Same as maxServerVersion supported in download_server.go
max_server_version: &max_server_version "9.0"
parameters:
- key: fake_tag_for_release_testing
description: |
This can be set to test tasks that require a tag without actually
triggering all of the release automation. Setting it will cause the
`EVG_TRIGGERED_BY_TAG` environment variable to be populated with this
parameter's value.
functions:
"install mise and go":
- command: cache.restore
params:
aws_key: ${aws_key}
aws_secret: ${aws_secret}
bucket: mciuploads
key_expansions:
- ${distro_arch}
- ${mise_and_go_cache_version}
key_files:
- src/github.com/mongodb/mongo-tools/mise.toml
- src/github.com/mongodb/mongo-tools/scripts/mise-version.txt
- src/github.com/mongodb/mongo-tools/scripts/install-mise-and-go.sh
name: mise-and-go
remote_path: mongo-tools/mise-cache
- command: shell.exec
params:
shell: bash
working_dir: src/github.com/mongodb/mongo-tools
env:
EVG_WORKDIR: ${workdir}
MISE_AND_GO_CACHE_HIT: ${mise_and_go_cache_hit}
script: |
set -o errexit
set -o pipefail
set -o verbose
./scripts/install-mise-and-go.sh
- command: cache.save
params:
aws_key: ${aws_key}
aws_secret: ${aws_secret}
bucket: mciuploads
key_expansions:
- ${distro_arch}
- ${mise_and_go_cache_version}
key_files:
- src/github.com/mongodb/mongo-tools/mise.toml
- src/github.com/mongodb/mongo-tools/scripts/mise-version.txt
- src/github.com/mongodb/mongo-tools/scripts/install-mise-and-go.sh
name: mise-and-go
paths:
- .local/bin
- .local/share/mise
remote_path: mongo-tools/mise-cache
# mise has no builds at all for ppc64le or s390x (see install-go-without-mise.sh), so there's
# nothing worth caching on those architectures: we don't touch .local/bin or .local/share/mise
# there. In most cases, we expect the Go toolchain version we need to already exist on the
# machine. But even in cases where we have to download our own Go toolchain, it's not enough work
# to be worth caching.
"install go without mise":
- command: shell.exec
params:
shell: bash
working_dir: src/github.com/mongodb/mongo-tools
env:
EVG_WORKDIR: ${workdir}
script: |
set -o errexit
set -o pipefail
set -o verbose
./scripts/install-go-without-mise.sh
"install mise-managed tools":
- command: cache.restore
params:
aws_key: ${aws_key}
aws_secret: ${aws_secret}
bucket: mciuploads
key_expansions:
- ${distro_arch}
- ${mise_and_go_cache_version}
- ${mise_all_tools_cache_version}
key_files:
- src/github.com/mongodb/mongo-tools/mise.toml
- src/github.com/mongodb/mongo-tools/scripts/mise-version.txt
- src/github.com/mongodb/mongo-tools/package.json
- src/github.com/mongodb/mongo-tools/scripts/install-mise-managed-tools.sh
name: mise-all-tools
remote_path: mongo-tools/mise-cache
- command: shell.exec
params:
shell: bash
working_dir: src/github.com/mongodb/mongo-tools
env:
EVG_WORKDIR: ${workdir}
MISE_ALL_TOOLS_CACHE_HIT: ${mise_all_tools_cache_hit}
script: |
set -o errexit
set -o pipefail
set -o verbose
./scripts/install-mise-managed-tools.sh
- command: cache.save
params:
aws_key: ${aws_key}
aws_secret: ${aws_secret}
bucket: mciuploads
key_expansions:
- ${distro_arch}
- ${mise_and_go_cache_version}
- ${mise_all_tools_cache_version}
key_files:
- src/github.com/mongodb/mongo-tools/mise.toml
- src/github.com/mongodb/mongo-tools/scripts/mise-version.txt
- src/github.com/mongodb/mongo-tools/package.json
- src/github.com/mongodb/mongo-tools/scripts/install-mise-managed-tools.sh
name: mise-all-tools
# We deliberately don't cache node_modules: Evergreen's cache.save dereferences symlinks
# when archiving, but npm creates node_modules/.bin/<tool> as a symlink into the package's
# own directory. After a cache.restore those become plain file copies sitting in the wrong
# place, breaking any tool that resolves paths relative to its own real location (e.g.
# `require("../package.json")`), so `npm install` always runs fresh instead.
paths:
- .local/bin
- .local/share/mise
remote_path: mongo-tools/mise-cache
"run legacy tests":
command: subprocess.exec
type: test
params:
# binary must be bash (with the script passed via args), not the script
# directly: Windows can't execute a shebang script as a native binary.
binary: bash
working_dir: src/github.com/mongodb/mongo-tools
args:
- "./scripts/run-legacy-tests.sh"
env:
LOAD_LIBS_VERSION: ${load_libs_version}
TEST_PATH: ${test_path}
"run qa-tests":
command: subprocess.exec
params:
binary: bash
working_dir: src/github.com/mongodb/mongo-tools
args:
- "./scripts/run_qa.sh"
add_expansions_to_env: true
"run native-cert-ssl":
command: subprocess.exec
params:
binary: bash
working_dir: src/github.com/mongodb/mongo-tools
args:
- "./scripts/run_native_cert_ssl.sh"
add_expansions_to_env: true
"run make target":
- command: subprocess.exec
type: test
params:
# binary must be bash (with the script passed via args), not the script
# directly: Windows can't execute a shebang script as a native binary.
binary: bash
working_dir: src/github.com/mongodb/mongo-tools
args:
- "./scripts/run-make-target.sh"
env:
EVG_BUILD_VARIANT: ${build_variant}
EVG_PLATFORM: ${_platform}
EVG_WORKDIR: ${workdir}
TARGET: ${target}
TOOLS_TESTING_AUTH_PASSWORD: ${auth_password}
TOOLS_TESTING_AUTH_USERNAME: ${auth_username}
TOOLS_TESTING_PKCS8_PASSWORD: ${pkcs8_password}
"download mongod and shell":
- command: github.generate_token
params:
owner: 10gen
repo: mongo-release
expansion_name: generated_token_mongo_release
permissions:
contents: read
- command: subprocess.exec
params:
# binary must be bash (with the script passed via args), not the script
# directly: Windows can't execute a shebang script as a native binary.
binary: bash
working_dir: src/github.com/mongodb/mongo-tools
args:
- "./scripts/download-mongod-and-shell.sh"
env:
AWS_ACCESS_KEY_ID: ${cdn_aws_access_key_id}
AWS_SECRET_ACCESS_KEY: ${cdn_aws_secret}
EVG_BUILD_ID: ${build_id}
EVG_IS_PATCH: ${is_patch}
EVG_KEY: ${evg_key}
EVG_TRIGGERED_BY_TAG: ${triggered_by_git_tag}
EVG_USER: ${evg_user}
EVG_VARIANT: ${build_variant}
EVG_VERSION: ${version_id}
EVG_WORKDIR: ${workdir}
FAKE_TAG_FOR_RELEASE_TESTING: ${fake_tag_for_release_testing}
MONGO_VERSION: ${mongo_version}
PLATFORM_OVERRIDE: ${_platform}
generated_token_mongo_release: ${generated_token_mongo_release}
"get buildnumber":
command: keyval.inc
params:
key: "${build_variant}_tools"
destination: "builder_num"
"setup integration test":
command: subprocess.exec
params:
# binary must be bash (with the script passed via args), not the script
# directly: Windows can't execute a shebang script as a native binary.
binary: bash
working_dir: src/github.com/mongodb/mongo-tools
# Set up Kerberos stuff: run kinit if necessary, and add KDC to registry
# on Windows (see https://wiki.mongodb.com/display/DH/Testing+Kerberos)
args:
- "./scripts/setup-integration-test.sh"
env:
KERBEROS_KEYTAB: ${kerberos_keytab}
RUN_KINIT: ${run_kinit}
"setup credentials":
command: subprocess.exec
params:
# binary must be bash (with the script passed via args), not the script
# directly: Windows can't execute a shebang script as a native binary.
binary: bash
working_dir: src/github.com/mongodb/mongo-tools
silent: true
args:
- "./scripts/setup-credentials.sh"
env:
BUILDER_NUM: ${builder_num}
BUILD_VARIANT: ${build_variant}
EXECUTION: ${execution}
PASSWD: ${passwd}
SLAVE: ${slave}
TASK_NAME: ${task_name}
"start mongod":
command: subprocess.exec
params:
# binary must be bash (with the script passed via args), not the script
# directly: Windows can't execute a shebang script as a native binary.
binary: bash
working_dir: src/github.com/mongodb/mongo-tools
background: true
args:
- "./scripts/start-mongod.sh"
env:
ADDITIONAL_ARGS: ${additional_args}
AWS_AUTH: ${AWS_AUTH}
EXTENSION: ${extension}
LOGFILE: ${logfile|run.log}
MONGOD_ARGS: ${mongod_args}
MONGOD_ARGS_TLS: ${mongod_args_tls}
MONGOD_PORT: ${mongod_port}
STORAGE_ENGINE: ${STORAGE_ENGINE}
USE_TLS: ${USE_TLS}
"wait for mongod to be ready":
command: subprocess.exec
params:
# binary must be bash (with the script passed via args), not the script
# directly: Windows can't execute a shebang script as a native binary.
binary: bash
working_dir: src/github.com/mongodb/mongo-tools
args:
- "./scripts/wait-for-mongod.sh"
env:
AWS_AUTH: ${AWS_AUTH}
EXTENSION: ${extension}
MONGO_ARGS: ${mongo_args}
MONGO_ARGS_TLS: ${mongo_args_tls}
USE_TLS: ${USE_TLS}
"create mongod users":
- command: subprocess.exec
params:
# binary must be bash (with the script passed via args), not the script
# directly: Windows can't execute a shebang script as a native binary.
binary: bash
working_dir: src/github.com/mongodb/mongo-tools
args:
- "./scripts/create-mongod-users.sh"
env:
AUTH_PASSWORD: ${auth_password}
AUTH_USERNAME: ${auth_username}
EXTENSION: ${extension}
MONGO_ARGS: ${mongo_args}
MONGO_ARGS_TLS: ${mongo_args_tls}
USE_TLS: ${USE_TLS}
"create release artifacts":
# build release artifacts
- command: subprocess.exec
params:
# binary must be bash (with the script passed via args), not the script
# directly: Windows can't execute a shebang script as a native binary.
binary: bash
working_dir: src/github.com/mongodb/mongo-tools
args:
- "./scripts/build-release-archive.sh"
env:
EVG_BUILD_ID: ${build_id}
EVG_IS_PATCH: ${is_patch}
EVG_TRIGGERED_BY_TAG: ${triggered_by_git_tag}
EVG_VARIANT: ${build_variant}
EVG_VERSION: ${version_id}
EVG_WORKDIR: ${workdir}
FAKE_TAG_FOR_RELEASE_TESTING: ${fake_tag_for_release_testing}
PLATFORM_OVERRIDE: ${_platform}
# temporary workaround for TOOLS-2606
- command: shell.exec
params:
shell: bash
working_dir: src/github.com/mongodb/mongo-tools
script: |
set -o errexit
set -o pipefail
set -o verbose
rm -rf ./mongorestore/testdata/longcollectionname/
# upload individual release artifacts to task page
- command: s3.put
params:
aws_key: ${aws_key}
aws_secret: ${aws_secret}
local_files_include_filter:
- src/github.com/mongodb/mongo-tools/mongodb-database-tools*.deb
- src/github.com/mongodb/mongo-tools/mongodb-database-tools*.msi
- src/github.com/mongodb/mongo-tools/mongodb-database-tools*.rpm
- src/github.com/mongodb/mongo-tools/mongodb-database-tools*.tgz
- src/github.com/mongodb/mongo-tools/mongodb-database-tools*.zip
remote_file: mongo-tools/pkgs/${build_id}/
content_type: application/octet-stream
bucket: mciuploads
permissions: public-read
display_name: "Release Artifact - "
# pack all release artifacts into a tarball and upload them to one
# place so that they can be more easily downloaded by the sign task
- command: archive.targz_pack
params:
target: src/github.com/mongodb/mongo-tools/upload.tgz
source_dir: src/github.com/mongodb/mongo-tools
include:
- mongodb-database-tools*.deb
- mongodb-database-tools*.msi
- mongodb-database-tools*.rpm
- mongodb-database-tools*.tgz
- mongodb-database-tools*.zip
- command: s3.put
params:
aws_key: ${aws_key}
aws_secret: ${aws_secret}
local_file: src/github.com/mongodb/mongo-tools/upload.tgz
remote_file: mongo-tools/task/dist/${build_id}/all-release-artifacts.tgz
content_type: application/x-gzip
bucket: mciuploads
permissions: public-read
display_name: All Release Artifacts (.tgz)
"fetch dist release artifacts":
- command: s3.get
params:
aws_key: ${aws_key}
aws_secret: ${aws_secret}
remote_file: mongo-tools/task/dist/${build_id}/all-release-artifacts.tgz
extract_to: src/github.com/mongodb/mongo-tools/
bucket: mciuploads
"sign artifacts":
- command: subprocess.exec
params:
# binary must be bash (with the script passed via args), not the script
# directly: Windows can't execute a shebang script as a native binary.
binary: bash
working_dir: src/github.com/mongodb/mongo-tools
args:
- "./scripts/sign_artifacts.sh"
env:
ARTIFACTORY_PASSWORD: ${artifactory_password}
ARTIFACTORY_USERNAME: ${artifactory_username}
AUTHENTICODE_KEY_NAME: ${authenticode_key_name}
EVG_TASK_ID: ${task_id}
EVG_TRIGGERED_BY_TAG: ${triggered_by_git_tag}
GARASIGN_PASSWORD: ${garasign_password}
GARASIGN_USERNAME: ${garasign_username}
MACOS_NOTARY_KEY: ${MACOS_NOTARY_KEY}
MACOS_NOTARY_SECRET: ${MACOS_NOTARY_SECRET}
"upload signed release artifacts":
# temporary workaround for TOOLS-2606
- command: shell.exec
params:
shell: bash
working_dir: src/github.com/mongodb/mongo-tools
script: |
set -o errexit
set -o pipefail
set -o verbose
rm -rf ./mongorestore/testdata/longcollectionname/
- command: s3.put
params:
aws_key: ${aws_key}
aws_secret: ${aws_secret}
local_files_include_filter:
- src/github.com/mongodb/mongo-tools/mongodb-database-tools*.sig
- src/github.com/mongodb/mongo-tools/mongodb-database-tools*.deb
- src/github.com/mongodb/mongo-tools/mongodb-database-tools*.msi
- src/github.com/mongodb/mongo-tools/mongodb-database-tools*.rpm
- src/github.com/mongodb/mongo-tools/mongodb-database-tools*.tgz
- src/github.com/mongodb/mongo-tools/mongodb-database-tools*.zip
remote_file: mongo-tools/task/sign/${build_id}/
bucket: mciuploads
permissions: public-read
content_type: application/octet-stream
"upload release packages to s3":
- command: subprocess.exec
params:
# binary must be bash (with the script passed via args), not the script
# directly: Windows can't execute a shebang script as a native binary.
binary: bash
working_dir: src/github.com/mongodb/mongo-tools
args:
- "./scripts/upload-release.sh"
env:
EVG_BUILD_ID: ${build_id}
EVG_IS_PATCH: ${is_patch}
EVG_KEY: ${evg_key}
EVG_TRIGGERED_BY_TAG: ${triggered_by_git_tag}
EVG_USER: ${evg_user}
EVG_VARIANT: ${build_variant}
EVG_VERSION: ${version_id}
EVG_WORKDIR: ${workdir}
FAKE_TAG_FOR_RELEASE_TESTING: ${fake_tag_for_release_testing}
PLATFORM_OVERRIDE: ${_platform}
"upload release json feed to s3":
- command: subprocess.exec
params:
# binary must be bash (with the script passed via args), not the script
# directly: Windows can't execute a shebang script as a native binary.
binary: bash
working_dir: src/github.com/mongodb/mongo-tools
args:
- "./scripts/upload-release-json.sh"
env:
EVG_BUILD_ID: ${build_id}
EVG_IS_PATCH: ${is_patch}
EVG_KEY: ${evg_key}
EVG_TRIGGERED_BY_TAG: ${triggered_by_git_tag}
EVG_USER: ${evg_user}
EVG_VARIANT: ${build_variant}
EVG_VERSION: ${version_id}
EVG_WORKDIR: ${workdir}
FAKE_TAG_FOR_RELEASE_TESTING: ${fake_tag_for_release_testing}
PLATFORM_OVERRIDE: ${_platform}
- command: s3.put
params:
aws_key: ${aws_key}
aws_secret: ${aws_secret}
local_file: src/github.com/mongodb/mongo-tools/release.json
remote_file: mongo-tools/release/${build_id}/
optional: true
content_type: application/json
bucket: mciuploads
permissions: public-read
"generate full JSON feed":
- command: subprocess.exec
params:
# binary must be bash (with the script passed via args), not the script
# directly: Windows can't execute a shebang script as a native binary.
binary: bash
working_dir: src/github.com/mongodb/mongo-tools
args:
- "./scripts/generate-full-json-feed.sh"
env:
EVG_BUILD_ID: ${build_id}
EVG_IS_PATCH: ${is_patch}
EVG_TRIGGERED_BY_TAG: ${triggered_by_git_tag}
EVG_VARIANT: ${build_variant}
EVG_VERSION: ${version_id}
EVG_WORKDIR: ${workdir}
FAKE_TAG_FOR_RELEASE_TESTING: ${fake_tag_for_release_testing}
PLATFORM_OVERRIDE: ${_platform}
"upload release packages to linux repos":
- command: shell.exec
params:
shell: bash
working_dir: src/github.com/mongodb/mongo-tools
script: |
set -o errexit
set -o pipefail
set -o verbose
curl -L -O http://boxes.10gen.com/build/curator/curator-dist-rhel70-latest.tar.gz
tar -zxvf curator-dist-rhel70-latest.tar.gz
- command: subprocess.exec
params:
# binary must be bash (with the script passed via args), not the script
# directly: Windows can't execute a shebang script as a native binary.
binary: bash
working_dir: src/github.com/mongodb/mongo-tools
args:
- "./scripts/linux-release.sh"
env:
BARQUE_API_KEY: ${barque_api_key}
BARQUE_USERNAME: ${barque_username}
EVG_BUILD_ID: ${build_id}
EVG_IS_PATCH: ${is_patch}
EVG_KEY: ${evg_key}
EVG_TRIGGERED_BY_TAG: ${triggered_by_git_tag}
EVG_USER: ${evg_user}
EVG_VARIANT: ${build_variant}
EVG_VERSION: ${version_id}
EVG_WORKDIR: ${workdir}
FAKE_TAG_FOR_RELEASE_TESTING: ${fake_tag_for_release_testing}
PLATFORM_OVERRIDE: ${_platform}
"fetch source":
- command: shell.exec
params:
shell: bash
script: |
set -o errexit
set -o pipefail
set -o verbose
mkdir -p src/github.com/mongodb
- command: git.get_project
params:
directory: src/github.com/mongodb/mongo-tools
- command: git.apply_patch
params:
directory: src/github.com/mongodb/mongo-tools
- command: shell.exec
params:
shell: bash
working_dir: src/github.com/mongodb/mongo-tools
script: |
set -o errexit
set -o pipefail
set -o verbose
mkdir -p bin
"create repl_set":
- command: subprocess.exec
params:
# binary must be bash (with the script passed via args), not the script
# directly: Windows can't execute a shebang script as a native binary.
binary: bash
working_dir: src/github.com/mongodb/mongo-tools
background: true
args:
- "./scripts/create-repl-set.sh"
env:
LOAD_LIBS_VERSION: ${load_libs_version}
MONGOD_PORT: ${mongod_port}
MONGO_ARGS: ${mongo_args}
MONGO_ARGS_TLS: ${mongo_args_tls}
REPLSETTEST_SSL_CONFIG: ${replsettest_ssl_config}
REPLSETTEST_TLS_CONFIG: ${replsettest_tls_config}
USE_SSL: ${USE_SSL}
USE_TLS: ${USE_TLS}
- command: subprocess.exec
params:
# binary must be bash (with the script passed via args), not the script
# directly: Windows can't execute a shebang script as a native binary.
binary: bash
working_dir: src/github.com/mongodb/mongo-tools
args:
- "./scripts/wait-for-cluster.sh"
env:
MONGOD_PORT: ${mongod_port}
MONGO_ARGS: ${mongo_args}
MONGO_ARGS_TLS: ${mongo_args_tls}
USE_TLS: ${USE_TLS}
"create sharded cluster":
- command: subprocess.exec
params:
# binary must be bash (with the script passed via args), not the script
# directly: Windows can't execute a shebang script as a native binary.
binary: bash
working_dir: src/github.com/mongodb/mongo-tools
background: true
args:
- "./scripts/create-sharded-cluster.sh"
env:
LOAD_LIBS_VERSION: ${load_libs_version}
MONGOD_PORT: ${mongod_port}
- command: subprocess.exec
params:
# binary must be bash (with the script passed via args), not the script
# directly: Windows can't execute a shebang script as a native binary.
binary: bash
working_dir: src/github.com/mongodb/mongo-tools
args:
- "./scripts/wait-for-cluster.sh"
env:
MONGOD_PORT: ${mongod_port}
MONGO_ARGS: ""
MONGO_ARGS_TLS: ""
USE_TLS: ""
"add-aws-auth-variables-to-file":
- command: subprocess.exec
type: test
params:
# binary must be bash (with the script passed via args), not the script
# directly: Windows can't execute a shebang script as a native binary.
binary: bash
silent: true
working_dir: src/github.com/mongodb/mongo-tools
args:
- "./scripts/add-aws-auth-variables-to-file.sh"
env:
IAM_AUTH_ASSUME_AWS_ACCOUNT: ${iam_auth_assume_aws_account}
IAM_AUTH_ASSUME_AWS_SECRET_ACCESS_KEY: ${iam_auth_assume_aws_secret_access_key}
IAM_AUTH_ASSUME_ROLE_NAME: ${iam_auth_assume_role_name}
"setup-aws-auth-test-with-assume-role-credentials":
- command: subprocess.exec
type: test
params:
# binary must be bash (with the script passed via args), not the script
# directly: Windows can't execute a shebang script as a native binary.
binary: bash
# silent: true
working_dir: src/github.com/mongodb/mongo-tools
args:
- "./scripts/setup-aws-auth-assume-role.sh"
- command: subprocess.exec
type: test
params:
# binary must be bash (with the script passed via args), not the script
# directly: Windows can't execute a shebang script as a native binary.
binary: bash
silent: true
working_dir: src/github.com/mongodb/mongo-tools
args:
- "./scripts/build-aws-auth-mongod-uri.sh"
"check sbom lite":
- command: subprocess.exec
type: test
params:
# binary must be bash (with the script passed via args), not the script
# directly: Windows can't execute a shebang script as a native binary.
binary: bash
working_dir: src/github.com/mongodb/mongo-tools
args:
- "./scripts/regenerate-and-diff-sbom-lite.sh"
env:
EVG_WORKDIR: ${workdir}
"check sarif report":
- command: subprocess.exec
type: test
params:
# binary must be bash (with the script passed via args), not the script
# directly: Windows can't execute a shebang script as a native binary.
binary: bash
working_dir: src/github.com/mongodb/mongo-tools
args:
- "./scripts/regenerate-and-diff-sarif-report.sh"
env:
EVG_WORKDIR: ${workdir}
"create evergreen config file":
- command: subprocess.exec
type: test
params:
# binary must be bash (with the script passed via args), not the script
# directly: Windows can't execute a shebang script as a native binary.
binary: bash
working_dir: src/github.com/mongodb/mongo-tools
args:
- "./scripts/write-evergreen-config-file.sh"
env:
EVG_KEY: ${evg_key}
EVG_USER: ${evg_user}
"set silkbomb credentials":
- command: ec2.assume_role
display_name: Assume IAM role with permissions to pull Kondukto API token
params:
role_arn: ${kondukto_role_arn}
- command: shell.exec
display_name: Pull Kondukto API token from AWS Secrets Manager and write it to file
params:
shell: bash
silent: true
include_expansions_in_env: [AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN]
script: |
set -o errexit
set -o pipefail
set -o verbose
# use AWS CLI to get the Kondukto API token from AWS Secrets Manager
kondukto_token=$(aws secretsmanager get-secret-value --secret-id "kondukto-token" --region "us-east-1" --query 'SecretString' --output text)
# set the KONDUKTO_TOKEN environment variable
echo "KONDUKTO_TOKEN: $kondukto_token" > kondukto_token.yml
- command: expansions.update
params:
file: kondukto_token.yml
redact_file_expansions: true
pre:
- command: shell.exec
params:
silent: true
shell: bash
script: |
# This script intentionally doesn't set errexit or pipefail, since these commands can fail and that's ok.
set -o verbose
${killall_mci|pkill -9 mongo; pkill -9 mongodump; pkill -9 mongoexport; pkill -9 mongoimport; pkill -9 mongofiles; pkill -9 mongorestore; pkill -9 mongostat; pkill -9 mongotop; pkill -9 mongod; pkill -9 mongos; pkill -f buildlogger.py; pkill -f smoke.py} >/dev/null 2>&1
rm -rf src /data/db/*
exit 0
# Extra pre steps needed for mongodump passthrough.
- command: expansions.update
params:
updates:
- key: python
value: "/opt/mongodbtoolchain/v4/bin/python3"
- key: resmoke_dir
value: "src/resmoke"
- key: resmoke_venv_dir
value: "resmoke-venv"
- key: mongosync_binary_folder
value: "mongosync-coverage-binary"
# Bump these to force-invalidate the mise Evergreen caches (see the "install mise and go" and
# "install mise-managed tools" functions).
- command: expansions.update
params:
updates:
- key: mise_and_go_cache_version
value: v2
- key: mise_all_tools_cache_version
value: v3
post:
# attach.results works for jstests, gotest.parse_files for golang tests
- command: attach.results
params:
file_location: src/github.com/mongodb/mongo-tools/report.json
- command: gotest.parse_files
params:
files: ["src/github.com/mongodb/mongo-tools/testing_output/*.suite"]
- command: shell.exec
params:
shell: bash
silent: true
script: |
# This script intentionally doesn't set errexit or pipefail, since these commands can fail and that's ok.
set -o verbose
${killall_mci|pkill -9 mongo; pkill -9 mongodump; pkill -9 mongoexport; pkill -9 mongoimport; pkill -9 mongofiles; pkill -9 mongorestore; pkill -9 mongostat; pkill -9 mongotop; pkill -9 mongod; pkill -9 mongos; pkill -f buildlogger.py; pkill -f smoke.py} >/dev/null 2>&1
exit 0
- command: shell.exec
params:
shell: bash
script: |
set -o errexit
set -o pipefail
set -o verbose
rm -rf /data/db/*
exit 0
# Extra post steps needed for mongodump passthrough.
- func: f_resmoke_report_attach
- func: "attach artifacts"
- func: f_mongo_coredumps_save
timeout:
- command: subprocess.exec
params:
# binary must be bash (with the script passed via args), not the script
# directly: Windows can't execute a shebang script as a native binary.
binary: bash
silent: true
working_dir: src/github.com/mongodb/mongo-tools
args:
- "./scripts/timeout-abort-hung-tools.sh"
env:
KILLALL_MCI: ${killall_mci}
# Extra timeout steps needed for mongodump passthrough.
- func: f_expansions_write
- func: "wait for resmoke to shutdown"
tasks:
- name: dist
tags: ["git_tag"]
commands:
- func: "fetch source"
- func: "install mise and go"
- func: "run make target"
vars:
target: checkMinVersion
- func: "run make target"
vars:
target: build
- func: "create release artifacts"
# Identical to "dist", except it uses "install go without mise" instead of
# "install mise and go", since mise has no builds at all for ppc64le or s390x. Used only by the
# ppc64le/s390x buildvariants below.
- name: dist-without-mise
tags: ["git_tag"]
commands:
- func: "fetch source"
- func: "install go without mise"
- func: "run make target"
vars:
target: checkMinVersion
- func: "run make target"
vars:
target: build
- func: "create release artifacts"
# Regardless of the buildvariant, the sign task must be run on a
# distro that has the notary client available. We will use
# amazon1-2018-test for this purpose. The notary client is not
# available on all distros, which is why sign must be a separate task.
- name: sign
tags: ["git_tag"]
depends_on:
- name: dist
commands:
- func: "fetch source"
- func: "fetch dist release artifacts"
- func: "install mise and go"
- func: "sign artifacts"
- func: "upload signed release artifacts"
- name: push
tags: ["git_tag"]
depends_on:
- name: sign
commands:
- func: "fetch source"
- command: expansions.update
- func: "install mise and go"
- func: "upload release packages to s3"
- func: "upload release packages to linux repos"
- command: subprocess.exec
params:
binary: bash
working_dir: src/github.com/mongodb/mongo-tools
args:
- "./scripts/set-expansions-for-papertrail.sh"
- command: expansions.update
params:
file: src/github.com/mongodb/mongo-tools/expansions.yml
- func: "fetch dist release artifacts"
- command: papertrail.trace
params:
key_id: ${papertrail_key_id}
secret_key: ${papertrail_secret_key}
product: ${product_name}
version: ${release_tag}
filenames:
- "./src/github.com/mongodb/mongo-tools/mongodb-database-tools*"
- name: check-augmented-sbom
tags: ["git_tag"]
commands:
- func: "fetch source"
- command: expansions.update
- func: "set silkbomb credentials"
- func: "install mise and go"
- command: subprocess.exec
params:
# binary must be bash (with the script passed via args), not the script
# directly: Windows can't execute a shebang script as a native binary.
binary: bash
working_dir: src/github.com/mongodb/mongo-tools
args:
- "./scripts/regenerate-and-diff-augmented-sbom.sh"
include_expansions_in_env: [KONDUKTO_TOKEN]
env:
EVG_TRIGGERED_BY_TAG: ${triggered_by_git_tag}
- name: release-json
tags: ["git_tag"]
depends_on:
- name: push
variant: "*"
commands:
- func: "fetch source"
- command: expansions.update
- func: "install mise and go"
- func: "upload release json feed to s3"
- name: generate-full-json
commands:
- func: "fetch source"
- command: expansions.update
- func: "install mise and go"
- func: "generate full JSON feed"
- name: integration-4.2
tags: ["4.2"]
commands:
- func: "fetch source"
- command: expansions.update
- func: "install mise and go"
- func: "download mongod and shell"
vars:
mongo_version: "4.2"
- func: "start mongod"
vars: