Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
152 changes: 122 additions & 30 deletions .evergreen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ functions:
{
export NODE_JS_VERSION=${node_js_version}
source .evergreen/.setup_env
npm --unsafe-perm=true run bootstrap-ci
npm run check-ci
}
test:
Expand All @@ -59,6 +60,7 @@ functions:
{
export NODE_JS_VERSION=${node_js_version}
source .evergreen/.setup_env
npm --unsafe-perm=true run bootstrap-ci
npm run test-ci
echo "Creating coverage tarball..."
tar cvzf coverage.tgz coverage
Expand All @@ -83,6 +85,9 @@ functions:
script: |
set -e
{
export NODE_JS_VERSION=${node_js_version}
source .evergreen/.setup_env
npm --unsafe-perm=true run bootstrap-ci
(cd scripts/docker && docker build -t ubuntu18.04-xvfb -f ubuntu18.04-xvfb.Dockerfile .)
docker run \
--rm -v $PWD:/tmp/build ubuntu18.04-xvfb \
Expand All @@ -102,6 +107,7 @@ functions:
{
export NODE_JS_VERSION=${node_js_version}
source .evergreen/.setup_env
npm --unsafe-perm=true run bootstrap-ci
npm run test-connectivity
}

Expand Down Expand Up @@ -536,6 +542,8 @@ tasks:
vars:
node_js_version: "12.20.0"
- func: test_vscode
vars:
node_js_version: "12.20.0"
- name: test_connectivity
tags: ["extra-integration-test"]
commands:
Expand Down Expand Up @@ -573,19 +581,67 @@ tasks:
- func: run_e2e_tests
vars:
node_js_version: "14.15.1"
- name: e2e_tests_linux
- name: e2e_tests_linux_x64
tags: ["e2e-test"]
depends_on:
- name: compile_artifact
variant: linux_x64_build
commands:
- func: checkout
- func: install
vars:
node_js_version: "14.15.1"
- func: download_compiled_artifact
vars:
executable_os_id: linux-x64
- func: run_e2e_tests
vars:
node_js_version: "14.15.1"
- name: e2e_tests_linux_arm64
tags: ["e2e-test"]
depends_on:
- name: compile_artifact
variant: linux_build
variant: linux_arm64_build
commands:
- func: checkout
- func: install
vars:
node_js_version: "14.15.1"
- func: download_compiled_artifact
vars:
executable_os_id: linux
executable_os_id: linux-arm64
- func: run_e2e_tests
vars:
node_js_version: "14.15.1"
- name: e2e_tests_linux_ppc64le
tags: ["e2e-test"]
depends_on:
- name: compile_artifact
variant: linux_ppc64le_build
commands:
- func: checkout
- func: install
vars:
node_js_version: "14.15.1"
- func: download_compiled_artifact
vars:
executable_os_id: linux-ppc64le
- func: run_e2e_tests
vars:
node_js_version: "14.15.1"
- name: e2e_tests_linux_s390x
tags: ["e2e-test"]
depends_on:
- name: compile_artifact
variant: linux_s390x_build
commands:
- func: checkout
- func: install
vars:
node_js_version: "14.15.1"
- func: download_compiled_artifact
vars:
executable_os_id: linux-s390x
- func: run_e2e_tests
vars:
node_js_version: "14.15.1"
Expand Down Expand Up @@ -633,7 +689,7 @@ tasks:
- name: ".unit-test"
variant: linux
- name: compile_artifact
variant: linux_build
variant: linux_x64_build
commands:
- func: checkout
- func: install
Expand All @@ -650,7 +706,7 @@ tasks:
- name: ".unit-test"
variant: linux
- name: compile_artifact
variant: linux_build
variant: linux_x64_build
commands:
- func: checkout
- func: install
Expand All @@ -667,7 +723,7 @@ tasks:
- name: ".unit-test"
variant: linux
- name: compile_artifact
variant: linux_build
variant: linux_x64_build
commands:
- func: checkout
- func: install
Expand Down Expand Up @@ -909,10 +965,10 @@ buildvariants:
- name: e2e_tests_darwin

- name: linux
display_name: "Ubuntu 18.04"
display_name: "Ubuntu 18.04 x64"
run_on: ubuntu1804-small
expansions:
executable_os_id: linux
executable_os_id: linux-x64
tasks:
- name: check
- name: test_m40xc_n12
Expand All @@ -934,44 +990,80 @@ buildvariants:
- name: package_and_upload_artifact_linux
- name: package_and_upload_artifact_debian
- name: package_and_upload_artifact_rhel
- name: linux_build
display_name: "Ubuntu 18.04 (build)"
run_on: ubuntu1804-build
- name: linux_x64_build
display_name: "RHEL 7.0 x64 (build)"
run_on: rhel70-build
expansions:
executable_os_id: linux-x64
tasks:
- name: compile_artifact
- name: linux_arm64_build
display_name: "Ubuntu 18.04 arm64 (build)"
run_on: ubuntu1804-arm64-small
expansions:
executable_os_id: linux-arm64
tasks:
- name: compile_artifact
- name: linux_ppc64le_build
display_name: "RHEL 7.1 PPC (build)"
run_on: rhel71-power8-small
expansions:
executable_os_id: linux
executable_os_id: linux-ppc64le
tasks:
- name: compile_artifact
- name: linux_s390x_build
display_name: "RHEL 7.2 s390x (build)"
run_on: rhel72-zseries-small
expansions:
executable_os_id: linux-s390x
tasks:
- name: compile_artifact

- name: rhel70
display_name: "RHEL 7.0 (E2E Tests)"
- name: e2e_rhel70_x64
display_name: "RHEL 7.0 x64 (E2E Tests)"
run_on: rhel70-small
tasks:
- name: e2e_tests_linux
- name: rhel76
display_name: "RHEL 7.6 (E2E Tests)"
- name: e2e_tests_linux_x64
- name: e2e_rhel76_x64
display_name: "RHEL 7.6 x64 (E2E Tests)"
run_on: rhel76-small
tasks:
- name: e2e_tests_linux
- name: ubuntu1604
display_name: "Ubuntu 16.04 (E2E Tests)"
- name: e2e_tests_linux_x64
- name: e2e_ubuntu1604_x64
display_name: "Ubuntu 16.04 x64 (E2E Tests)"
run_on: ubuntu1604-small
tasks:
- name: e2e_tests_linux
- name: ubuntu1804
display_name: "Ubuntu 18.04 (E2E Tests)"
- name: e2e_tests_linux_x64
- name: e2e_ubuntu1804_x64
display_name: "Ubuntu 18.04 x64 (E2E Tests)"
run_on: ubuntu1804-small
tasks:
- name: e2e_tests_linux
- name: ubuntu2004
display_name: "Ubuntu 20.04 (E2E Tests)"
- name: e2e_tests_linux_x64
- name: e2e_ubuntu2004_x64
display_name: "Ubuntu 20.04 x64 (E2E Tests)"
run_on: ubuntu2004-small
tasks:
- name: e2e_tests_linux
- name: debian10
display_name: "Debian 10 (E2E Tests)"
- name: e2e_tests_linux_x64
- name: e2e_debian10_x64
display_name: "Debian 10 x64 (E2E Tests)"
run_on: debian10-small
tasks:
- name: e2e_tests_linux
- name: e2e_tests_linux_x64
- name: e2e_ubuntu1804_arm64
display_name: "Ubuntu 18.04 arm64 (E2E Tests)"
run_on: ubuntu1804-arm64-small
tasks:
- name: e2e_tests_linux_arm64
- name: e2e_rhel71_ppc64le
display_name: "RHEL 7.1 PPC (E2E Tests)"
run_on: rhel71-power8-small
tasks:
- name: e2e_tests_linux_ppc64le
- name: e2e_rhel72_s390x
display_name: "RHEL 7.2 s390x (E2E Tests)"
run_on: rhel72-zseries-small
tasks:
- name: e2e_tests_linux_s390x

- name: win32
display_name: "Windows VS 2019"
Expand Down
9 changes: 6 additions & 3 deletions .evergreen/.install_node
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,22 @@ export BASEDIR="$PWD/.evergreen"
if [ "$OS" == "Windows_NT" ]; then
powershell "$(cygpath -w "$BASEDIR")"/InstallNode.ps1
else
if which realpath; then # No realpath on macOS, but also not needed there
export HOME="$(realpath "$HOME")" # Needed to de-confuse nvm when /home is a symlink
fi
export NVM_DIR="$HOME/.nvm"

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash

echo "Setting NVM environment home: $NVM_DIR"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"

nvm install $NODE_JS_VERSION
nvm install --no-progress $NODE_JS_VERSION
nvm alias default $NODE_JS_VERSION
npm install -g npm@6
fi

. "$BASEDIR/.setup_env"

npm --unsafe-perm=true run bootstrap-ci
npm --unsafe-perm=true run bootstrap-ci -- --scope @mongosh/build --scope @mongosh/cli-repl --include-dependencies
27 changes: 21 additions & 6 deletions .evergreen/.setup_env
Original file line number Diff line number Diff line change
@@ -1,14 +1,32 @@
set -e
set -x
export BASEDIR="$PWD/.evergreen"
export PATH="$BASEDIR/node-v$NODE_JS_VERSION-win-x64:/opt/python/3.6/bin:/opt/chefdk/gitbin:/cygdrive/c/Program Files/Git/bin:/cygdrive/c/Program Files/Git/mingw32/libexec/git-core:/cygdrive/c/Python39/Scripts:/cygdrive/c/Python39:/cygdrive/c/cmake/bin:$PATH"
export PATH="$BASEDIR/node-v$NODE_JS_VERSION-win-x64:/opt/python/3.6/bin:/opt/chefdk/gitbin:/cygdrive/c/Program Files/Git/bin:/cygdrive/c/Program Files/Git/mingw32/libexec/git-core:/cygdrive/c/Python39/Scripts:/cygdrive/c/Python39:/cygdrive/c/cmake/bin:/opt/mongodbtoolchain/v3/bin:$PATH"
export IS_MONGOSH_EVERGREEN_CI=1

if [ "$OS" != "Windows_NT" ]; then
if which realpath; then # No realpath on macOS, but also not needed there
export HOME="$(realpath "$HOME")" # Needed to de-confuse nvm when /home is a symlink
fi
export NVM_DIR="$HOME/.nvm"
echo "Setting NVM environment home: $NVM_DIR"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm use $NODE_JS_VERSION

export CC=gcc
export CXX=c++

echo "Using gcc version:"
gcc --version

echo "Using g++ version:"
g++ --version
fi

export EVERGREEN_EXPANSIONS_PATH="$BASEDIR/../../tmp/expansions.yaml"

if [ "$OS" == "Windows_NT" ]; then
export EVERGREEN_EXPANSIONS_PATH="$(cygpath -w "$EVERGREEN_EXPANSIONS_PATH")"
fi

echo "Using node version:"
Expand All @@ -20,8 +38,5 @@ npm --version
echo "Using git version:"
git --version

export EVERGREEN_EXPANSIONS_PATH="$BASEDIR/../../tmp/expansions.yaml"

if [ "$OS" == "Windows_NT" ]; then
export EVERGREEN_EXPANSIONS_PATH="$(cygpath -w "$EVERGREEN_EXPANSIONS_PATH")"
fi
echo "Using python version:"
python --version
44 changes: 30 additions & 14 deletions .evergreen/compile-artifact.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,37 @@ set -e
cd $(pwd)

source .evergreen/.setup_env
export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD="true"
if [ "$(uname)" == Linux ]; then
mkdir -p tmp
cp "$(pwd)/../tmp/expansions.yaml" tmp/expansions.yaml
(cd scripts/docker && docker build -t centos7-build -f centos7-build.Dockerfile .)
echo Starting Docker container build
docker run -e PUPPETEER_SKIP_CHROMIUM_DOWNLOAD \
-e EVERGREEN_EXPANSIONS_PATH=/tmp/build/tmp/expansions.yaml \
-e NODE_JS_VERSION \
-e DISTRIBUTION_BUILD_VARIANT \
--rm -v $PWD:/tmp/build --network host centos7-build \
-c 'source /opt/rh/devtoolset-8/enable && cd /tmp/build && npm run evergreen-release compile && dist/mongosh --version'
else
npm run evergreen-release compile

if uname -a | grep -q 'Linux.*x86_64'; then
rm -rf "tmp/.sccache"
mkdir -p "tmp/.sccache"
curl -L https://github.com/mozilla/sccache/releases/download/0.2.13/sccache-0.2.13-x86_64-unknown-linux-musl.tar.gz | tar -C "tmp/.sccache" -xzvf - --strip=1 sccache-0.2.13-x86_64-unknown-linux-musl/sccache
export CC="$PWD/tmp/.sccache/sccache gcc"
export CXX="$PWD/tmp/.sccache/sccache g++"
fi

if uname -p | sed -e 's/s390/matches/' -e 's/ppc/matches/' | grep -q matches; then
# On s390x and PPC machines in evergreen, there is a Python 3.x installation
# in /opt/mongodbtoolchain/v3/bin, but it's broken in the sense that its bz2
# package cannot be loaded, which we need for building Node.js.
# We therefore do some PATH wiggling here to make sure that the python
# executable used by the Node.js configure script is python 2.x.
# This is not a sustainable long-term solution, because Node.js drops Python 2
# support for build scripts with Node.js 15 and above.
# TODO: Open a build ticket about this, referencing patch/output from
# https://spruce.mongodb.com/version/608ad4613e8e8601d5cd3d6f/tasks.
rm -rf tmp/python-container
mkdir -p tmp/python-container
(cd tmp/python-container && ln -s /usr/bin/python python && ln -s python python2.7 && ln -s python python2)
export PATH="$PWD/tmp/python-container:$PATH"
export FORCE_PYTHON2=1

echo "Using python version:"
python --version
fi

export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD="true"
npm run evergreen-release compile
dist/mongosh --version

tar cvzf dist.tgz dist
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading