@@ -307,6 +307,7 @@ buildvariants:
307
307
tasks :
308
308
- testoidc_task_group
309
309
- testazureoidc_task_group
310
+ - testgcpoidc_task_group
310
311
311
312
- name : oidc-macos
312
313
display_name : " OIDC Macos"
@@ -331,6 +332,7 @@ buildvariants:
331
332
tasks :
332
333
- testoidc_task_group
333
334
- testazureoidc_task_group
335
+ - testgcpoidc_task_group
334
336
335
337
- name : in-use-encryption
336
338
display_name : " In-Use Encryption"
@@ -653,14 +655,13 @@ task_groups:
653
655
- func : fix absolute paths
654
656
- func : init test-results
655
657
- func : make files executable
656
- - command : shell .exec
658
+ - command : subprocess .exec
657
659
params :
658
- shell : bash
660
+ binary : bash
659
661
env :
660
662
AZUREOIDC_VMNAME_PREFIX : " RUST_DRIVER"
661
- script : |
662
- ${PREPARE_SHELL}
663
- ${DRIVERS_TOOLS}/.evergreen/auth_oidc/azure/create-and-setup-vm.sh
663
+ args :
664
+ - ${DRIVERS_TOOLS}/.evergreen/auth_oidc/azure/create-and-setup-vm.sh
664
665
teardown_task :
665
666
- command : subprocess.exec
666
667
params :
@@ -672,6 +673,32 @@ task_groups:
672
673
tasks :
673
674
- oidc-auth-test-azure-latest
674
675
676
+ - name : testgcpoidc_task_group
677
+ setup_group :
678
+ - func : fetch source
679
+ - func : create expansions
680
+ - func : prepare resources
681
+ - func : fix absolute paths
682
+ - func : init test-results
683
+ - func : make files executable
684
+ - command : subprocess.exec
685
+ params :
686
+ binary : bash
687
+ env :
688
+ GCPOIDC_VMNAME_PREFIX : " RUST_DRIVER"
689
+ args :
690
+ - ${DRIVERS_TOOLS}/.evergreen/auth_oidc/gcp/setup.sh
691
+ teardown_task :
692
+ - command : subprocess.exec
693
+ params :
694
+ binary : bash
695
+ args :
696
+ - ${DRIVERS_TOOLS}/.evergreen/auth_oidc/gcp/teardown.sh
697
+ setup_group_can_fail_task : true
698
+ setup_group_timeout_secs : 1800
699
+ tasks :
700
+ - oidc-auth-test-gcp-latest
701
+
675
702
# ########
676
703
# Tasks #
677
704
# ########
@@ -1081,15 +1108,53 @@ tasks:
1081
1108
script : |-
1082
1109
set -o errexit
1083
1110
${PREPARE_SHELL}
1084
- git add .
1085
- git commit -m "add files"
1086
- export AZUREOIDC_DRIVERS_TAR_FILE=/tmp/mongo-rust-driver.tgz
1087
- git archive -o $AZUREOIDC_DRIVERS_TAR_FILE HEAD
1088
- export AZUREOIDC_TEST_CMD="PROJECT_DIRECTORY='.' ./.evergreen/install-dependencies.sh rust\
1089
- && PROJECT_DIRECTORY='.' .evergreen/install-dependencies.sh junit-dependencies\
1090
- && PROJECT_DIRECTORY='.' OIDC_ENV=azure OIDC=oidc ./.evergreen/run-mongodb-oidc-test.sh"
1111
+ ./.evergreen/install-dependencies.sh rust
1112
+ source .cargo/env
1113
+ export AZUREOIDC_DRIVERS_TAR_FILE=/tmp/mongo-rust-driver.tar
1114
+ rustup default stable
1115
+ export RUSTFLAGS="-C target-feature=+crt-static"
1116
+ cargo test --features azure-oidc --target x86_64-unknown-linux-gnu get_exe_name -- --ignored
1117
+ export TEST_FILE=$(cat exe_name.txt)
1118
+ rm "$AZUREOIDC_DRIVERS_TAR_FILE" || true
1119
+ tar -cf $AZUREOIDC_DRIVERS_TAR_FILE $TEST_FILE
1120
+ tar -uf $AZUREOIDC_DRIVERS_TAR_FILE ./.evergreen
1121
+ rm "$AZUREOIDC_DRIVERS_TAR_FILE".gz || true
1122
+ gzip $AZUREOIDC_DRIVERS_TAR_FILE
1123
+ export AZUREOIDC_DRIVERS_TAR_FILE=/tmp/mongo-rust-driver.tar.gz
1124
+ # Define the command to run on the azure VM.
1125
+ # Ensure that we source the environment file created for us, set up any other variables we need,
1126
+ # and then run our test suite on the vm.
1127
+ export AZUREOIDC_TEST_CMD="ls -laR data && PROJECT_DIRECTORY='.' OIDC_ENV=azure OIDC=oidc TEST_FILE=./$TEST_FILE ./.evergreen/run-mongodb-oidc-test.sh"
1091
1128
bash $DRIVERS_TOOLS/.evergreen/auth_oidc/azure/run-driver-test.sh
1092
1129
1130
+ - name : " oidc-auth-test-gcp-latest"
1131
+ commands :
1132
+ - command : shell.exec
1133
+ params :
1134
+ working_dir : src
1135
+ shell : bash
1136
+ script : |-
1137
+ set -o errexit
1138
+ ${PREPARE_SHELL}
1139
+ ./.evergreen/install-dependencies.sh rust
1140
+ source .cargo/env
1141
+ export GCPOIDC_DRIVERS_TAR_FILE=/tmp/mongo-rust-driver.tar
1142
+ rustup default stable
1143
+ export RUSTFLAGS="-C target-feature=+crt-static"
1144
+ cargo test --features gcp-oidc --target x86_64-unknown-linux-gnu test::atlas_planned_maintenance_testing::get_exe_name -- --ignored
1145
+ export TEST_FILE=$(cat exe_name.txt)
1146
+ rm "$GCPOIDC_DRIVERS_TAR_FILE" || true
1147
+ tar -cf $GCPOIDC_DRIVERS_TAR_FILE $TEST_FILE
1148
+ tar -uf $GCPOIDC_DRIVERS_TAR_FILE ./.evergreen
1149
+ rm "$GCPOIDC_DRIVERS_TAR_FILE".gz || true
1150
+ gzip $GCPOIDC_DRIVERS_TAR_FILE
1151
+ export GCPOIDC_DRIVERS_TAR_FILE=/tmp/mongo-rust-driver.tar.gz
1152
+ # Define the command to run on the gcp VM.
1153
+ # Ensure that we source the environment file created for us, set up any other variables we need,
1154
+ # and then run our test suite on the vm.
1155
+ export GCPOIDC_TEST_CMD="ls -la && PROJECT_DIRECTORY='.' OIDC_ENV=gcp OIDC=oidc TEST_FILE=./$TEST_FILE ./.evergreen/run-mongodb-oidc-test.sh"
1156
+ bash $DRIVERS_TOOLS/.evergreen/auth_oidc/gcp/run-driver-test.sh
1157
+
1093
1158
# ############
1094
1159
# Functions #
1095
1160
# ############
0 commit comments