diff options
author | Max Hirschhorn <max.hirschhorn@mongodb.com> | 2019-02-14 13:16:33 -0500 |
---|---|---|
committer | Max Hirschhorn <max.hirschhorn@mongodb.com> | 2019-02-14 13:16:33 -0500 |
commit | 7f3cdb660bb93d6824e00ca5d05b47f2b6ac3ee2 (patch) | |
tree | 20f120257d02447ed03df2f4c90572d385f16f0b /etc/perf.yml | |
parent | 22e1ef5134181dd9f58e8408e04744f205d7b41d (diff) | |
download | mongo-7f3cdb660bb93d6824e00ca5d05b47f2b6ac3ee2.tar.gz |
SERVER-39584 Create virtualenv for Python dependencies in perf.yml.
Diffstat (limited to 'etc/perf.yml')
-rw-r--r-- | etc/perf.yml | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/etc/perf.yml b/etc/perf.yml index aadac58c1c7..2bf1ee3ae88 100644 --- a/etc/perf.yml +++ b/etc/perf.yml @@ -38,7 +38,7 @@ post: # these default values in the distro config in evergreen. if [ -d "${scons_cache_path}" ]; then - ${python|/opt/mongodbtoolchain/v3/bin/python2} buildscripts/scons_cache_prune.py --cache-dir ${scons_cache_path} --cache-size ${scons_cache_size|200} --prune-ratio ${scons_prune_ratio|0.8} + /opt/mongodbtoolchain/v3/bin/python2 buildscripts/scons_cache_prune.py --cache-dir ${scons_cache_path} --cache-size ${scons_cache_size|200} --prune-ratio ${scons_prune_ratio|0.8} fi @@ -241,6 +241,19 @@ tasks: params: directory: src - command: manifest.load + # We create a virtual environment with the Python dependencies for compiling the server + # installed. + - command: shell.exec + params: + working_dir: src + script: | + set -o errexit + set -o verbose + + /opt/mongodbtoolchain/v3/bin/virtualenv --python /opt/mongodbtoolchain/v3/bin/python2 "${workdir}/venv" + source "${workdir}/venv/bin/activate" + + python2 -m pip install -r etc/pip/compile-requirements.txt - command: shell.exec params: working_dir: src @@ -258,7 +271,8 @@ tasks: # 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. - MONGO_VERSION=$MONGO_VERSION USE_SCONS_CACHE=${use_scons_cache|false} ${python|/opt/mongodbtoolchain/v3/bin/python2} buildscripts/generate_compile_expansions.py --out compile_expansions.yml + source "${workdir}/venv/bin/activate" + MONGO_VERSION=$MONGO_VERSION USE_SCONS_CACHE=${use_scons_cache|false} python2 buildscripts/generate_compile_expansions.py --out compile_expansions.yml # Then we load the generated version data into the agent so we can use it in task definitions - command: expansions.update params: @@ -270,7 +284,8 @@ tasks: set -o errexit set -o verbose - ${python|/opt/mongodbtoolchain/v3/bin/python2} ./buildscripts/scons.py ${compile_flags|} ${scons_cache_args|} mongo mongod + source "${workdir}/venv/bin/activate" + python2 ./buildscripts/scons.py ${compile_flags|} ${scons_cache_args|} mongo mongod - command: s3.put params: aws_key: ${aws_key} |