Skip to content

Commit 296faac

Browse files
authored
ci(NODE-5653): remove vars from ci config (#3880)
1 parent d766ae2 commit 296faac

File tree

7 files changed

+1576
-1534
lines changed

7 files changed

+1576
-1534
lines changed

.evergreen/ci_matrix_constants.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const versions = [
55
{ codeName: 'hydrogen', versionNumber: 18 },
66
{ codeName: 'iron', versionNumber: 20 }
77
];
8-
const NODE_VERSIONS = versions.map(({ versionNumber }) => versionNumber).sort();
8+
const NODE_VERSIONS = versions.map(({ versionNumber }) => versionNumber).sort((a, b) => a - b);
99
const LOWEST_LTS = NODE_VERSIONS[0];
1010
const LATEST_LTS = NODE_VERSIONS[NODE_VERSIONS.length - 1];
1111

.evergreen/config.in.yml

Lines changed: 87 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ functions:
3838
is_patch: ${is_patch}
3939
project: ${project}
4040
args:
41-
- .evergreen/prepare-shell.sh
41+
- .evergreen/prepare-shell.sh
4242

4343
# Load the expansion file to make an evergreen variable with the current unique version
4444
- command: expansions.update
@@ -409,44 +409,6 @@ functions:
409409
args:
410410
- "${PROJECT_DIRECTORY}/.evergreen/run-typescript.sh"
411411

412-
###########################################
413-
# mongosh functions
414-
###########################################
415-
"compile mongosh":
416-
- command: subprocess.exec
417-
params:
418-
working_dir: src
419-
env:
420-
PROJECT_DIRECTORY: ${PROJECT_DIRECTORY}
421-
TASK_ID: ${task_id}
422-
binary: bash
423-
args:
424-
- "${PROJECT_DIRECTORY}/.evergreen/run-mongosh-integration-tests.sh"
425-
426-
"run mongosh tests for package":
427-
- command: subprocess.exec
428-
params:
429-
working_dir: src
430-
env:
431-
PROJECT_DIRECTORY: ${PROJECT_DIRECTORY}
432-
TASK_ID: ${task_id}
433-
MONGOSH_RUN_ONLY_IN_PACKAGE: ${mongosh_package}
434-
binary: bash
435-
args:
436-
- "${PROJECT_DIRECTORY}/.evergreen/run-mongosh-integration-tests.sh"
437-
438-
"run mongosh package scope test":
439-
- command: subprocess.exec
440-
params:
441-
working_dir: src
442-
env:
443-
PROJECT_DIRECTORY: ${PROJECT_DIRECTORY}
444-
TASK_ID: ${task_id}
445-
binary: bash
446-
args:
447-
- "${PROJECT_DIRECTORY}/.evergreen/run-mongosh-scope-test.sh"
448-
449-
450412
"reset aws instance profile":
451413
- command: shell.exec
452414
params:
@@ -501,14 +463,14 @@ functions:
501463
done
502464
503465
"install dependencies":
504-
- command: shell.exec
466+
- command: subprocess.exec
505467
type: setup
506468
params:
507469
working_dir: "src"
508-
script: |
509-
${PREPARE_SHELL}
510-
NODE_LTS_VERSION=${NODE_LTS_VERSION} NPM_OPTIONS=${NPM_OPTIONS} NPM_VERSION=${NPM_VERSION}\
511-
bash ${PROJECT_DIRECTORY}/.evergreen/install-dependencies.sh
470+
binary: bash
471+
add_expansions_to_env: true
472+
args:
473+
- .evergreen/install-dependencies.sh
512474

513475
"install aws-credential-providers":
514476
- command: shell.exec
@@ -552,6 +514,7 @@ functions:
552514
params:
553515
silent: true
554516
working_dir: "src"
517+
add_expansions_to_env: true
555518
script: |
556519
${PREPARE_SHELL}
557520
cat <<EOT > prepare_client_encryption.sh
@@ -566,6 +529,7 @@ functions:
566529
type: test
567530
params:
568531
working_dir: "src"
532+
add_expansions_to_env: true
569533
script: |
570534
${PREPARE_SHELL}
571535
@@ -612,16 +576,16 @@ functions:
612576
bash ${PROJECT_DIRECTORY}/.evergreen/run-ldap-tests.sh
613577
614578
"run data lake tests":
615-
- command: shell.exec
616-
type: test
617-
params:
618-
working_dir: src
619-
script: |
620-
export PROJECT_DIRECTORY="$(pwd)"
621-
export MONGODB_URI='mongodb://mhuser:pencil@localhost'
622-
export NODE_LTS_VERSION='${NODE_LTS_VERSION}'
579+
- command: shell.exec
580+
type: test
581+
params:
582+
working_dir: src
583+
script: |
584+
export PROJECT_DIRECTORY="$(pwd)"
585+
export MONGODB_URI='mongodb://mhuser:pencil@localhost'
586+
export NODE_LTS_VERSION='${NODE_LTS_VERSION}'
623587
624-
bash ${PROJECT_DIRECTORY}/.evergreen/run-data-lake-tests.sh
588+
bash ${PROJECT_DIRECTORY}/.evergreen/run-data-lake-tests.sh
625589
626590
"run tls tests":
627591
- command: shell.exec
@@ -1056,7 +1020,7 @@ functions:
10561020
params:
10571021
aws_key: ${aws_key}
10581022
aws_secret: ${aws_secret}
1059-
local_file: src/coverage/coverage-final.json
1023+
local_file: src/coverage/coverage-final.json
10601024
optional: true
10611025
# Upload the coverage report for all tasks in a single build to the same directory.
10621026
# TODO NODE-4707 - change upload directory to ${UPLOAD_BUCKET}
@@ -1103,7 +1067,7 @@ functions:
11031067
params:
11041068
aws_key: ${aws_key}
11051069
aws_secret: ${aws_secret}
1106-
local_file: src/coverage-report/index.html
1070+
local_file: src/coverage-report/index.html
11071071
remote_file: mongo-node-driver/${revision}/${version_id}/coverage/index.html
11081072
bucket: mciuploads
11091073
permissions: public-read
@@ -1136,25 +1100,30 @@ tasks:
11361100
- performance
11371101
exec_timeout_secs: 3600
11381102
commands:
1103+
- command: expansions.update
1104+
type: setup
1105+
params:
1106+
updates:
1107+
- { key: NODE_LTS_VERSION, value: v18.16.0 }
1108+
- { key: NPM_VERSION, value: "9" }
1109+
- { key: VERSION, value: v6.0-perf }
1110+
- { key: TOPOLOGY, value: server }
1111+
- { key: AUTH, value: noauth }
11391112
- func: install dependencies
1140-
vars:
1141-
NODE_LTS_VERSION: v18.16.0
1142-
NPM_VERSION: 9
11431113
- func: bootstrap mongo-orchestration
1144-
vars:
1145-
VERSION: v6.0-perf
1146-
TOPOLOGY: server
1147-
AUTH: noauth
11481114
- func: run spec driver benchmarks
11491115
- command: perf.send
11501116
params:
11511117
file: src/results.json
11521118

11531119
- name: "test-gcpkms-task"
11541120
commands:
1121+
- command: expansions.update
1122+
type: setup
1123+
params:
1124+
updates:
1125+
- { key: NPM_VERSION, value: "9" }
11551126
- func: "install dependencies"
1156-
vars:
1157-
NPM_VERSION: 9
11581127
# Upload node driver to a GCP instance
11591128
- command: subprocess.exec
11601129
type: setup
@@ -1184,19 +1153,20 @@ tasks:
11841153
args:
11851154
- ${DRIVERS_TOOLS}/.evergreen/csfle/gcpkms/run-command.sh
11861155

1187-
11881156
- name: "test-gcpkms-fail-task"
11891157
# test-gcpkms-fail-task runs in a non-GCE environment.
11901158
# It is expected to fail to obtain GCE credentials.
11911159
commands:
1160+
- command: expansions.update
1161+
type: setup
1162+
params:
1163+
updates:
1164+
- { key: NPM_VERSION, value: "9" }
1165+
- { key: VERSION, value: "latest" }
1166+
- { key: TOPOLOGY, value: "server" }
1167+
- { key: AUTH, value: "noauth" }
11921168
- func: "install dependencies"
1193-
vars:
1194-
NPM_VERSION: 9
11951169
- func: bootstrap mongo-orchestration
1196-
vars:
1197-
VERSION: latest
1198-
TOPOLOGY: server
1199-
AUTH: noauth
12001170
- command: subprocess.exec
12011171
type: test
12021172
params:
@@ -1206,12 +1176,14 @@ tasks:
12061176
args:
12071177
- src/.evergreen/run-gcp-kms-tests.sh
12081178

1209-
12101179
- name: "test-azurekms-task"
12111180
commands:
1181+
- command: expansions.update
1182+
type: setup
1183+
params:
1184+
updates:
1185+
- { key: NPM_VERSION, value: "9" }
12121186
- func: "install dependencies"
1213-
vars:
1214-
NPM_VERSION: 9
12151187
- command: subprocess.exec
12161188
type: setup
12171189
params:
@@ -1232,14 +1204,16 @@ tasks:
12321204

12331205
- name: "test-azurekms-fail-task"
12341206
commands:
1207+
- command: expansions.update
1208+
type: setup
1209+
params:
1210+
updates:
1211+
- { key: NPM_VERSION, value: "9" }
1212+
- { key: VERSION, value: "latest" }
1213+
- { key: TOPOLOGY, value: "server" }
1214+
- { key: AUTH, value: "noauth" }
12351215
- func: "install dependencies"
1236-
vars:
1237-
NPM_VERSION: 9
12381216
- func: bootstrap mongo-orchestration
1239-
vars:
1240-
VERSION: latest
1241-
TOPOLOGY: server
1242-
AUTH: noauth
12431217
- command: subprocess.exec
12441218
type: test
12451219
params:
@@ -1251,9 +1225,12 @@ tasks:
12511225

12521226
- name: "oidc-auth-test-azure-latest"
12531227
commands:
1228+
- command: expansions.update
1229+
type: setup
1230+
params:
1231+
updates:
1232+
- { key: NPM_VERSION, value: "9" }
12541233
- func: "install dependencies"
1255-
vars:
1256-
NPM_VERSION: 9
12571234
- command: subprocess.exec
12581235
params:
12591236
working_dir: src
@@ -1264,13 +1241,16 @@ tasks:
12641241
AZUREOIDC_CLIENTID: ${testazureoidc_clientid}
12651242
PROVIDER_NAME: azure
12661243
args:
1267-
- .evergreen/run-oidc-tests-azure.sh
1244+
- .evergreen/run-oidc-tests-azure.sh
12681245

12691246
- name: "test-aws-lambda-deployed"
12701247
commands:
1248+
- command: expansions.update
1249+
type: setup
1250+
params:
1251+
updates:
1252+
- { key: NPM_VERSION, value: "9" }
12711253
- func: "install dependencies"
1272-
vars:
1273-
NPM_VERSION: 9
12741254
- command: ec2.assume_role
12751255
params:
12761256
role_arn: ${LAMBDA_AWS_ROLE_ARN}
@@ -1391,31 +1371,31 @@ task_groups:
13911371

13921372
- name: testazureoidc_task_group
13931373
setup_group:
1394-
- func: fetch source
1395-
- command: shell.exec
1396-
params:
1397-
shell: bash
1398-
script: |-
1399-
set -o errexit
1400-
${PREPARE_SHELL}
1401-
export AZUREOIDC_CLIENTID="${testazureoidc_clientid}"
1402-
export AZUREOIDC_TENANTID="${testazureoic_tenantid}"
1403-
export AZUREOIDC_SECRET="${testazureoidc_secret}"
1404-
export AZUREOIDC_KEYVAULT=${testazureoidc_keyvault}
1405-
export AZUREOIDC_DRIVERS_TOOLS="$DRIVERS_TOOLS"
1406-
export AZUREOIDC_VMNAME_PREFIX="NODE_DRIVER"
1407-
$DRIVERS_TOOLS/.evergreen/auth_oidc/azure/create-and-setup-vm.sh
1374+
- func: fetch source
1375+
- command: shell.exec
1376+
params:
1377+
shell: bash
1378+
script: |-
1379+
set -o errexit
1380+
${PREPARE_SHELL}
1381+
export AZUREOIDC_CLIENTID="${testazureoidc_clientid}"
1382+
export AZUREOIDC_TENANTID="${testazureoic_tenantid}"
1383+
export AZUREOIDC_SECRET="${testazureoidc_secret}"
1384+
export AZUREOIDC_KEYVAULT=${testazureoidc_keyvault}
1385+
export AZUREOIDC_DRIVERS_TOOLS="$DRIVERS_TOOLS"
1386+
export AZUREOIDC_VMNAME_PREFIX="NODE_DRIVER"
1387+
$DRIVERS_TOOLS/.evergreen/auth_oidc/azure/create-and-setup-vm.sh
14081388
teardown_group:
1409-
- command: shell.exec
1410-
params:
1411-
shell: bash
1412-
script: |-
1413-
${PREPARE_SHELL}
1414-
$DRIVERS_TOOLS/.evergreen/auth_oidc/azure/delete-vm.sh
1389+
- command: shell.exec
1390+
params:
1391+
shell: bash
1392+
script: |-
1393+
${PREPARE_SHELL}
1394+
$DRIVERS_TOOLS/.evergreen/auth_oidc/azure/delete-vm.sh
14151395
setup_group_can_fail_task: true
14161396
setup_group_timeout_secs: 1800
14171397
tasks:
1418-
- oidc-auth-test-azure-latest
1398+
- oidc-auth-test-azure-latest
14191399

14201400
- name: test_atlas_task_group
14211401
setup_group:
@@ -1456,7 +1436,7 @@ post:
14561436
- func: "cleanup"
14571437

14581438
ignore:
1459-
- '*.md'
1439+
- "*.md"
14601440
buildvariants:
14611441
- name: performance-tests
14621442
display_name: Performance Test

0 commit comments

Comments
 (0)