Skip to content

Commit

Permalink
ci(NODE-5653): remove vars from ci config (#3880)
Browse files Browse the repository at this point in the history
  • Loading branch information
nbbeeken committed Oct 5, 2023
1 parent d766ae2 commit 296faac
Show file tree
Hide file tree
Showing 7 changed files with 1,576 additions and 1,534 deletions.
2 changes: 1 addition & 1 deletion .evergreen/ci_matrix_constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const versions = [
{ codeName: 'hydrogen', versionNumber: 18 },
{ codeName: 'iron', versionNumber: 20 }
];
const NODE_VERSIONS = versions.map(({ versionNumber }) => versionNumber).sort();
const NODE_VERSIONS = versions.map(({ versionNumber }) => versionNumber).sort((a, b) => a - b);
const LOWEST_LTS = NODE_VERSIONS[0];
const LATEST_LTS = NODE_VERSIONS[NODE_VERSIONS.length - 1];

Expand Down
194 changes: 87 additions & 107 deletions .evergreen/config.in.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ functions:
is_patch: ${is_patch}
project: ${project}
args:
- .evergreen/prepare-shell.sh
- .evergreen/prepare-shell.sh

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

###########################################
# mongosh functions
###########################################
"compile mongosh":
- command: subprocess.exec
params:
working_dir: src
env:
PROJECT_DIRECTORY: ${PROJECT_DIRECTORY}
TASK_ID: ${task_id}
binary: bash
args:
- "${PROJECT_DIRECTORY}/.evergreen/run-mongosh-integration-tests.sh"

"run mongosh tests for package":
- command: subprocess.exec
params:
working_dir: src
env:
PROJECT_DIRECTORY: ${PROJECT_DIRECTORY}
TASK_ID: ${task_id}
MONGOSH_RUN_ONLY_IN_PACKAGE: ${mongosh_package}
binary: bash
args:
- "${PROJECT_DIRECTORY}/.evergreen/run-mongosh-integration-tests.sh"

"run mongosh package scope test":
- command: subprocess.exec
params:
working_dir: src
env:
PROJECT_DIRECTORY: ${PROJECT_DIRECTORY}
TASK_ID: ${task_id}
binary: bash
args:
- "${PROJECT_DIRECTORY}/.evergreen/run-mongosh-scope-test.sh"


"reset aws instance profile":
- command: shell.exec
params:
Expand Down Expand Up @@ -501,14 +463,14 @@ functions:
done
"install dependencies":
- command: shell.exec
- command: subprocess.exec
type: setup
params:
working_dir: "src"
script: |
${PREPARE_SHELL}
NODE_LTS_VERSION=${NODE_LTS_VERSION} NPM_OPTIONS=${NPM_OPTIONS} NPM_VERSION=${NPM_VERSION}\
bash ${PROJECT_DIRECTORY}/.evergreen/install-dependencies.sh
binary: bash
add_expansions_to_env: true
args:
- .evergreen/install-dependencies.sh

"install aws-credential-providers":
- command: shell.exec
Expand Down Expand Up @@ -552,6 +514,7 @@ functions:
params:
silent: true
working_dir: "src"
add_expansions_to_env: true
script: |
${PREPARE_SHELL}
cat <<EOT > prepare_client_encryption.sh
Expand All @@ -566,6 +529,7 @@ functions:
type: test
params:
working_dir: "src"
add_expansions_to_env: true
script: |
${PREPARE_SHELL}
Expand Down Expand Up @@ -612,16 +576,16 @@ functions:
bash ${PROJECT_DIRECTORY}/.evergreen/run-ldap-tests.sh
"run data lake tests":
- command: shell.exec
type: test
params:
working_dir: src
script: |
export PROJECT_DIRECTORY="$(pwd)"
export MONGODB_URI='mongodb://mhuser:pencil@localhost'
export NODE_LTS_VERSION='${NODE_LTS_VERSION}'
- command: shell.exec
type: test
params:
working_dir: src
script: |
export PROJECT_DIRECTORY="$(pwd)"
export MONGODB_URI='mongodb://mhuser:pencil@localhost'
export NODE_LTS_VERSION='${NODE_LTS_VERSION}'
bash ${PROJECT_DIRECTORY}/.evergreen/run-data-lake-tests.sh
bash ${PROJECT_DIRECTORY}/.evergreen/run-data-lake-tests.sh
"run tls tests":
- command: shell.exec
Expand Down Expand Up @@ -1056,7 +1020,7 @@ functions:
params:
aws_key: ${aws_key}
aws_secret: ${aws_secret}
local_file: src/coverage/coverage-final.json
local_file: src/coverage/coverage-final.json
optional: true
# Upload the coverage report for all tasks in a single build to the same directory.
# TODO NODE-4707 - change upload directory to ${UPLOAD_BUCKET}
Expand Down Expand Up @@ -1103,7 +1067,7 @@ functions:
params:
aws_key: ${aws_key}
aws_secret: ${aws_secret}
local_file: src/coverage-report/index.html
local_file: src/coverage-report/index.html
remote_file: mongo-node-driver/${revision}/${version_id}/coverage/index.html
bucket: mciuploads
permissions: public-read
Expand Down Expand Up @@ -1136,25 +1100,30 @@ tasks:
- performance
exec_timeout_secs: 3600
commands:
- command: expansions.update
type: setup
params:
updates:
- { key: NODE_LTS_VERSION, value: v18.16.0 }
- { key: NPM_VERSION, value: "9" }
- { key: VERSION, value: v6.0-perf }
- { key: TOPOLOGY, value: server }
- { key: AUTH, value: noauth }
- func: install dependencies
vars:
NODE_LTS_VERSION: v18.16.0
NPM_VERSION: 9
- func: bootstrap mongo-orchestration
vars:
VERSION: v6.0-perf
TOPOLOGY: server
AUTH: noauth
- func: run spec driver benchmarks
- command: perf.send
params:
file: src/results.json

- name: "test-gcpkms-task"
commands:
- command: expansions.update
type: setup
params:
updates:
- { key: NPM_VERSION, value: "9" }
- func: "install dependencies"
vars:
NPM_VERSION: 9
# Upload node driver to a GCP instance
- command: subprocess.exec
type: setup
Expand Down Expand Up @@ -1184,19 +1153,20 @@ tasks:
args:
- ${DRIVERS_TOOLS}/.evergreen/csfle/gcpkms/run-command.sh


- name: "test-gcpkms-fail-task"
# test-gcpkms-fail-task runs in a non-GCE environment.
# It is expected to fail to obtain GCE credentials.
commands:
- command: expansions.update
type: setup
params:
updates:
- { key: NPM_VERSION, value: "9" }
- { key: VERSION, value: "latest" }
- { key: TOPOLOGY, value: "server" }
- { key: AUTH, value: "noauth" }
- func: "install dependencies"
vars:
NPM_VERSION: 9
- func: bootstrap mongo-orchestration
vars:
VERSION: latest
TOPOLOGY: server
AUTH: noauth
- command: subprocess.exec
type: test
params:
Expand All @@ -1206,12 +1176,14 @@ tasks:
args:
- src/.evergreen/run-gcp-kms-tests.sh


- name: "test-azurekms-task"
commands:
- command: expansions.update
type: setup
params:
updates:
- { key: NPM_VERSION, value: "9" }
- func: "install dependencies"
vars:
NPM_VERSION: 9
- command: subprocess.exec
type: setup
params:
Expand All @@ -1232,14 +1204,16 @@ tasks:

- name: "test-azurekms-fail-task"
commands:
- command: expansions.update
type: setup
params:
updates:
- { key: NPM_VERSION, value: "9" }
- { key: VERSION, value: "latest" }
- { key: TOPOLOGY, value: "server" }
- { key: AUTH, value: "noauth" }
- func: "install dependencies"
vars:
NPM_VERSION: 9
- func: bootstrap mongo-orchestration
vars:
VERSION: latest
TOPOLOGY: server
AUTH: noauth
- command: subprocess.exec
type: test
params:
Expand All @@ -1251,9 +1225,12 @@ tasks:

- name: "oidc-auth-test-azure-latest"
commands:
- command: expansions.update
type: setup
params:
updates:
- { key: NPM_VERSION, value: "9" }
- func: "install dependencies"
vars:
NPM_VERSION: 9
- command: subprocess.exec
params:
working_dir: src
Expand All @@ -1264,13 +1241,16 @@ tasks:
AZUREOIDC_CLIENTID: ${testazureoidc_clientid}
PROVIDER_NAME: azure
args:
- .evergreen/run-oidc-tests-azure.sh
- .evergreen/run-oidc-tests-azure.sh

- name: "test-aws-lambda-deployed"
commands:
- command: expansions.update
type: setup
params:
updates:
- { key: NPM_VERSION, value: "9" }
- func: "install dependencies"
vars:
NPM_VERSION: 9
- command: ec2.assume_role
params:
role_arn: ${LAMBDA_AWS_ROLE_ARN}
Expand Down Expand Up @@ -1391,31 +1371,31 @@ task_groups:

- name: testazureoidc_task_group
setup_group:
- func: fetch source
- command: shell.exec
params:
shell: bash
script: |-
set -o errexit
${PREPARE_SHELL}
export AZUREOIDC_CLIENTID="${testazureoidc_clientid}"
export AZUREOIDC_TENANTID="${testazureoic_tenantid}"
export AZUREOIDC_SECRET="${testazureoidc_secret}"
export AZUREOIDC_KEYVAULT=${testazureoidc_keyvault}
export AZUREOIDC_DRIVERS_TOOLS="$DRIVERS_TOOLS"
export AZUREOIDC_VMNAME_PREFIX="NODE_DRIVER"
$DRIVERS_TOOLS/.evergreen/auth_oidc/azure/create-and-setup-vm.sh
- func: fetch source
- command: shell.exec
params:
shell: bash
script: |-
set -o errexit
${PREPARE_SHELL}
export AZUREOIDC_CLIENTID="${testazureoidc_clientid}"
export AZUREOIDC_TENANTID="${testazureoic_tenantid}"
export AZUREOIDC_SECRET="${testazureoidc_secret}"
export AZUREOIDC_KEYVAULT=${testazureoidc_keyvault}
export AZUREOIDC_DRIVERS_TOOLS="$DRIVERS_TOOLS"
export AZUREOIDC_VMNAME_PREFIX="NODE_DRIVER"
$DRIVERS_TOOLS/.evergreen/auth_oidc/azure/create-and-setup-vm.sh
teardown_group:
- command: shell.exec
params:
shell: bash
script: |-
${PREPARE_SHELL}
$DRIVERS_TOOLS/.evergreen/auth_oidc/azure/delete-vm.sh
- command: shell.exec
params:
shell: bash
script: |-
${PREPARE_SHELL}
$DRIVERS_TOOLS/.evergreen/auth_oidc/azure/delete-vm.sh
setup_group_can_fail_task: true
setup_group_timeout_secs: 1800
tasks:
- oidc-auth-test-azure-latest
- oidc-auth-test-azure-latest

- name: test_atlas_task_group
setup_group:
Expand Down Expand Up @@ -1456,7 +1436,7 @@ post:
- func: "cleanup"

ignore:
- '*.md'
- "*.md"
buildvariants:
- name: performance-tests
display_name: Performance Test
Expand Down

0 comments on commit 296faac

Please sign in to comment.