@@ -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 :
@@ -821,6 +820,40 @@ functions:
821820
822821 MONGODB_URI="${MONGODB_URI}" JAVA_VERSION="${JAVA_VERSION}" .evergreen/run-csfle-tests-with-mongocryptd.sh
823822
823+ " trace artifacts " :
824+ - command : shell.exec
825+ params :
826+ working_dir : " src"
827+ script : |
828+ tag=$(git describe --tags --always --dirty)
829+
830+ # remove the leading 'r'
831+ version=$(echo -n "$tag" | cut -c 2-)
832+
833+ cat <<EOT > trace-expansions.yml
834+ release_version: "$version"
835+ EOT
836+ cat trace-expansions.yml
837+ - command : expansions.update
838+ params :
839+ file : src/trace-expansions.yml
840+ - command : papertrail.trace
841+ params :
842+ key_id : ${papertrail_key_id}
843+ secret_key : ${papertrail_secret_key}
844+ product : ${product}
845+ version : ${release_version}
846+ filenames :
847+ - " src/build/repo/org/mongodb/*/*/*.jar"
848+ - " src/build/repo/org/mongodb/*/*/*.pom"
849+ - " src/build/repo/org/mongodb/*/*/*.asc"
850+ - " src/build/repo/org/mongodb/*/*/*.jar.md5"
851+ - " src/build/repo/org/mongodb/*/*/*.pom.md5"
852+ - " src/build/repo/org/mongodb/*/*/*.asc.md5"
853+ - " src/build/repo/org/mongodb/*/*/*.jar.sha1"
854+ - " src/build/repo/org/mongodb/*/*/*.pom.sha1"
855+ - " src/build/repo/org/mongodb/*/*/*.asc.sha1"
856+
824857 " publish snapshot " :
825858 - command : shell.exec
826859 type : test
@@ -934,6 +967,60 @@ tasks:
934967 - func : " run load-balancer"
935968 - func : " run load-balancer tests"
936969
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+
9371024 - name : serverless-test
9381025 commands :
9391026 - func : " run serverless"
@@ -1491,11 +1578,17 @@ tasks:
14911578 name : " static-analysis"
14921579 commands :
14931580 - func : " publish snapshot"
1581+ - func : " trace artifacts"
1582+ vars :
1583+ product : mongo-java-driver-snapshot
14941584
14951585 - name : publish-release
14961586 git_tag_only : true
14971587 commands :
14981588 - func : " publish release"
1589+ - func : " trace artifacts"
1590+ vars :
1591+ product : mongo-java-driver
14991592
15001593 - name : " perf"
15011594 tags : ["perf"]
@@ -2025,6 +2118,78 @@ task_groups:
20252118 tasks :
20262119 - test-aws-lambda-deployed
20272120
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+
20282193buildvariants :
20292194
20302195# Test packaging and other release related routines
@@ -2176,6 +2341,27 @@ buildvariants:
21762341 tasks :
21772342 - name : " test_atlas_task_group_search_indexes"
21782343
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+
21792365- matrix_name : " aws-auth-test"
21802366 matrix_spec : { ssl: "nossl", jdk: ["jdk8", "jdk17", "jdk21"], version: ["4.4", "5.0", "6.0", "7.0", "latest"], os: "ubuntu",
21812367 aws-credential-provider : " *" }
0 commit comments