diff options
author | Uladzimir Makouski <uladzimir.makouski@mongodb.com> | 2022-06-01 07:30:34 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-06-01 08:34:14 +0000 |
commit | be6bf2e5c2bfda8bdfec13419afabbfded6b432b (patch) | |
tree | 1f61483701add3421547bbf0dbeb73c579e42adf /evergreen | |
parent | 589d65d55b880aa28803e4b4b9f109dd9e5b60bc (diff) | |
download | mongo-be6bf2e5c2bfda8bdfec13419afabbfded6b432b.tar.gz |
Revert "SERVER-63191 Generate build expansions early"
This reverts commit 79c61c07d61102ca7ca387880a23543faf156ca3.
Diffstat (limited to 'evergreen')
-rwxr-xr-x | evergreen/functions/binary_version_check.sh | 2 | ||||
-rw-r--r-- | evergreen/functions/compile_expansions_generate.sh | 12 | ||||
-rwxr-xr-x | evergreen/functions/version_expansions_generate.sh | 17 |
3 files changed, 11 insertions, 20 deletions
diff --git a/evergreen/functions/binary_version_check.sh b/evergreen/functions/binary_version_check.sh index a83aa0dc203..ac01374a07e 100755 --- a/evergreen/functions/binary_version_check.sh +++ b/evergreen/functions/binary_version_check.sh @@ -6,7 +6,7 @@ cd src set -o errexit mongo_binary=dist-test/bin/mongo${exe} activate_venv -bin_ver=$($python -c "import yaml; print(yaml.safe_load(open('version_expansions.yml'))['version']);" | tr -d '[ \r\n]') +bin_ver=$($python -c "import yaml; print(yaml.safe_load(open('compile_expansions.yml'))['version']);" | tr -d '[ \r\n]') # Due to SERVER-23810, we cannot use $mongo_binary --quiet --nodb --eval "version();" mongo_ver=$($mongo_binary --version | perl -pe '/version v([^\"]*)/; $_ = $1;' | tr -d '[ \r\n]') # The versions must match diff --git a/evergreen/functions/compile_expansions_generate.sh b/evergreen/functions/compile_expansions_generate.sh index fe06d0fdf7d..dc9642f5cd4 100644 --- a/evergreen/functions/compile_expansions_generate.sh +++ b/evergreen/functions/compile_expansions_generate.sh @@ -5,6 +5,14 @@ cd src set -o errexit set -o verbose +# We get the raw version string (r1.2.3-45-gabcdef) from git +MONGO_VERSION=$(git describe --abbrev=7) +# If this is a patch build, we add the patch version id to the version string so we know +# this build was a patch, and which evergreen task it came from +if [ "${is_patch}" = "true" ]; then + MONGO_VERSION="$MONGO_VERSION-patch-${version_id}" +fi +echo "MONGO_VERSION = ${MONGO_VERSION}" activate_venv # shared scons cache testing # if 'scons_cache_scope' enabled and project level 'disable_shared_scons_cache' is not true @@ -35,12 +43,12 @@ if [ ! -z ${scons_cache_scope} ]; then set -o errexit fi echo "Shared Cache with setting: ${scons_cache_scope}" - SCONS_CACHE_MODE=${scons_cache_mode} SCONS_CACHE_SCOPE=$scons_cache_scope IS_PATCH=${is_patch} IS_COMMIT_QUEUE=${is_commit_queue} $python buildscripts/generate_compile_expansions_shared_cache.py --out compile_expansions.yml + MONGO_VERSION=$MONGO_VERSION SCONS_CACHE_MODE=${scons_cache_mode} SCONS_CACHE_SCOPE=$scons_cache_scope IS_PATCH=${is_patch} IS_COMMIT_QUEUE=${is_commit_queue} $python buildscripts/generate_compile_expansions_shared_cache.py --out compile_expansions.yml # Legacy Expansion generation else echo "Using legacy expansion generation" # Proceed with regular expansions generated # This script converts the generated version string into a sanitized version string for # use by scons and uploading artifacts as well as information about for the scons cache. - SCONS_CACHE_MODE=${scons_cache_mode} USE_SCONS_CACHE=${use_scons_cache} IS_PATCH=${is_patch} IS_COMMIT_QUEUE=${is_commit_queue} $python buildscripts/generate_compile_expansions.py --out compile_expansions.yml + MONGO_VERSION=$MONGO_VERSION SCONS_CACHE_MODE=${scons_cache_mode} USE_SCONS_CACHE=${use_scons_cache} $python buildscripts/generate_compile_expansions.py --out compile_expansions.yml fi diff --git a/evergreen/functions/version_expansions_generate.sh b/evergreen/functions/version_expansions_generate.sh deleted file mode 100755 index 6dae45134d9..00000000000 --- a/evergreen/functions/version_expansions_generate.sh +++ /dev/null @@ -1,17 +0,0 @@ -DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)" -. "$DIR/../prelude.sh" - -cd src - -set -o errexit -set -o verbose -# We get the raw version string (r1.2.3-45-gabcdef) from git -MONGO_VERSION=$(git describe --abbrev=7) -# If this is a patch build, we add the patch version id to the version string so we know -# this build was a patch, and which evergreen task it came from -if [ "${is_patch}" = "true" ]; then - MONGO_VERSION="$MONGO_VERSION-patch-${version_id}" -fi -echo "MONGO_VERSION = ${MONGO_VERSION}" - -MONGO_VERSION=${MONGO_VERSION} IS_PATCH=${is_patch} IS_COMMIT_QUEUE=${is_commit_queue} buildscripts/generate_version_expansions.py --out version_expansions.yml |