diff options
author | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2017-07-07 19:26:33 -0400 |
---|---|---|
committer | Max Hirschhorn <max.hirschhorn@mongodb.com> | 2017-07-07 19:26:33 -0400 |
commit | a28697e133f6c3f265f0da4d784eddfab1b78836 (patch) | |
tree | 26467100b45f0d8ca321b624c3f77c906c27b142 | |
parent | 4a7a14dac51d112bb235717882c0458668c1332b (diff) | |
download | mongo-a28697e133f6c3f265f0da4d784eddfab1b78836.tar.gz |
SERVER-28171 Use Python 2.7 for all python invocations in evergreen.yml
(cherry picked from commit 7f452ce6183ae00774e890fc8db7c3ca23e631c2)
-rw-r--r-- | etc/evergreen.yml | 41 |
1 files changed, 26 insertions, 15 deletions
diff --git a/etc/evergreen.yml b/etc/evergreen.yml index e20068b6cfc..a90cf1209fd 100644 --- a/etc/evergreen.yml +++ b/etc/evergreen.yml @@ -210,7 +210,7 @@ functions: echo "There is more than 1 extracted mongo binary: $mongo_binary" exit 1 fi - bin_ver=$(${python|python} -c "import yaml; print(yaml.safe_load(open('compile_expansions.yml'))['version']);" | tr -d '[ \r\n]') + bin_ver=$(${python|/opt/mongodbtoolchain/v2/bin/python2} -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 @@ -524,7 +524,7 @@ functions: path_value="$path_value:${task_path_suffix}" fi - ${resmoke_wrapper} PATH="$path_value" ${san_symbolizer} ${san_options} ${rlp_environment} ${python|python} buildscripts/resmoke.py ${resmoke_args} $extra_args ${test_flags} --log=buildlogger --reportFile=report.json + ${resmoke_wrapper} PATH="$path_value" ${san_symbolizer} ${san_options} ${rlp_environment} ${python|/opt/mongodbtoolchain/v2/bin/python2} buildscripts/resmoke.py ${resmoke_args} $extra_args ${test_flags} --log=buildlogger --reportFile=report.json "do jepsen setup" : @@ -750,7 +750,7 @@ functions: # 3.2.1 is needed to check cross version compatibility as it is the final version # to use the old style replSetUpdatePosition command. # 3.2.1 is also needed to check for a correct implementation of SERVER-23299. - ${python|python} buildscripts/setup_multiversion_mongodb.py /data/install /data/multiversion ${multiversion_edition|"base"} ${multiversion_platform_arch|"linux/x86_64"} "2.6" "3.0" "3.2" "3.2.1" + ${python|/opt/mongodbtoolchain/v2/bin/python2} buildscripts/setup_multiversion_mongodb.py /data/install /data/multiversion ${multiversion_edition|"base"} ${multiversion_platform_arch|"linux/x86_64"} "2.6" "3.0" "3.2" "3.2.1" "cleanup environment" : command: shell.exec @@ -1140,7 +1140,7 @@ post: # these default values in the distro config in evergreen. if [ -d "${scons_cache_path}" ]; then - ${python|python} buildscripts/scons_cache_prune.py --cache-dir '${scons_cache_path}' --cache-size ${scons_cache_size|200} --prune-ratio ${scons_prune_ratio|0.8} + ${python|/opt/mongodbtoolchain/v2/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 - func: "cleanup environment" @@ -1161,8 +1161,8 @@ timeout: fi hang_analyzer_option="-c -o file -o stdout -p ${hang_analyzer_processes|dbtest,java,mongo,mongod,mongos,python,_test} -g bsondump,mongodump,mongoexport,mongofiles,mongoimport,mongooplog,mongoreplay,mongorestore,mongostat,mongotop" - echo "Calling the hang analyzer: PATH=\"/opt/mongodbtoolchain/gdb/bin:$PATH\" $sudo python buildscripts/hang_analyzer.py $hang_analyzer_option" - PATH="/opt/mongodbtoolchain/gdb/bin:$PATH" $sudo python buildscripts/hang_analyzer.py $hang_analyzer_option + echo "Calling the hang analyzer: PATH=\"/opt/mongodbtoolchain/gdb/bin:$PATH\" $sudo ${python|/opt/mongodbtoolchain/v2/bin/python2} buildscripts/hang_analyzer.py $hang_analyzer_option" + PATH="/opt/mongodbtoolchain/gdb/bin:$PATH" $sudo ${python|/opt/mongodbtoolchain/v2/bin/python2} buildscripts/hang_analyzer.py $hang_analyzer_option ####################################### # Tasks # @@ -1205,7 +1205,7 @@ 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. - echo $MONGO_VERSION | SCONS_CACHE_MODE=${scons_cache_mode|nolinked} USE_SCONS_CACHE=${use_scons_cache|false} ${python|python} buildscripts/generate_compile_expansions.py | tee compile_expansions.yml + echo $MONGO_VERSION | SCONS_CACHE_MODE=${scons_cache_mode|nolinked} USE_SCONS_CACHE=${use_scons_cache|false} ${python|/opt/mongodbtoolchain/v2/bin/python2} buildscripts/generate_compile_expansions.py | tee 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: @@ -1221,7 +1221,7 @@ tasks: rm -rf ${install_directory|/data/mongo-install-directory} - ${python|python} ./buildscripts/scons.py ${compile_flags|} ${scons_cache_args|} --use-new-tools --build-mongoreplay="${build_mongoreplay}" all dist dist-debugsymbols distsrc-${ext|tgz} ${msi_target|} ${additional_targets|} MONGO_VERSION=${version} + ${python|/opt/mongodbtoolchain/v2/bin/python2} ./buildscripts/scons.py ${compile_flags|} ${scons_cache_args|} --use-new-tools --build-mongoreplay="${build_mongoreplay}" all dist dist-debugsymbols distsrc-${ext|tgz} ${msi_target|} ${additional_targets|} MONGO_VERSION=${version} mv mongodb-src-*.${ext|tgz} distsrc.${ext|tgz} mv mongodb-*-debugsymbols.${ext|tgz} mongo-debugsymbols.tgz || true @@ -1242,7 +1242,7 @@ tasks: fi # Capture a list of new and modified tests. - ${python|python} buildscripts/burn_in_tests.py --branch=${branch_name} --buildVariant=${build_variant} --testListOutfile=jstests/new_tests.json --noExec $burn_in_args + ${python|/opt/mongodbtoolchain/v2/bin/python2} buildscripts/burn_in_tests.py --branch=${branch_name} --buildVariant=${build_variant} --testListOutfile=jstests/new_tests.json --noExec $burn_in_args # On windows we need to make sure the paths in unittests.txt are compatible with cygwin tar sed 's|\\|/|g' build/unittests.txt > build/unittests-tarlist.txt @@ -1256,7 +1256,7 @@ tasks: if [ "${has_packages|}" = "true" ] ; then cd buildscripts - ${python|python} ${packager_script} --prefix `pwd`/.. --distros ${packager_distro} --tarball `pwd`/../mongodb-binaries.tgz -s ${version} -m HEAD -a ${packager_arch} + ${python|/opt/mongodbtoolchain/v2/bin/python2} ${packager_script} --prefix `pwd`/.. --distros ${packager_distro} --tarball `pwd`/../mongodb-binaries.tgz -s ${version} -m HEAD -a ${packager_arch} cd .. fi @@ -1265,7 +1265,7 @@ tasks: cd shell-archive ${platform_decompress|tar xzvf} ../mongodb-binaries.tgz find . -mindepth 3 ! -name "mongo${exe}" -type f -exec rm {} \; # delete bin/* except bin/mongo - ${python|python} ../buildscripts/make_archive.py -o mongodb-shell.${ext|tgz} $(find mongodb-* -type f) + ${python|/opt/mongodbtoolchain/v2/bin/python2} ../buildscripts/make_archive.py -o mongodb-shell.${ext|tgz} $(find mongodb-* -type f) cd .. - command: archive.targz_pack @@ -1374,7 +1374,7 @@ tasks: set -o errexit set -o verbose - ${python|python} ./buildscripts/scons.py ${compile_flags|} --stack-size=1024 lint + ${python|/opt/mongodbtoolchain/v2/bin/python2} ./buildscripts/scons.py ${compile_flags|} --stack-size=1024 lint - <<: *task_template name: burn_in_tests @@ -1386,7 +1386,7 @@ tasks: - func: "run tests" vars: task_path_suffix: /data/multiversion - resmoke_wrapper: ${python|python} buildscripts/burn_in_tests.py --testListFile=jstests/new_tests.json + resmoke_wrapper: ${python|/opt/mongodbtoolchain/v2/bin/python2} buildscripts/burn_in_tests.py --testListFile=jstests/new_tests.json resmoke_args: --repeat=2 run_multiple_jobs: true @@ -2850,7 +2850,7 @@ tasks: cp mongodb*/bin/* . mkdir -p snmpconf cp -f src/mongo/db/modules/enterprise/docs/mongod.conf.master snmpconf/mongod.conf - SNMPCONFPATH=snmpconf ${san_symbolizer} ${san_options} ${python|python} buildscripts/resmoke.py --suites=snmp --jobs ${num_jobs_available|1} --shuffle --storageEngine=mmapv1 ${test_flags} --log=buildlogger --reportFile=report.json + SNMPCONFPATH=snmpconf ${san_symbolizer} ${san_options} ${python|/opt/mongodbtoolchain/v2/bin/python2} buildscripts/resmoke.py --suites=snmp --jobs ${num_jobs_available|1} --shuffle --storageEngine=mmapv1 ${test_flags} --log=buildlogger --reportFile=report.json - <<: *task_template name: snmp_WT @@ -2867,7 +2867,7 @@ tasks: cp mongodb*/bin/* . mkdir -p snmpconf cp -f src/mongo/db/modules/enterprise/docs/mongod.conf.master snmpconf/mongod.conf - SNMPCONFPATH=snmpconf ${san_symbolizer} ${san_options} ${python|python} buildscripts/resmoke.py --suites=snmp --jobs ${num_jobs_available|1} --shuffle --storageEngine=wiredTiger ${test_flags} --log=buildlogger --reportFile=report.json + SNMPCONFPATH=snmpconf ${san_symbolizer} ${san_options} ${python|/opt/mongodbtoolchain/v2/bin/python2} buildscripts/resmoke.py --suites=snmp --jobs ${num_jobs_available|1} --shuffle --storageEngine=wiredTiger ${test_flags} --log=buildlogger --reportFile=report.json - <<: *task_template name: ssl @@ -4793,6 +4793,7 @@ buildvariants: msi_target: msi content_type: application/zip compile_flags: --release -j$(( $(grep -c ^processor /proc/cpuinfo) / 2 )) VARIANT_DIR=win32 + python: python num_jobs_available: $(grep -c ^processor /proc/cpuinfo) ext: zip use_scons_cache: true @@ -4898,6 +4899,7 @@ buildvariants: msi_target: msi content_type: application/zip compile_flags: --release --win-version-min=ws08r2 -j$(( $(grep -c ^processor /proc/cpuinfo) / 2 )) MONGO_DISTMOD=2008plus VARIANT_DIR=win32 + python: python num_jobs_available: $(grep -c ^processor /proc/cpuinfo) ext: zip use_scons_cache: true @@ -5012,6 +5014,7 @@ buildvariants: content_type: application/zip num_jobs_available: $(grep -c ^processor /proc/cpuinfo) compile_flags: --dbg=on --opt=on --win-version-min=ws08r2 -j$(( $(grep -c ^processor /proc/cpuinfo) / 2 )) MONGO_DISTMOD=2008plus + python: python ext: zip use_scons_cache: true tasks: @@ -5151,6 +5154,7 @@ buildvariants: msi_target: msi content_type: application/zip compile_flags: --release --ssl MONGO_DISTMOD=windows-64 CPPPATH="c:/openssl/include c:/sasl/include c:/snmp/include c:/curl/include" LIBPATH="c:/openssl/lib c:/sasl/lib c:/snmp/lib c:/curl/lib" -j$(( $(grep -c ^processor /proc/cpuinfo) / 2 )) --dynamic-windows --win-version-min=ws08r2 VARIANT_DIR=win32 + python: python num_jobs_available: $(grep -c ^processor /proc/cpuinfo) ext: zip use_scons_cache: true @@ -5216,6 +5220,7 @@ buildvariants: msi_target: msi content_type: application/zip compile_flags: --release --ssl MONGO_DISTMOD=windows-64 CPPPATH="c:/openssl/include c:/sasl/include c:/snmp/include c:/curl/include" LIBPATH="c:/openssl/lib c:/sasl/lib c:/snmp/lib c:/curl/lib" -j$(( $(grep -c ^processor /proc/cpuinfo) / 2 )) --dynamic-windows --win-version-min=ws08r2 VARIANT_DIR=win32 + python: python num_jobs_available: $(grep -c ^processor /proc/cpuinfo) test_flags: --storageEngine=inMemory variant_excluded_flags: requires_persistence,requires_journaling @@ -5271,6 +5276,7 @@ buildvariants: msi_target: msi content_type: application/zip compile_flags: --release --ssl MONGO_DISTMOD=2008plus-ssl CPPPATH="c:/openssl/include" LIBPATH="c:/openssl/lib" -j$(( $(grep -c ^processor /proc/cpuinfo) / 2 )) --dynamic-windows --win-version-min=ws08r2 VARIANT_DIR=win32 + python: python num_jobs_available: $(grep -c ^processor /proc/cpuinfo) ext: zip use_scons_cache: true @@ -5364,6 +5370,7 @@ buildvariants: gorootvars: 'PATH="/cygdrive/c/mingw-w64/x86_64-4.9.1-posix-seh-rt_v3-rev1/mingw64/bin:/cygdrive/c/sasl/:$PATH"' content_type: application/zip compile_flags: --dbg=on --opt=off --ssl MONGO_DISTMOD=2008plus CPPPATH="c:/openssl/include c:/sasl/include c:/snmp/include c:/curl/include" LIBPATH="c:/openssl/lib c:/sasl/lib c:/snmp/lib c:/curl/lib" -j$(( $(grep -c ^processor /proc/cpuinfo) / 2 )) --dynamic-windows --win-version-min=ws08r2 VARIANT_DIR=win32 + python: python num_jobs_available: $(grep -c ^processor /proc/cpuinfo) ext: zip use_scons_cache: true @@ -5393,6 +5400,7 @@ buildvariants: push_arch: x86_64 gorootvars: CGO_CFLAGS=-mmacosx-version-min=10.7 CGO_LDFLAGS=-mmacosx-version-min=10.7 compile_flags: --allocator=system -j$(sysctl -n hw.logicalcpu) --release --osx-version-min=10.7 --libc++ + python: python2.7 num_jobs_available: 1 build_mongoreplay: true tasks: @@ -5493,6 +5501,7 @@ buildvariants: tooltags: "-tags ssl" gorootvars: CGO_CPPFLAGS=-I/opt/mongodbtoolchain/v2/include CGO_CFLAGS=-mmacosx-version-min=10.7 CGO_LDFLAGS=-mmacosx-version-min=10.7 compile_flags: --ssl --allocator=system -j$(sysctl -n hw.logicalcpu) --release --osx-version-min=10.7 --libc++ CPPPATH=/opt/mongodbtoolchain/v2/include + python: python2.7 num_jobs_available: 1 build_mongoreplay: true tasks: @@ -5592,6 +5601,7 @@ buildvariants: num_jobs_available: 1 gorootvars: CGO_CFLAGS=-mmacosx-version-min=10.7 CGO_LDFLAGS=-mmacosx-version-min=10.7 compile_flags: --dbg=on --opt=on --allocator=system -j$(sysctl -n hw.logicalcpu) --osx-version-min=10.7 --libc++ + python: python2.7 build_mongoreplay: true tasks: - name: compile @@ -5635,6 +5645,7 @@ buildvariants: tooltags: "-tags 'ssl sasl'" gorootvars: CGO_CPPFLAGS=-I/opt/mongodbtoolchain/v2/include CGO_CFLAGS=-mmacosx-version-min=10.7 CGO_LDFLAGS=-mmacosx-version-min=10.7 compile_flags: --ssl --allocator=system -j$(sysctl -n hw.logicalcpu) --release --osx-version-min=10.7 --libc++ CPPPATH=/opt/mongodbtoolchain/v2/include + python: python2.7 num_jobs_available: 1 build_mongoreplay: true tasks: |