@@ -123,58 +123,6 @@ functions:
123
123
env :
124
124
DRIVERS_TOOLS : ${DRIVERS_TOOLS}
125
125
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
-
178
126
" run tests " :
179
127
- command : shell.exec
180
128
type : test
@@ -1260,23 +1208,75 @@ tasks:
1260
1208
1261
1209
- name : " oidc-auth-test-azure-latest"
1262
1210
commands :
1263
- - command : expansions.update
1264
- type : setup
1265
- params :
1266
- updates :
1267
- - { key: NPM_VERSION, value: "9" }
1268
1211
- func : " install dependencies"
1269
1212
- command : subprocess.exec
1213
+ type : test
1270
1214
params :
1271
1215
working_dir : src
1272
1216
binary : bash
1273
1217
env :
1274
1218
DRIVERS_TOOLS : ${DRIVERS_TOOLS}
1275
1219
PROJECT_DIRECTORY : ${PROJECT_DIRECTORY}
1276
- AZUREOIDC_CLIENTID : ${testazureoidc_clientid}
1277
- PROVIDER_NAME : azure
1220
+ ENVIRONMENT : azure
1221
+ SCRIPT : run-oidc-prose-tests.sh
1278
1222
args :
1279
1223
- .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
1280
1280
1281
1281
- name : " test-aws-lambda-deployed"
1282
1282
commands :
@@ -1428,6 +1428,25 @@ task_groups:
1428
1428
tasks :
1429
1429
- test-azurekms-task
1430
1430
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
+
1431
1450
- name : testazureoidc_task_group
1432
1451
setup_group :
1433
1452
- func : fetch source
@@ -1437,25 +1456,43 @@ task_groups:
1437
1456
script : |-
1438
1457
set -o errexit
1439
1458
${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"
1445
1459
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 :
1448
1462
- command : shell.exec
1449
1463
params :
1450
1464
shell : bash
1451
1465
script : |-
1452
1466
${PREPARE_SHELL}
1453
- $DRIVERS_TOOLS/.evergreen/auth_oidc/azure/delete-vm .sh
1467
+ $DRIVERS_TOOLS/.evergreen/auth_oidc/azure/teardown .sh
1454
1468
setup_group_can_fail_task : true
1455
1469
setup_group_timeout_secs : 1800
1456
1470
tasks :
1457
1471
- oidc-auth-test-azure-latest
1458
1472
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
+
1459
1496
- name : test_atlas_task_group
1460
1497
setup_group :
1461
1498
- func : fetch source
@@ -1471,7 +1508,7 @@ task_groups:
1471
1508
- command : expansions.update
1472
1509
params :
1473
1510
file : src/atlas-expansion.yml
1474
- teardown_group :
1511
+ teardown_task :
1475
1512
- command : subprocess.exec
1476
1513
params :
1477
1514
working_dir : src
@@ -1499,7 +1536,7 @@ task_groups:
1499
1536
- command : expansions.update
1500
1537
params :
1501
1538
file : src/atlas-expansion.yml
1502
- teardown_group :
1539
+ teardown_task :
1503
1540
- command : subprocess.exec
1504
1541
params :
1505
1542
working_dir : src
0 commit comments