@@ -837,6 +837,30 @@ functions:
837
837
${PREPARE_SHELL}
838
838
MONGODB_URI="${MONGODB_URI}" JAVA_VERSION="${JAVA_VERSION}" .evergreen/run-graalvm-native-image-app.sh
839
839
840
+ " oidc-auth-test-k8s-func " :
841
+ - command : shell.exec
842
+ type : test
843
+ params :
844
+ shell : bash
845
+ include_expansions_in_env : ["AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_SESSION_TOKEN"]
846
+ script : |-
847
+ set -o errexit
848
+ ${PREPARE_SHELL}
849
+ export K8S_VARIANT=${VARIANT}
850
+ cd src
851
+ git add .
852
+ git commit --allow-empty -m "add files"
853
+ # uncompressed tar used to allow appending .git folder
854
+ export K8S_DRIVERS_TAR_FILE=/tmp/mongo-java-driver.tar
855
+ git archive -o $K8S_DRIVERS_TAR_FILE HEAD
856
+ tar -rf $K8S_DRIVERS_TAR_FILE .git
857
+ export K8S_TEST_CMD="OIDC_ENV=k8s VARIANT=${VARIANT} ./.evergreen/run-mongodb-oidc-test.sh"
858
+ bash $DRIVERS_TOOLS/.evergreen/auth_oidc/k8s/setup-pod.sh
859
+ bash $DRIVERS_TOOLS/.evergreen/auth_oidc/k8s/run-self-test.sh
860
+ source $DRIVERS_TOOLS/.evergreen/auth_oidc/k8s/secrets-export.sh
861
+ bash $DRIVERS_TOOLS/.evergreen/auth_oidc/k8s/run-driver-test.sh
862
+ bash $DRIVERS_TOOLS/.evergreen/auth_oidc/k8s/teardown-pod.sh
863
+
840
864
# Anchors
841
865
842
866
pre :
@@ -960,6 +984,22 @@ tasks:
960
984
export GCPOIDC_TEST_CMD="OIDC_ENV=gcp ./.evergreen/run-mongodb-oidc-test.sh"
961
985
bash $DRIVERS_TOOLS/.evergreen/auth_oidc/gcp/run-driver-test.sh
962
986
987
+ - name : " oidc-auth-test-k8s"
988
+ commands :
989
+ - command : ec2.assume_role
990
+ params :
991
+ role_arn : ${aws_test_secrets_role}
992
+ duration_seconds : 1800
993
+ - func : " oidc-auth-test-k8s-func"
994
+ vars :
995
+ VARIANT : eks
996
+ - func : " oidc-auth-test-k8s-func"
997
+ vars :
998
+ VARIANT : aks
999
+ - func : " oidc-auth-test-k8s-func"
1000
+ vars :
1001
+ VARIANT : gke
1002
+
963
1003
- name : serverless-test
964
1004
commands :
965
1005
- func : " run serverless"
@@ -2050,7 +2090,7 @@ task_groups:
2050
2090
tasks :
2051
2091
- test-aws-lambda-deployed
2052
2092
2053
- - name : testoidc_task_group
2093
+ - name : test-oidc-task-group
2054
2094
setup_group :
2055
2095
- func : fetch source
2056
2096
- func : prepare resources
@@ -2075,7 +2115,7 @@ task_groups:
2075
2115
tasks :
2076
2116
- oidc-auth-test
2077
2117
2078
- - name : testazureoidc_task_group
2118
+ - name : test-oidc-azure-task-group
2079
2119
setup_group :
2080
2120
- func : fetch source
2081
2121
- func : prepare resources
@@ -2098,7 +2138,7 @@ task_groups:
2098
2138
tasks :
2099
2139
- oidc-auth-test-azure
2100
2140
2101
- - name : testgcpoidc_task_group
2141
+ - name : test-oidc-gcp-task-group
2102
2142
setup_group :
2103
2143
- func : fetch source
2104
2144
- func : prepare resources
@@ -2122,6 +2162,33 @@ task_groups:
2122
2162
tasks :
2123
2163
- oidc-auth-test-gcp
2124
2164
2165
+ - name : test-oidc-k8s-task-group
2166
+ setup_group_can_fail_task : true
2167
+ setup_group_timeout_secs : 1800
2168
+ teardown_task_can_fail_task : true
2169
+ teardown_group_timeout_secs : 180
2170
+ setup_group :
2171
+ - func : fetch source
2172
+ - func : prepare resources
2173
+ - func : fix absolute paths
2174
+ - command : ec2.assume_role
2175
+ params :
2176
+ role_arn : ${aws_test_secrets_role}
2177
+ - command : subprocess.exec
2178
+ params :
2179
+ binary : bash
2180
+ include_expansions_in_env : ["AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_SESSION_TOKEN"]
2181
+ args :
2182
+ - ${DRIVERS_TOOLS}/.evergreen/auth_oidc/k8s/setup.sh
2183
+ teardown_group :
2184
+ - command : subprocess.exec
2185
+ params :
2186
+ binary : bash
2187
+ args :
2188
+ - ${DRIVERS_TOOLS}/.evergreen/auth_oidc/k8s/teardown.sh
2189
+ tasks :
2190
+ - oidc-auth-test-k8s
2191
+
2125
2192
buildvariants :
2126
2193
2127
2194
# Test packaging and other release related routines
@@ -2301,25 +2368,32 @@ buildvariants:
2301
2368
tasks :
2302
2369
- name : " test_atlas_task_group_search_indexes"
2303
2370
2304
- - name : " oidc-auth-test"
2371
+ - name : oidc-auth-test
2305
2372
display_name : " OIDC Auth"
2306
2373
run_on : ubuntu2204-small
2307
2374
tasks :
2308
- - name : testoidc_task_group
2375
+ - name : test-oidc-task-group
2309
2376
batchtime : 20160 # 14 days
2310
2377
2311
- - name : testazureoidc -variant
2378
+ - name : test-oidc-azure -variant
2312
2379
display_name : " OIDC Auth Azure"
2313
2380
run_on : ubuntu2204-small
2314
2381
tasks :
2315
- - name : testazureoidc_task_group
2382
+ - name : test-oidc-azure-task-group
2316
2383
batchtime : 20160 # 14 days
2317
2384
2318
- - name : testgcpoidc -variant
2385
+ - name : test-oidc-gcp -variant
2319
2386
display_name : " OIDC Auth GCP"
2320
2387
run_on : ubuntu2204-small
2321
2388
tasks :
2322
- - name : testgcpoidc_task_group
2389
+ - name : test-oidc-gcp-task-group
2390
+ batchtime : 20160 # 14 days
2391
+
2392
+ - name : test-oidc-k8s-variant
2393
+ display_name : " OIDC Auth K8S"
2394
+ run_on : ubuntu2204-small
2395
+ tasks :
2396
+ - name : test-oidc-k8s-task-group
2323
2397
batchtime : 20160 # 14 days
2324
2398
2325
2399
- matrix_name : " aws-auth-test"
0 commit comments