Skip to content

Commit 6b219c5

Browse files
committed
chore(ci): adopt own toolchain MONGOSH-864
1 parent 9c6a852 commit 6b219c5

File tree

3 files changed

+1
-121
lines changed

3 files changed

+1
-121
lines changed

.evergreen/install-node-source.sh

Lines changed: 0 additions & 72 deletions
This file was deleted.

.evergreen/install-node.sh

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -26,49 +26,8 @@ else
2626
sed -i "$HOME/.npmrc" -e 's/^prefix=.*$//'
2727
fi
2828
fi
29-
export NVM_DIR="$BASEDIR/.nvm"
30-
mkdir -p "${NVM_DIR}"
31-
32-
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
33-
34-
echo "Setting NVM environment home: $NVM_DIR"
35-
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
36-
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
37-
38-
set +x # nvm is very verbose
39-
40-
# A few distros where pre-built node20 does not work out of the box and hence
41-
# needs to be built from source
42-
if [[ "${DISTRO_ID}" =~ ^(amazon2-|rhel7|ubuntu18|suse12) ]] && [[ "$NODE_JS_VERSION" =~ ^20 ]];
43-
then
44-
NODE_JS_SOURCE_VERSION="$NODE_JS_VERSION"
45-
if echo $NODE_JS_VERSION | grep -q ^20 ; then
46-
# Node.js 20.11.1 is the last 20.x that builds out of the box on RHEL7
47-
# https://github.com/nodejs/node/issues/52223
48-
NODE_JS_SOURCE_VERSION=20.11.1
49-
fi
50-
env NODE_JS_VERSION="$NODE_JS_SOURCE_VERSION" bash "$BASEDIR/install-node-source.sh"
51-
nvm use $NODE_JS_SOURCE_VERSION
52-
else
53-
echo nvm install --no-progress $NODE_JS_VERSION && nvm alias default $NODE_JS_VERSION
54-
nvm install --no-progress $NODE_JS_VERSION
55-
nvm alias default $NODE_JS_VERSION
56-
nvm use $NODE_JS_VERSION
57-
fi
58-
set -x
59-
60-
if env PATH="/opt/chefdk/gitbin:$PATH" git --version | grep -q 'git version 1.'; then
61-
(cd "$BASEDIR" &&
62-
curl -sSfL https://github.com/git/git/archive/refs/tags/v2.31.1.tar.gz | tar -xvz &&
63-
mv git-2.31.1 git-2 &&
64-
cd git-2 &&
65-
make -j8 NO_EXPAT=1)
66-
fi
6729

6830
npm cache clear --force || true # Try to work around `Cannot read property 'pickAlgorithm' of null` errors in CI
69-
# Started observing CI failures on RHEL 7.2 (s390x) for installing npm, all
70-
# related to network issues hence adding a retry with backoff here.
71-
bash "$BASEDIR/retry-with-backoff.sh" npm i -g npm@$NPM_VERSION
7231
fi
7332

7433
. "$BASEDIR/setup-env.sh"

.evergreen/setup-env.sh

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,9 @@ set -e
22
set -x
33

44
OS_ARCH="$(uname "-m")"
5-
if [ "$OS_ARCH" = "ppc64le" ] || [ "$OS_ARCH" = "ppc64" ]; then
6-
echo "[INFO] Choosing v4 because OS_ARCH is $OS_ARCH"
7-
export TOOLCHAIN_PATH='/opt/mongodbtoolchain/v4/bin'
8-
else
9-
echo "[INFO] Choosing v3 because OS_ARCH is $OS_ARCH"
10-
export TOOLCHAIN_PATH='/opt/mongodbtoolchain/v3/bin'
11-
fi
125

136
export BASEDIR="$PWD/.evergreen"
14-
export PATH="/cygdrive/c/python/Python311/Scripts:/cygdrive/c/python/Python311:/cygdrive/c/Python311/Scripts:/cygdrive/c/Python311:/opt/python/3.6/bin:$BASEDIR/mingit/cmd:$BASEDIR/mingit/mingw64/libexec/git-core:$BASEDIR/git-2:$BASEDIR/npm-10/node_modules/.bin:$BASEDIR/node-v$NODE_JS_VERSION-win-x64:/opt/java/jdk16/bin:/opt/chefdk/gitbin:/cygdrive/c/cmake/bin:$TOOLCHAIN_PATH:$PATH"
7+
export PATH="/opt/devtools/node20/bin:/opt/devtools/bin:/cygdrive/c/python/Python311/Scripts:/cygdrive/c/python/Python311:/cygdrive/c/Python311/Scripts:/cygdrive/c/Python311:/opt/python/3.6/bin:$BASEDIR/mingit/cmd:$BASEDIR/mingit/mingw64/libexec/git-core:$BASEDIR/git-2:$BASEDIR/npm-10/node_modules/.bin:$BASEDIR/node-v$NODE_JS_VERSION-win-x64:/opt/java/jdk16/bin:/opt/chefdk/gitbin:/cygdrive/c/cmake/bin:$PATH"
158

169
export MONGOSH_GLOBAL_CONFIG_FILE_FOR_TESTING="$BASEDIR/../../testing/tests-globalconfig.conf"
1710

0 commit comments

Comments
 (0)