From 0abdf7bc75257ecd6d01dd701fb78208c1eb6d5e Mon Sep 17 00:00:00 2001 From: David Bradford Date: Tue, 31 May 2022 20:18:01 +0000 Subject: SERVER-66557: Refactor and update multiversion setup and config --- evergreen/multiversion_setup.sh | 30 +++++++++++++++++++++--------- evergreen/prelude_db_contrib_tool.sh | 32 ++++++-------------------------- 2 files changed, 27 insertions(+), 35 deletions(-) (limited to 'evergreen') diff --git a/evergreen/multiversion_setup.sh b/evergreen/multiversion_setup.sh index 6748e4b7599..1e932a0c143 100644 --- a/evergreen/multiversion_setup.sh +++ b/evergreen/multiversion_setup.sh @@ -6,8 +6,13 @@ cd src set -o errexit set -o verbose +activate_venv + setup_db_contrib_tool_venv -activate_db_contrib_tool_venv + +export PIPX_HOME="${workdir}/pipx" +export PIPX_BIN_DIR="${workdir}/pipx/bin" +export PATH="$PATH:$PIPX_BIN_DIR" rm -rf /data/install /data/multiversion @@ -15,13 +20,16 @@ edition="${multiversion_edition}" platform="${multiversion_platform}" architecture="${multiversion_architecture}" -db-contrib-tool setup-repro-env \ - --installDir /data/install \ - --linkDir /data/multiversion \ - --edition $edition \ - --platform $platform \ - --architecture $architecture \ - 4.0 +if [ -z "${multiversion_skip_install_for_40}" ]; then + db-contrib-tool setup-repro-env \ + --installDir /data/install \ + --linkDir /data/multiversion \ + --edition $edition \ + --platform $platform \ + --architecture $architecture \ + --debug \ + 4.0 +fi # The platform and architecture for how some of the binaries are reported in # https://downloads.mongodb.org/full.json changed between MongoDB 4.0 and MongoDB 4.2. @@ -46,6 +54,7 @@ db-contrib-tool setup-repro-env \ --edition $edition \ --platform $platform \ --architecture $architecture \ + --debug \ 4.2 # The platform and architecture for how some of the binaries are reported in @@ -82,5 +91,8 @@ db-contrib-tool setup-repro-env \ --edition $edition \ --platform $platform \ --architecture $architecture \ + --fallbackToMaster \ + --resmokeCmd "python buildscripts/resmoke.py" \ + --debug \ $last_lts_arg \ - $last_continuous_arg 4.4 5.0 5.1 + $last_continuous_arg 4.4 5.0 diff --git a/evergreen/prelude_db_contrib_tool.sh b/evergreen/prelude_db_contrib_tool.sh index 85d4d786a36..c834e239a38 100644 --- a/evergreen/prelude_db_contrib_tool.sh +++ b/evergreen/prelude_db_contrib_tool.sh @@ -1,31 +1,11 @@ function setup_db_contrib_tool_venv { - local db_contrib_tool_venv_dir="${workdir}/db_contrib_tool_venv" - if [ -d "$db_contrib_tool_venv_dir" ]; then - echo "Found existing db-contrib-tool venv. Skipping setup." - exit 0 - fi - $python -m venv "$db_contrib_tool_venv_dir" + mkdir ${workdir}/pipx + export PIPX_HOME="${workdir}/pipx" + export PIPX_BIN_DIR="${workdir}/pipx/bin" + export PATH="$PATH:$PIPX_BIN_DIR" - if [ "Windows_NT" = "$OS" ]; then - dos2unix "$db_contrib_tool_venv_dir/Scripts/activate" - fi - - activate_db_contrib_tool_venv python -m pip --disable-pip-version-check install "pip==21.0.1" "wheel==0.37.0" || exit 1 - python -m pip --disable-pip-version-check install "db-contrib-tool==0.2.1" || exit 1 -} - -function activate_db_contrib_tool_venv { - local db_contrib_tool_venv_dir="${workdir}/db_contrib_tool_venv" - if [ ! -d "$db_contrib_tool_venv_dir" ]; then - echo "Could not find db-contrib-tool venv." - exit 1 - fi - - if [ "Windows_NT" = "$OS" ]; then - . "$db_contrib_tool_venv_dir/Scripts/activate" - else - . "$db_contrib_tool_venv_dir/bin/activate" - fi + python -m pip --disable-pip-version-check install "pipx" || exit 1 + pipx install "db-contrib-tool==0.4.3" || exit 1 } -- cgit v1.2.1