@@ -12,9 +12,8 @@ stepback: true
1212# Actual testing tasks are marked with `type: test`
1313command_type : system
1414
15- # Protect ourself against rogue test case, or curl gone wild, that runs forever
16- # 12 minutes is the longest we'll ever run
17- exec_timeout_secs : 3600 # 12 minutes is the longest we'll ever run
15+ # Protect ourselves against rogue test case, or curl gone wild, that runs forever
16+ exec_timeout_secs : 3600
1817
1918# What to do when evergreen hits the timeout (`post:` tasks are run automatically)
2019timeout :
@@ -968,6 +967,60 @@ tasks:
968967 - func : " run load-balancer"
969968 - func : " run load-balancer tests"
970969
970+ - name : " oidc-auth-test"
971+ commands :
972+ - command : subprocess.exec
973+ type : test
974+ params :
975+ working_dir : " src"
976+ binary : bash
977+ include_expansions_in_env : ["DRIVERS_TOOLS", "AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_SESSION_TOKEN"]
978+ env :
979+ OIDC_ENV : " test"
980+ args :
981+ - .evergreen/run-mongodb-oidc-test.sh
982+
983+ - name : " oidc-auth-test-azure"
984+ commands :
985+ - command : shell.exec
986+ params :
987+ shell : bash
988+ env :
989+ JAVA_HOME : ${JAVA_HOME}
990+ script : |-
991+ set -o errexit
992+ ${PREPARE_SHELL}
993+ cd src
994+ git add .
995+ git commit -m "add files"
996+ # uncompressed tar used to allow appending .git folder
997+ export AZUREOIDC_DRIVERS_TAR_FILE=/tmp/mongo-java-driver.tar
998+ git archive -o $AZUREOIDC_DRIVERS_TAR_FILE HEAD
999+ tar -rf $AZUREOIDC_DRIVERS_TAR_FILE .git
1000+ export AZUREOIDC_TEST_CMD="OIDC_ENV=azure ./.evergreen/run-mongodb-oidc-test.sh"
1001+ bash $DRIVERS_TOOLS/.evergreen/auth_oidc/azure/run-driver-test.sh
1002+
1003+ - name : " oidc-auth-test-gcp"
1004+ commands :
1005+ - command : shell.exec
1006+ params :
1007+ shell : bash
1008+ script : |-
1009+ set -o errexit
1010+ ${PREPARE_SHELL}
1011+ cd src
1012+ git add .
1013+ git commit -m "add files"
1014+ # uncompressed tar used to allow appending .git folder
1015+ export GCPOIDC_DRIVERS_TAR_FILE=/tmp/mongo-java-driver.tar
1016+ git archive -o $GCPOIDC_DRIVERS_TAR_FILE HEAD
1017+ tar -rf $GCPOIDC_DRIVERS_TAR_FILE .git
1018+ # Define the command to run on the VM.
1019+ # Ensure that we source the environment file created for us, set up any other variables we need,
1020+ # and then run our test suite on the vm.
1021+ export GCPOIDC_TEST_CMD="OIDC_ENV=gcp ./.evergreen/run-mongodb-oidc-test.sh"
1022+ bash $DRIVERS_TOOLS/.evergreen/auth_oidc/gcp/run-driver-test.sh
1023+
9711024 - name : serverless-test
9721025 commands :
9731026 - func : " run serverless"
@@ -2065,6 +2118,78 @@ task_groups:
20652118 tasks :
20662119 - test-aws-lambda-deployed
20672120
2121+ - name : testoidc_task_group
2122+ setup_group :
2123+ - func : fetch source
2124+ - func : prepare resources
2125+ - func : fix absolute paths
2126+ - command : ec2.assume_role
2127+ params :
2128+ role_arn : ${aws_test_secrets_role}
2129+ - command : subprocess.exec
2130+ params :
2131+ binary : bash
2132+ include_expansions_in_env : ["AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_SESSION_TOKEN"]
2133+ args :
2134+ - ${DRIVERS_TOOLS}/.evergreen/auth_oidc/setup.sh
2135+ teardown_task :
2136+ - command : subprocess.exec
2137+ params :
2138+ binary : bash
2139+ args :
2140+ - ${DRIVERS_TOOLS}/.evergreen/auth_oidc/teardown.sh
2141+ setup_group_can_fail_task : true
2142+ setup_group_timeout_secs : 1800
2143+ tasks :
2144+ - oidc-auth-test
2145+
2146+ - name : testazureoidc_task_group
2147+ setup_group :
2148+ - func : fetch source
2149+ - func : prepare resources
2150+ - func : fix absolute paths
2151+ - command : subprocess.exec
2152+ params :
2153+ binary : bash
2154+ env :
2155+ AZUREOIDC_VMNAME_PREFIX : " JAVA_DRIVER"
2156+ args :
2157+ - ${DRIVERS_TOOLS}/.evergreen/auth_oidc/azure/create-and-setup-vm.sh
2158+ teardown_task :
2159+ - command : subprocess.exec
2160+ params :
2161+ binary : bash
2162+ args :
2163+ - ${DRIVERS_TOOLS}/.evergreen/auth_oidc/azure/delete-vm.sh
2164+ setup_group_can_fail_task : true
2165+ setup_group_timeout_secs : 1800
2166+ tasks :
2167+ - oidc-auth-test-azure
2168+
2169+ - name : testgcpoidc_task_group
2170+ setup_group :
2171+ - func : fetch source
2172+ - func : prepare resources
2173+ - func : fix absolute paths
2174+ - command : subprocess.exec
2175+ params :
2176+ binary : bash
2177+ env :
2178+ GCPOIDC_VMNAME_PREFIX : " JAVA_DRIVER"
2179+ GCPKMS_MACHINETYPE : " e2-medium" # comparable elapsed time to Azure; default was starved, caused timeouts
2180+ args :
2181+ - ${DRIVERS_TOOLS}/.evergreen/auth_oidc/gcp/setup.sh
2182+ teardown_task :
2183+ - command : subprocess.exec
2184+ params :
2185+ binary : bash
2186+ args :
2187+ - ${DRIVERS_TOOLS}/.evergreen/auth_oidc/gcp/teardown.sh
2188+ setup_group_can_fail_task : true
2189+ setup_group_timeout_secs : 1800
2190+ tasks :
2191+ - oidc-auth-test-gcp
2192+
20682193buildvariants :
20692194
20702195# Test packaging and other release related routines
@@ -2216,6 +2341,27 @@ buildvariants:
22162341 tasks :
22172342 - name : " test_atlas_task_group_search_indexes"
22182343
2344+ - name : " oidc-auth-test"
2345+ display_name : " OIDC Auth"
2346+ run_on : ubuntu2204-small
2347+ tasks :
2348+ - name : testoidc_task_group
2349+ batchtime : 20160 # 14 days
2350+
2351+ - name : testazureoidc-variant
2352+ display_name : " OIDC Auth Azure"
2353+ run_on : ubuntu2204-small
2354+ tasks :
2355+ - name : testazureoidc_task_group
2356+ batchtime : 20160 # 14 days
2357+
2358+ - name : testgcpoidc-variant
2359+ display_name : " OIDC Auth GCP"
2360+ run_on : ubuntu2204-small
2361+ tasks :
2362+ - name : testgcpoidc_task_group
2363+ batchtime : 20160 # 14 days
2364+
22192365- matrix_name : " aws-auth-test"
22202366 matrix_spec : { ssl: "nossl", jdk: ["jdk8", "jdk17", "jdk21"], version: ["4.4", "5.0", "6.0", "7.0", "latest"], os: "ubuntu",
22212367 aws-credential-provider : " *" }
0 commit comments