@@ -123,58 +123,6 @@ functions:
123123 env :
124124 DRIVERS_TOOLS : ${DRIVERS_TOOLS}
125125
126- " bootstrap oidc " :
127- - command : ec2.assume_role
128- params :
129- role_arn : ${OIDC_AWS_ROLE_ARN}
130- - command : shell.exec
131- type : test
132- params :
133- working_dir : " src"
134- shell : bash
135- script : |
136- ${PREPARE_SHELL}
137- cd "${DRIVERS_TOOLS}"/.evergreen/auth_oidc
138-
139- # This is a bit confusing but the ec2.assume_role command before
140- # this task will overwrite these variables to a different value
141- # than we have set in our evergreen project config. As these are
142- # now specific to the OIDC ARN, we re-export for the python
143- # scripts.
144- export AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
145- export AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
146- export AWS_SESSION_TOKEN=${AWS_SESSION_TOKEN}
147- export OIDC_TOKEN_DIR=/tmp/tokens
148-
149- . ./activate-authoidcvenv.sh
150- python oidc_write_orchestration.py
151- python oidc_get_tokens.py
152-
153- " setup oidc roles " :
154- - command : subprocess.exec
155- params :
156- working_dir : src
157- binary : bash
158- args :
159- - .evergreen/setup-oidc-roles.sh
160- env :
161- DRIVERS_TOOLS : ${DRIVERS_TOOLS}
162-
163- " run oidc tests aws " :
164- - command : shell.exec
165- type : test
166- params :
167- working_dir : " src"
168- timeout_secs : 300
169- shell : bash
170- script : |
171- ${PREPARE_SHELL}
172-
173- OIDC_TOKEN_DIR="/tmp/tokens" \
174- AWS_WEB_IDENTITY_TOKEN_FILE="/tmp/tokens/test_user1" \
175- PROJECT_DIRECTORY="${PROJECT_DIRECTORY}" \
176- bash ${PROJECT_DIRECTORY}/.evergreen/run-oidc-tests.sh
177-
178126 " run tests " :
179127 - command : shell.exec
180128 type : test
@@ -1260,23 +1208,75 @@ tasks:
12601208
12611209 - name : " oidc-auth-test-azure-latest"
12621210 commands :
1263- - command : expansions.update
1264- type : setup
1265- params :
1266- updates :
1267- - { key: NPM_VERSION, value: "9" }
12681211 - func : " install dependencies"
12691212 - command : subprocess.exec
1213+ type : test
12701214 params :
12711215 working_dir : src
12721216 binary : bash
12731217 env :
12741218 DRIVERS_TOOLS : ${DRIVERS_TOOLS}
12751219 PROJECT_DIRECTORY : ${PROJECT_DIRECTORY}
1276- AZUREOIDC_CLIENTID : ${testazureoidc_clientid}
1277- PROVIDER_NAME : azure
1220+ ENVIRONMENT : azure
1221+ SCRIPT : run-oidc-prose-tests.sh
12781222 args :
12791223 - .evergreen/run-oidc-tests-azure.sh
1224+ - command : subprocess.exec
1225+ type : test
1226+ params :
1227+ working_dir : src
1228+ binary : bash
1229+ env :
1230+ DRIVERS_TOOLS : ${DRIVERS_TOOLS}
1231+ PROJECT_DIRECTORY : ${PROJECT_DIRECTORY}
1232+ ENVIRONMENT : azure
1233+ SCRIPT : run-oidc-unified-tests.sh
1234+ args :
1235+ - .evergreen/run-oidc-tests-azure.sh
1236+
1237+ - name : " oidc-auth-test-test-latest"
1238+ commands :
1239+ - func : " install dependencies"
1240+ - command : subprocess.exec
1241+ type : test
1242+ params :
1243+ working_dir : src
1244+ binary : bash
1245+ env :
1246+ DRIVERS_TOOLS : ${DRIVERS_TOOLS}
1247+ PROJECT_DIRECTORY : ${PROJECT_DIRECTORY}
1248+ ENVIRONMENT : test
1249+ SCRIPT : run-oidc-prose-tests.sh
1250+ args :
1251+ - .evergreen/run-oidc-tests-test.sh
1252+ - command : subprocess.exec
1253+ type : test
1254+ params :
1255+ working_dir : src
1256+ binary : bash
1257+ env :
1258+ DRIVERS_TOOLS : ${DRIVERS_TOOLS}
1259+ PROJECT_DIRECTORY : ${PROJECT_DIRECTORY}
1260+ ENVIRONMENT : test
1261+ SCRIPT : run-oidc-unified-tests.sh
1262+ args :
1263+ - .evergreen/run-oidc-tests-test.sh
1264+
1265+ - name : " oidc-auth-test-gcp-latest"
1266+ commands :
1267+ - func : " install dependencies"
1268+ - command : subprocess.exec
1269+ type : test
1270+ params :
1271+ working_dir : src
1272+ binary : bash
1273+ env :
1274+ DRIVERS_TOOLS : ${DRIVERS_TOOLS}
1275+ PROJECT_DIRECTORY : ${PROJECT_DIRECTORY}
1276+ ENVIRONMENT : gcp
1277+ SCRIPT : run-oidc-prose-tests.sh
1278+ args :
1279+ - .evergreen/run-oidc-tests-gcp.sh
12801280
12811281 - name : " test-aws-lambda-deployed"
12821282 commands :
@@ -1428,6 +1428,25 @@ task_groups:
14281428 tasks :
14291429 - test-azurekms-task
14301430
1431+ - name : testtestoidc_task_group
1432+ setup_group :
1433+ - func : fetch source
1434+ - command : ec2.assume_role
1435+ params :
1436+ role_arn : ${OIDC_AWS_ROLE_ARN}
1437+ - command : subprocess.exec
1438+ params :
1439+ binary : bash
1440+ include_expansions_in_env : ["AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_SESSION_TOKEN"]
1441+ env :
1442+ MONGODB_VERSION : " 8.0"
1443+ args :
1444+ - ${DRIVERS_TOOLS}/.evergreen/auth_oidc/setup.sh
1445+ setup_group_can_fail_task : true
1446+ setup_group_timeout_secs : 1800
1447+ tasks :
1448+ - oidc-auth-test-test-latest
1449+
14311450 - name : testazureoidc_task_group
14321451 setup_group :
14331452 - func : fetch source
@@ -1437,25 +1456,43 @@ task_groups:
14371456 script : |-
14381457 set -o errexit
14391458 ${PREPARE_SHELL}
1440- export AZUREOIDC_CLIENTID="${testazureoidc_clientid}"
1441- export AZUREOIDC_TENANTID="${testazureoic_tenantid}"
1442- export AZUREOIDC_SECRET="${testazureoidc_secret}"
1443- export AZUREOIDC_KEYVAULT=${testazureoidc_keyvault}
1444- export AZUREOIDC_DRIVERS_TOOLS="$DRIVERS_TOOLS"
14451459 export AZUREOIDC_VMNAME_PREFIX="NODE_DRIVER"
1446- $DRIVERS_TOOLS/.evergreen/auth_oidc/azure/create-and- setup-vm .sh
1447- teardown_group :
1460+ $DRIVERS_TOOLS/.evergreen/auth_oidc/azure/setup.sh
1461+ teardown_task :
14481462 - command : shell.exec
14491463 params :
14501464 shell : bash
14511465 script : |-
14521466 ${PREPARE_SHELL}
1453- $DRIVERS_TOOLS/.evergreen/auth_oidc/azure/delete-vm .sh
1467+ $DRIVERS_TOOLS/.evergreen/auth_oidc/azure/teardown .sh
14541468 setup_group_can_fail_task : true
14551469 setup_group_timeout_secs : 1800
14561470 tasks :
14571471 - oidc-auth-test-azure-latest
14581472
1473+ - name : testgcpoidc_task_group
1474+ setup_group :
1475+ - func : fetch source
1476+ - command : shell.exec
1477+ params :
1478+ shell : bash
1479+ script : |-
1480+ set -o errexit
1481+ ${PREPARE_SHELL}
1482+ export GCPOIDC_VMNAME_PREFIX="NODE_DRIVER"
1483+ $DRIVERS_TOOLS/.evergreen/auth_oidc/gcp/setup.sh
1484+ teardown_task :
1485+ - command : shell.exec
1486+ params :
1487+ shell : bash
1488+ script : |-
1489+ ${PREPARE_SHELL}
1490+ $DRIVERS_TOOLS/.evergreen/auth_oidc/gcp/teardown.sh
1491+ setup_group_can_fail_task : true
1492+ setup_group_timeout_secs : 1800
1493+ tasks :
1494+ - oidc-auth-test-gcp-latest
1495+
14591496 - name : test_atlas_task_group
14601497 setup_group :
14611498 - func : fetch source
@@ -1471,7 +1508,7 @@ task_groups:
14711508 - command : expansions.update
14721509 params :
14731510 file : src/atlas-expansion.yml
1474- teardown_group :
1511+ teardown_task :
14751512 - command : subprocess.exec
14761513 params :
14771514 working_dir : src
@@ -1499,7 +1536,7 @@ task_groups:
14991536 - command : expansions.update
15001537 params :
15011538 file : src/atlas-expansion.yml
1502- teardown_group :
1539+ teardown_task :
15031540 - command : subprocess.exec
15041541 params :
15051542 working_dir : src
0 commit comments