-
Notifications
You must be signed in to change notification settings - Fork 1.8k
/
config.yml
2061 lines (2026 loc) · 65.4 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
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
stepback: true
command_type: system
exec_timeout_secs: 1200
timeout:
- command: shell.exec
params:
script: |
ls -la
functions:
fetch source:
- command: git.get_project
params:
directory: src
shallow_clone: true
- command: shell.exec
params:
working_dir: src
script: |
# Get the current unique version of this checkout
if [ "${is_patch}" = "true" ]; then
CURRENT_VERSION=$(git describe)-patch-${version_id}
else
CURRENT_VERSION=latest
fi
export DRIVERS_TOOLS="$(pwd)/../drivers-tools"
export PROJECT_DIRECTORY="$(pwd)"
export MONGO_ORCHESTRATION_HOME="$DRIVERS_TOOLS/.evergreen/orchestration"
export MONGODB_BINARIES="$DRIVERS_TOOLS/mongodb/bin"
export UPLOAD_BUCKET="${project}"
# fix paths on windows
if [ "Windows_NT" = "$OS" ]; then
export DRIVERS_TOOLS=$(cygpath -m -a $DRIVERS_TOOLS)
export MONGO_ORCHESTRATION_HOME=$(cygpath -m -a $MONGO_ORCHESTRATION_HOME)
export MONGODB_BINARIES=$(cygpath -m -a $MONGODB_BINARIES)
export PROJECT_DIRECTORY=$(cygpath -m -a $PROJECT_DIRECTORY)
fi
cat <<EOT > expansion.yml
CURRENT_VERSION: "$CURRENT_VERSION"
DRIVERS_TOOLS: "$DRIVERS_TOOLS"
MONGO_ORCHESTRATION_HOME: "$MONGO_ORCHESTRATION_HOME"
MONGODB_BINARIES: "$MONGODB_BINARIES"
UPLOAD_BUCKET: "$UPLOAD_BUCKET"
PROJECT_DIRECTORY: "$PROJECT_DIRECTORY"
PREPARE_SHELL: |
set -o errexit
set -o xtrace
export DRIVERS_TOOLS="$DRIVERS_TOOLS"
export MONGO_ORCHESTRATION_HOME="$MONGO_ORCHESTRATION_HOME"
export MONGODB_BINARIES="$MONGODB_BINARIES"
export UPLOAD_BUCKET="$UPLOAD_BUCKET"
export PROJECT_DIRECTORY="$PROJECT_DIRECTORY"
export TMPDIR="$MONGO_ORCHESTRATION_HOME/db"
export PATH="$MONGODB_BINARIES:$PATH"
export PROJECT="${project}"
EOT
# See what we've done
cat expansion.yml
- command: expansions.update
params:
file: src/expansion.yml
prepare resources:
- command: shell.exec
params:
script: >
${PREPARE_SHELL}
git clone --depth 1 git://github.com/mongodb-labs/drivers-evergreen-tools.git $DRIVERS_TOOLS
echo "{ \"releases\": { \"default\": \"$MONGODB_BINARIES\" }}" >
$MONGO_ORCHESTRATION_HOME/orchestration.config
bootstrap mongo-orchestration:
- command: shell.exec
params:
script: |
${PREPARE_SHELL}
MONGODB_VERSION=${VERSION} TOPOLOGY=${TOPOLOGY} \
AUTH=${AUTH} SSL=${SSL} \
ORCHESTRATION_FILE=${ORCHESTRATION_FILE} \
REQUIRE_API_VERSION=${REQUIRE_API_VERSION} \
bash ${DRIVERS_TOOLS}/.evergreen/run-orchestration.sh
- command: expansions.update
params:
file: mo-expansion.yml
bootstrap mongohoused:
- command: shell.exec
params:
script: |
${PREPARE_SHELL}
DRIVERS_TOOLS="${DRIVERS_TOOLS}" bash ${DRIVERS_TOOLS}/.evergreen/atlas_data_lake/build-mongohouse-local.sh
- command: shell.exec
params:
background: true
script: |
${PREPARE_SHELL}
DRIVERS_TOOLS="${DRIVERS_TOOLS}" bash ${DRIVERS_TOOLS}/.evergreen/atlas_data_lake/run-mongohouse-local.sh
run tests:
- command: shell.exec
type: test
params:
silent: true
working_dir: src
script: |
if [ -n "${CLIENT_ENCRYPTION}" ]; then
cat <<EOT > prepare_client_encryption.sh
export CLIENT_ENCRYPTION=${CLIENT_ENCRYPTION}
export CSFLE_KMS_PROVIDERS='${CSFLE_KMS_PROVIDERS}'
export AWS_ACCESS_KEY_ID='${AWS_ACCESS_KEY_ID}'
export AWS_SECRET_ACCESS_KEY='${AWS_SECRET_ACCESS_KEY}'
export AWS_DEFAULT_REGION='us-east-1'
EOT
fi
- command: shell.exec
type: test
params:
working_dir: src
timeout_secs: 60
script: |
${PREPARE_SHELL}
if [ -n "${CLIENT_ENCRYPTION}" ]; then
# Disable xtrace (just in case it was accidentally set).
set +x
. ./prepare_client_encryption.sh
rm -f ./prepare_client_encryption.sh
fi
MONGODB_URI="${MONGODB_URI}" \
AUTH=${AUTH} SSL=${SSL} UNIFIED=${UNIFIED} \
MONGODB_API_VERSION="${MONGODB_API_VERSION}" \
NODE_VERSION=${NODE_VERSION} SKIP_DEPS=${SKIP_DEPS|1} NO_EXIT=${NO_EXIT|1} \
bash ${PROJECT_DIRECTORY}/.evergreen/run-tests.sh
run serverless tests:
- command: timeout.update
params:
exec_timeout_secs: 1800
- command: shell.exec
type: test
params:
working_dir: src
script: |
${PREPARE_SHELL}
# Disable xtrace (just in case it was accidentally set).
set +x
MONGODB_URI="${MONGODB_URI}" \
MONGODB_API_VERSION="${MONGODB_API_VERSION}" \
AUTH="auth" SSL="ssl" SERVERLESS=1 \
SERVERLESS_ATLAS_USER="${SERVERLESS_ATLAS_USER}" \
SERVERLESS_ATLAS_PASSWORD="${SERVERLESS_ATLAS_PASSWORD}" \
bash ${PROJECT_DIRECTORY}/.evergreen/run-serverless-tests.sh
start-load-balancer:
- command: shell.exec
params:
script: |
DRIVERS_TOOLS=${DRIVERS_TOOLS} MONGODB_URI=${MONGODB_URI} \
bash ${DRIVERS_TOOLS}/.evergreen/run-load-balancer.sh start
- command: expansions.update
params:
file: lb-expansion.yml
stop-load-balancer:
- command: shell.exec
params:
script: |
DRIVERS_TOOLS=${DRIVERS_TOOLS} MONGODB_URI=${MONGODB_URI} \
bash ${DRIVERS_TOOLS}/.evergreen/run-load-balancer.sh stop
run-lb-tests:
- command: shell.exec
type: test
params:
working_dir: src
timeout_secs: 60
script: |
${PREPARE_SHELL}
MONGODB_URI="${MONGODB_URI}" \
AUTH=${AUTH} \
SSL=${SSL} \
UNIFIED=${UNIFIED} \
MONGODB_API_VERSION="${MONGODB_API_VERSION}" \
NODE_VERSION=${NODE_VERSION} \
SINGLE_MONGOS_LB_URI="${SINGLE_MONGOS_LB_URI}" \
MULTI_MONGOS_LB_URI="${MULTI_MONGOS_LB_URI}" \
TOPOLOGY="${TOPOLOGY}" \
SKIP_DEPS=${SKIP_DEPS|1} \
NO_EXIT=${NO_EXIT|1} \
FAKE_MONGODB_SERVICE_ID="true" \
bash ${PROJECT_DIRECTORY}/.evergreen/run-tests.sh
run checks:
- command: shell.exec
type: test
params:
working_dir: src
script: |
${PREPARE_SHELL}
bash ${PROJECT_DIRECTORY}/.evergreen/run-checks.sh
run mongosh integration tests:
- command: shell.exec
type: test
params:
working_dir: src
script: |
${PREPARE_SHELL}
export DISTRO_ID=${distro_id}
bash ${PROJECT_DIRECTORY}/.evergreen/run-mongosh-integration-tests.sh
cleanup:
- command: shell.exec
params:
silent: true
script: |
${PREPARE_SHELL}
rm -rf $DRIVERS_TOOLS || true
fix absolute paths:
- command: shell.exec
params:
silent: true
script: |
${PREPARE_SHELL}
for filename in $(find ${DRIVERS_TOOLS} -name \*.json); do
perl -p -i -e "s|ABSOLUTE_PATH_REPLACEMENT_TOKEN|${DRIVERS_TOOLS}|g" $filename
done
windows fix:
- command: shell.exec
params:
silent: true
script: |
${PREPARE_SHELL}
# for i in $(find ${DRIVERS_TOOLS}/.evergreen ${PROJECT_DIRECTORY}/.evergreen -name \*.sh); do
# cat $i | tr -d '\r' > $i.new
# mv $i.new $i
# done
# Copy client certificate because symlinks do not work on Windows.
cp ${DRIVERS_TOOLS}/.evergreen/x509gen/client.pem ${MONGO_ORCHESTRATION_HOME}/lib/client.pem
make files executable:
- command: shell.exec
params:
silent: true
script: |
${PREPARE_SHELL}
for i in $(find ${DRIVERS_TOOLS}/.evergreen ${PROJECT_DIRECTORY}/.evergreen -name \*.sh); do
chmod +x $i
done
install dependencies:
- command: shell.exec
type: setup
params:
working_dir: src
script: |
${PREPARE_SHELL}
NODE_LTS_NAME=${NODE_LTS_NAME} MSVS_VERSION=${MSVS_VERSION} \
bash ${PROJECT_DIRECTORY}/.evergreen/install-dependencies.sh
- command: expansions.update
params:
file: src/deps-expansion.yml
run atlas tests:
- command: shell.exec
type: test
params:
silent: true
working_dir: src
script: |
cat <<EOT > prepare_atlas_connectivity.sh
export ATLAS_CONNECTIVITY='${ATLAS_CONNECTIVITY}'
EOT
- command: shell.exec
type: test
params:
working_dir: src
script: |
# Disable xtrace (just in case it was accidentally set).
set +x
. ./prepare_atlas_connectivity.sh
rm -f ./prepare_atlas_connectivity.sh
export PROJECT_DIRECTORY="$(pwd)"
export NODE_LTS_NAME='${NODE_LTS_NAME}'
bash ${PROJECT_DIRECTORY}/.evergreen/run-atlas-tests.sh
run kerberos tests:
- command: shell.exec
type: test
params:
working_dir: src
script: |
export PROJECT_DIRECTORY="$(pwd)"
export KRB5_KEYTAB='${gssapi_auth_keytab_base64}'
export KRB5_PRINCIPAL='${gssapi_auth_principal}'
export MONGODB_URI='${gssapi_auth_mongodb_uri}'
export NODE_LTS_NAME='${NODE_LTS_NAME}'
bash ${PROJECT_DIRECTORY}/.evergreen/run-kerberos-tests.sh
run ldap tests:
- command: shell.exec
type: test
params:
working_dir: src
script: |
export PROJECT_DIRECTORY="$(pwd)"
export MONGODB_URI='${plain_auth_mongodb_uri}'
export NODE_LTS_NAME='${NODE_LTS_NAME}'
bash ${PROJECT_DIRECTORY}/.evergreen/run-ldap-tests.sh
run data lake tests:
- command: shell.exec
type: test
params:
working_dir: src
script: |
export PROJECT_DIRECTORY="$(pwd)"
export MONGODB_URI='mongodb://mhuser:pencil@localhost'
export NODE_LTS_NAME='${NODE_LTS_NAME}'
bash ${PROJECT_DIRECTORY}/.evergreen/run-data-lake-tests.sh
run tls tests:
- command: shell.exec
type: test
params:
working_dir: src
script: |
export PROJECT_DIRECTORY="$(pwd)"
export NODE_LTS_NAME=${NODE_LTS_NAME}
export DRIVERS_TOOLS="${DRIVERS_TOOLS}"
export SSL_CA_FILE="${SSL_CA_FILE}"
export SSL_KEY_FILE="${SSL_KEY_FILE}"
export MONGODB_URI="${MONGODB_URI}"
bash ${PROJECT_DIRECTORY}/.evergreen/run-tls-tests.sh
add aws auth variables to file:
- command: shell.exec
type: test
params:
working_dir: src
silent: true
script: |
cat <<EOF > ${DRIVERS_TOOLS}/.evergreen/auth_aws/aws_e2e_setup.json
{
"iam_auth_ecs_account" : "${iam_auth_ecs_account}",
"iam_auth_ecs_secret_access_key" : "${iam_auth_ecs_secret_access_key}",
"iam_auth_ecs_account_arn": "arn:aws:iam::557821124784:user/authtest_fargate_user",
"iam_auth_ecs_cluster": "${iam_auth_ecs_cluster}",
"iam_auth_ecs_task_definition": "${iam_auth_ecs_task_definition}",
"iam_auth_ecs_subnet_a": "${iam_auth_ecs_subnet_a}",
"iam_auth_ecs_subnet_b": "${iam_auth_ecs_subnet_b}",
"iam_auth_ecs_security_group": "${iam_auth_ecs_security_group}",
"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}",
"iam_auth_ec2_instance_account" : "${iam_auth_ec2_instance_account}",
"iam_auth_ec2_instance_secret_access_key" : "${iam_auth_ec2_instance_secret_access_key}",
"iam_auth_ec2_instance_profile" : "${iam_auth_ec2_instance_profile}"
}
EOF
setup aws env:
- command: shell.exec
type: test
params:
working_dir: src
script: |
${PREPARE_SHELL}
cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
. ./activate_venv.sh
cd -
run aws auth test with regular aws credentials:
- command: shell.exec
type: test
params:
working_dir: src
script: |
${PREPARE_SHELL}
cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
. ./activate_venv.sh
${MONGODB_BINARIES}/mongo aws_e2e_regular_aws.js
- command: shell.exec
type: test
params:
working_dir: src
silent: true
script: |
cat <<'EOF' > "${PROJECT_DIRECTORY}/prepare_mongodb_aws.sh"
alias urlencode='python -c "import sys, urllib as ul; print ul.quote_plus(sys.argv[1])"'
USER=$(urlencode ${iam_auth_ecs_account})
PASS=$(urlencode ${iam_auth_ecs_secret_access_key})
export MONGODB_URI="mongodb://$USER:$PASS@localhost:27017/aws?authMechanism=MONGODB-AWS"
EOF
- command: shell.exec
type: test
params:
working_dir: src
script: |
${PREPARE_SHELL}
${PROJECT_DIRECTORY}/.evergreen/run-mongodb-aws-test.sh
run aws auth test with assume role credentials:
- command: shell.exec
type: test
params:
working_dir: src
script: |
${PREPARE_SHELL}
cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
. ./activate_venv.sh
${MONGODB_BINARIES}/mongo aws_e2e_assume_role.js
- command: shell.exec
type: test
params:
working_dir: src
silent: true
script: |
cat <<'EOF' > "${PROJECT_DIRECTORY}/prepare_mongodb_aws.sh"
alias urlencode='python -c "import sys, urllib as ul; print ul.quote_plus(sys.argv[1])"'
USER=$(jq -r '.AccessKeyId' ${DRIVERS_TOOLS}/.evergreen/auth_aws/creds.json)
USER=$(urlencode $USER)
PASS=$(jq -r '.SecretAccessKey' ${DRIVERS_TOOLS}/.evergreen/auth_aws/creds.json)
PASS=$(urlencode $PASS)
SESSION_TOKEN=$(jq -r '.SessionToken' ${DRIVERS_TOOLS}/.evergreen/auth_aws/creds.json)
SESSION_TOKEN=$(urlencode $SESSION_TOKEN)
export MONGODB_URI="mongodb://$USER:$PASS@localhost:27017/aws?authMechanism=MONGODB-AWS&authMechanismProperties=AWS_SESSION_TOKEN:$SESSION_TOKEN"
EOF
- command: shell.exec
type: test
params:
working_dir: src
script: |
${PREPARE_SHELL}
${PROJECT_DIRECTORY}/.evergreen/run-mongodb-aws-test.sh
run aws auth test with aws EC2 credentials:
- command: shell.exec
type: test
params:
working_dir: src
script: |
${PREPARE_SHELL}
cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
. ./activate_venv.sh
${MONGODB_BINARIES}/mongo aws_e2e_ec2.js
- command: shell.exec
type: test
params:
working_dir: src
script: |
${PREPARE_SHELL}
${PROJECT_DIRECTORY}/.evergreen/run-mongodb-aws-test.sh
run aws auth test with aws credentials as environment variables:
- command: shell.exec
type: test
params:
working_dir: src
silent: true
script: |
cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
${MONGODB_BINARIES}/mongo --verbose aws_e2e_regular_aws.js
cd -
cat <<EOF > "${PROJECT_DIRECTORY}/prepare_mongodb_aws.sh"
export AWS_ACCESS_KEY_ID=${iam_auth_ecs_account}
export AWS_SECRET_ACCESS_KEY=${iam_auth_ecs_secret_access_key}
export MONGODB_URI="mongodb://localhost:27017/aws?authMechanism=MONGODB-AWS"
EOF
- command: shell.exec
type: test
params:
working_dir: src
script: |
${PREPARE_SHELL}
${PROJECT_DIRECTORY}/.evergreen/run-mongodb-aws-test.sh
run aws auth test with aws credentials and session token as environment variables:
- command: shell.exec
type: test
params:
working_dir: src
silent: true
script: |
cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
${MONGODB_BINARIES}/mongo --verbose aws_e2e_assume_role.js
cd -
cat <<'EOF' > "${PROJECT_DIRECTORY}/prepare_mongodb_aws.sh"
export AWS_ACCESS_KEY_ID=$(jq -r '.AccessKeyId' ${DRIVERS_TOOLS}/.evergreen/auth_aws/creds.json)
export AWS_SECRET_ACCESS_KEY=$(jq -r '.SecretAccessKey' ${DRIVERS_TOOLS}/.evergreen/auth_aws/creds.json)
export AWS_SESSION_TOKEN=$(jq -r '.SessionToken' ${DRIVERS_TOOLS}/.evergreen/auth_aws/creds.json)
export MONGODB_URI="mongodb://localhost:27017/aws?authMechanism=MONGODB-AWS"
EOF
- command: shell.exec
type: test
params:
working_dir: src
script: |
${PREPARE_SHELL}
${PROJECT_DIRECTORY}/.evergreen/run-mongodb-aws-test.sh
run aws ECS auth test:
- command: shell.exec
type: test
params:
working_dir: src
script: |
${PREPARE_SHELL}
AUTH_AWS_DIR=${DRIVERS_TOOLS}/.evergreen/auth_aws
ECS_SRC_DIR=$AUTH_AWS_DIR/src
# fix issue with `TestData` in SERVER-46340
sed -i '1s+^+TestData = {};\n+' $AUTH_AWS_DIR/lib/ecs_hosted_test.js
# pack up project directory to ssh it to the container
mkdir -p $ECS_SRC_DIR/.evergreen
cp $PROJECT_DIRECTORY/.evergreen/run-mongodb-aws-ecs-test.sh $ECS_SRC_DIR/.evergreen
tar -czf $ECS_SRC_DIR/src.tgz -C $PROJECT_DIRECTORY .
cd $AUTH_AWS_DIR
cat <<EOF > setup.js
const mongo_binaries = "$MONGODB_BINARIES";
const project_dir = "$ECS_SRC_DIR";
EOF
cat setup.js
. ./activate_venv.sh
${MONGODB_BINARIES}/mongo --nodb setup.js aws_e2e_ecs.js
run-ocsp-test:
- command: shell.exec
type: test
params:
working_dir: src
script: |
${PREPARE_SHELL}
UNIFIED=${UNIFIED} \
CA_FILE="$DRIVERS_TOOLS/.evergreen/ocsp/rsa/ca.pem" \
OCSP_TLS_SHOULD_SUCCEED="${OCSP_TLS_SHOULD_SUCCEED}" \
bash ${PROJECT_DIRECTORY}/.evergreen/run-ocsp-tests.sh
run-valid-ocsp-server:
- command: shell.exec
params:
script: >
cd ${DRIVERS_TOOLS}/.evergreen/ocsp
export PYTHON_BINARY=$([ "Windows_NT" = "$OS" ] && echo "/cygdrive/c/python/python38/python.exe" || echo
"/opt/mongodbtoolchain/v3/bin/python3")
export PYTHON_VENV_PATH=$([ "Windows_NT" = "$OS" ] && echo "./venv/Scripts" || echo "./venv/bin")
$PYTHON_BINARY -m venv ./venv
$PYTHON_VENV_PATH/pip3 install -r ${DRIVERS_TOOLS}/.evergreen/ocsp/mock-ocsp-responder-requirements.txt
- command: shell.exec
params:
background: true
script: |
cd ${DRIVERS_TOOLS}/.evergreen/ocsp
nohup $PYTHON_VENV_PATH/python3 ocsp_mock.py \
--ca_file rsa/ca.pem \
--ocsp_responder_cert rsa/ca.crt \
--ocsp_responder_key rsa/ca.key \
-p 8100 -v
run-revoked-ocsp-server:
- command: shell.exec
params:
script: >
cd ${DRIVERS_TOOLS}/.evergreen/ocsp
export PYTHON_BINARY=$([ "Windows_NT" = "$OS" ] && echo "/cygdrive/c/python/python38/python.exe" || echo
"/opt/mongodbtoolchain/v3/bin/python3")
export PYTHON_VENV_PATH=$([ "Windows_NT" = "$OS" ] && echo "./venv/Scripts" || echo "./venv/bin")
$PYTHON_BINARY -m venv ./venv
$PYTHON_VENV_PATH/pip3 install -r ${DRIVERS_TOOLS}/.evergreen/ocsp/mock-ocsp-responder-requirements.txt
- command: shell.exec
params:
background: true
script: |
cd ${DRIVERS_TOOLS}/.evergreen/ocsp
nohup $PYTHON_VENV_PATH/python3 ocsp_mock.py \
--ca_file rsa/ca.pem \
--ocsp_responder_cert rsa/ca.crt \
--ocsp_responder_key rsa/ca.key \
-p 8100 \
-v \
--fault revoked
run custom csfle tests:
- command: shell.exec
type: test
params:
silent: true
working_dir: src
script: |
${PREPARE_SHELL}
cat <<EOT > prepare_client_encryption.sh
export CLIENT_ENCRYPTION=${CLIENT_ENCRYPTION}
export CSFLE_KMS_PROVIDERS='${CSFLE_KMS_PROVIDERS}'
export AWS_ACCESS_KEY_ID="${AWS_ACCESS_KEY_ID}"
export AWS_SECRET_ACCESS_KEY="${AWS_SECRET_ACCESS_KEY}"
export CSFLE_GIT_REF="${CSFLE_GIT_REF}"
export CDRIVER_GIT_REF="${CDRIVER_GIT_REF}"
EOT
- command: shell.exec
type: test
params:
working_dir: src
timeout_secs: 60
script: |
${PREPARE_SHELL}
# Disable xtrace (just in case it was accidentally set).
set +x
. ./prepare_client_encryption.sh
rm -f ./prepare_client_encryption.sh
MONGODB_URI="${MONGODB_URI}" bash ${PROJECT_DIRECTORY}/.evergreen/run-custom-csfle-tests.sh
run custom snappy tests:
- command: subprocess.exec
params:
working_dir: src
timeout_secs: 60
env:
MONGODB_URI: '${MONGODB_URI}'
PROJECT_DIRECTORY: '${PROJECT_DIRECTORY}'
binary: bash
args:
- '${PROJECT_DIRECTORY}/.evergreen/run-snappy-version-test.sh'
run bson-ext test:
- command: shell.exec
type: test
params:
working_dir: src
timeout_secs: 60
script: |
${PREPARE_SHELL}
MONGODB_URI="${MONGODB_URI}" bash ${PROJECT_DIRECTORY}/.evergreen/run-bson-ext-test.sh
upload test results:
- command: attach.xunit_results
params:
file: src/xunit.xml
tasks:
- name: test-serverless
tags:
- serverless
commands:
- func: run serverless tests
- name: test-latest-server
tags:
- latest
- server
commands:
- func: install dependencies
- func: bootstrap mongo-orchestration
vars:
VERSION: latest
TOPOLOGY: server
- func: run tests
- name: test-latest-replica_set
tags:
- latest
- replica_set
commands:
- func: install dependencies
- func: bootstrap mongo-orchestration
vars:
VERSION: latest
TOPOLOGY: replica_set
- func: run tests
- name: test-latest-sharded_cluster
tags:
- latest
- sharded_cluster
commands:
- func: install dependencies
- func: bootstrap mongo-orchestration
vars:
VERSION: latest
TOPOLOGY: sharded_cluster
- func: run tests
- name: test-5.0-server
tags:
- '5.0'
- server
commands:
- func: install dependencies
- func: bootstrap mongo-orchestration
vars:
VERSION: '5.0'
TOPOLOGY: server
- func: run tests
- name: test-5.0-replica_set
tags:
- '5.0'
- replica_set
commands:
- func: install dependencies
- func: bootstrap mongo-orchestration
vars:
VERSION: '5.0'
TOPOLOGY: replica_set
- func: run tests
- name: test-5.0-sharded_cluster
tags:
- '5.0'
- sharded_cluster
commands:
- func: install dependencies
- func: bootstrap mongo-orchestration
vars:
VERSION: '5.0'
TOPOLOGY: sharded_cluster
- func: run tests
- name: test-4.4-server
tags:
- '4.4'
- server
commands:
- func: install dependencies
- func: bootstrap mongo-orchestration
vars:
VERSION: '4.4'
TOPOLOGY: server
- func: run tests
- name: test-4.4-replica_set
tags:
- '4.4'
- replica_set
commands:
- func: install dependencies
- func: bootstrap mongo-orchestration
vars:
VERSION: '4.4'
TOPOLOGY: replica_set
- func: run tests
- name: test-4.4-sharded_cluster
tags:
- '4.4'
- sharded_cluster
commands:
- func: install dependencies
- func: bootstrap mongo-orchestration
vars:
VERSION: '4.4'
TOPOLOGY: sharded_cluster
- func: run tests
- name: test-4.2-server
tags:
- '4.2'
- server
commands:
- func: install dependencies
- func: bootstrap mongo-orchestration
vars:
VERSION: '4.2'
TOPOLOGY: server
- func: run tests
- name: test-4.2-replica_set
tags:
- '4.2'
- replica_set
commands:
- func: install dependencies
- func: bootstrap mongo-orchestration
vars:
VERSION: '4.2'
TOPOLOGY: replica_set
- func: run tests
- name: test-4.2-sharded_cluster
tags:
- '4.2'
- sharded_cluster
commands:
- func: install dependencies
- func: bootstrap mongo-orchestration
vars:
VERSION: '4.2'
TOPOLOGY: sharded_cluster
- func: run tests
- name: test-4.0-server
tags:
- '4.0'
- server
commands:
- func: install dependencies
- func: bootstrap mongo-orchestration
vars:
VERSION: '4.0'
TOPOLOGY: server
- func: run tests
- name: test-4.0-replica_set
tags:
- '4.0'
- replica_set
commands:
- func: install dependencies
- func: bootstrap mongo-orchestration
vars:
VERSION: '4.0'
TOPOLOGY: replica_set
- func: run tests
- name: test-4.0-sharded_cluster
tags:
- '4.0'
- sharded_cluster
commands:
- func: install dependencies
- func: bootstrap mongo-orchestration
vars:
VERSION: '4.0'
TOPOLOGY: sharded_cluster
- func: run tests
- name: test-3.6-server
tags:
- '3.6'
- server
commands:
- func: install dependencies
- func: bootstrap mongo-orchestration
vars:
VERSION: '3.6'
TOPOLOGY: server
- func: run tests
- name: test-3.6-replica_set
tags:
- '3.6'
- replica_set
commands:
- func: install dependencies
- func: bootstrap mongo-orchestration
vars:
VERSION: '3.6'
TOPOLOGY: replica_set
- func: run tests
- name: test-3.6-sharded_cluster
tags:
- '3.6'
- sharded_cluster
commands:
- func: install dependencies
- func: bootstrap mongo-orchestration
vars:
VERSION: '3.6'
TOPOLOGY: sharded_cluster
- func: run tests
- name: test-3.4-server
tags:
- '3.4'
- server
commands:
- func: install dependencies
- func: bootstrap mongo-orchestration
vars:
VERSION: '3.4'
TOPOLOGY: server
- func: run tests
- name: test-3.4-replica_set
tags:
- '3.4'
- replica_set
commands:
- func: install dependencies
- func: bootstrap mongo-orchestration
vars:
VERSION: '3.4'
TOPOLOGY: replica_set
- func: run tests
- name: test-3.4-sharded_cluster
tags:
- '3.4'
- sharded_cluster
commands:
- func: install dependencies
- func: bootstrap mongo-orchestration
vars:
VERSION: '3.4'
TOPOLOGY: sharded_cluster
- func: run tests
- name: test-3.2-server
tags:
- '3.2'
- server
commands:
- func: install dependencies
- func: bootstrap mongo-orchestration
vars:
VERSION: '3.2'
TOPOLOGY: server
- func: run tests
- name: test-3.2-replica_set
tags:
- '3.2'
- replica_set
commands:
- func: install dependencies
- func: bootstrap mongo-orchestration
vars:
VERSION: '3.2'
TOPOLOGY: replica_set
- func: run tests
- name: test-3.2-sharded_cluster
tags:
- '3.2'
- sharded_cluster
commands:
- func: install dependencies
- func: bootstrap mongo-orchestration
vars:
VERSION: '3.2'
TOPOLOGY: sharded_cluster
- func: run tests
- name: test-3.0-server
tags:
- '3.0'
- server
commands:
- func: install dependencies
- func: bootstrap mongo-orchestration
vars:
VERSION: '3.0'
TOPOLOGY: server
- func: run tests
- name: test-3.0-replica_set
tags:
- '3.0'
- replica_set
commands:
- func: install dependencies
- func: bootstrap mongo-orchestration
vars:
VERSION: '3.0'
TOPOLOGY: replica_set
- func: run tests
- name: test-3.0-sharded_cluster
tags:
- '3.0'
- sharded_cluster
commands:
- func: install dependencies
- func: bootstrap mongo-orchestration
vars:
VERSION: '3.0'
TOPOLOGY: sharded_cluster
- func: run tests
- name: test-2.6-server
tags:
- '2.6'
- server
commands:
- func: install dependencies
- func: bootstrap mongo-orchestration
vars:
VERSION: '2.6'
TOPOLOGY: server
- func: run tests
- name: test-2.6-replica_set
tags:
- '2.6'
- replica_set
commands:
- func: install dependencies
- func: bootstrap mongo-orchestration
vars:
VERSION: '2.6'
TOPOLOGY: replica_set
- func: run tests
- name: test-2.6-sharded_cluster
tags:
- '2.6'
- sharded_cluster
commands:
- func: install dependencies
- func: bootstrap mongo-orchestration
vars:
VERSION: '2.6'
TOPOLOGY: sharded_cluster
- func: run tests
- name: test-latest-server-v1-api
tags:
- latest
- server
- v1-api
commands:
- func: install dependencies
- func: bootstrap mongo-orchestration
vars:
VERSION: latest
TOPOLOGY: server
REQUIRE_API_VERSION: '1'
- func: run tests
vars:
MONGODB_API_VERSION: '1'
NO_EXIT: ''
- name: test-atlas-connectivity
tags:
- atlas-connect
commands:
- func: install dependencies
- func: run atlas tests
- name: test-atlas-data-lake
commands:
- func: install dependencies
- func: bootstrap mongohoused
- func: run data lake tests
- name: test-load-balancer