Skip to content

Commit 6abd90e

Browse files
authored
chore(NODE-5605): use npm 9 on eol node versions (#164)
1 parent e63ceb4 commit 6abd90e

File tree

5 files changed

+1186
-44
lines changed

5 files changed

+1186
-44
lines changed

.evergreen/config.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ functions:
7676
- /app
7777
- '--env'
7878
- PROJECT_DIRECTORY=/app
79-
- 'ubuntu:20.04'
79+
- 'ubuntu:22.04'
8080
- /bin/bash
8181
- /app/.evergreen/run-tests-ubuntu.sh
8282
run prebuild:
@@ -109,6 +109,7 @@ functions:
109109
env:
110110
PROJECT_DIRECTORY: ${PROJECT_DIRECTORY}
111111
NODE_LTS_VERSION: ${NODE_LTS_VERSION}
112+
NPM_VERSION: "9"
112113

113114
pre:
114115
- func: fetch source
@@ -139,6 +140,7 @@ buildvariants:
139140
- run-prebuild-force-publish
140141
expansions:
141142
NODE_LTS_VERSION: 14
143+
NPM_VERSION: 9
142144
- name: macos-m1
143145
display_name: MacOS M1
144146
run_on: macos-1100-arm64
@@ -171,7 +173,6 @@ buildvariants:
171173
packager_distro: ubuntu1804
172174
packager_arch: x86_64
173175
tasks:
174-
- run-tests-ubuntu
175176
- run-prebuild
176177
- run-prebuild-force-publish
177178
- name: ubuntu1804-arm64
@@ -182,6 +183,23 @@ buildvariants:
182183
packager_distro: ubuntu1804
183184
packager_arch: arm64
184185
tasks:
185-
- run-tests-ubuntu
186186
- run-prebuild
187187
- run-prebuild-force-publish
188+
- name: ubuntu2204-64
189+
display_name: 'Ubuntu 22.04 64-bit'
190+
run_on: ubuntu2204-small
191+
expansions:
192+
has_packages: true
193+
packager_distro: ubuntu2204
194+
packager_arch: x86_64
195+
tasks:
196+
- run-tests-ubuntu
197+
- name: ubuntu2204-arm64
198+
display_name: 'Ubuntu 22.04 arm64'
199+
run_on: ubuntu2204-arm64-small
200+
expansions:
201+
has_packages: true
202+
packager_distro: ubuntu2204
203+
packager_arch: arm64
204+
tasks:
205+
- run-tests-ubuntu

.evergreen/install-dependencies.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
set -o errexit # Exit the script with error if any of the commands fail
33

44
NODE_LTS_VERSION=${NODE_LTS_VERSION:-14}
5+
# npm version can be defined in the environment for cases where we need to install
6+
# a version lower than latest to support EOL Node versions.
7+
NPM_VERSION=${NPM_VERSION:-latest}
58

69
source "${PROJECT_DIRECTORY}/.evergreen/init-node-and-npm-env.sh"
710

@@ -94,8 +97,7 @@ else
9497
fi
9598

9699
if [[ $operating_system != "win" ]]; then
97-
# Update npm to latest when we can
98-
npm install --global npm@latest
100+
npm install --global npm@$NPM_VERSION
99101
hash -r
100102
fi
101103

.evergreen/run-tests-ubuntu.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export DEBIAN_FRONTEND=noninteractive
1717
echo "Installing all the packages required in this test"
1818
apt-get update
1919
apt-get -y -qq install \
20-
python curl \
20+
python3 curl \
2121
build-essential libkrb5-dev \
2222
krb5-user krb5-kdc krb5-admin-server \
2323
apache2 libapache2-mod-auth-gssapi

0 commit comments

Comments
 (0)