]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
scripts/build_utils.sh: pass VENV to helper functions 1813/head
authorKefu Chai <kchai@redhat.com>
Sat, 15 May 2021 03:15:01 +0000 (11:15 +0800)
committerKefu Chai <kchai@redhat.com>
Sat, 15 May 2021 03:35:48 +0000 (11:35 +0800)
pass VENV to following functions explicitly:

* teardown_vagrant_tests()
* start_tox()
* build_debs()
* install_python_packages()
* install_python_packages_no_binary()
* pip_download()
* check_binary_existence()

prepare for the cleanup to avoid creating TEMPVENV everytime the script
is included.

Signed-off-by: Kefu Chai <kchai@redhat.com>
84 files changed:
calamari-clients-build/build/build_rpm
calamari-clients-build/build/setup
calamari/build/setup
ceph-ansible-docs-prs/build/build
ceph-ansible-docs/build/build
ceph-ansible-nightly/build/build
ceph-ansible-nightly/build/teardown
ceph-ansible-prs/build/build
ceph-ansible-prs/build/teardown
ceph-ansible-rpm/build/build
ceph-ansible-scenario/build/build
ceph-ansible-scenario/build/teardown
ceph-build-pull-requests/build/build
ceph-build/build/build_deb
ceph-build/build/setup_deb
ceph-build/build/setup_rpm
ceph-container-nighlity/build/build
ceph-container-prs/build/build
ceph-deploy-build/build/build
ceph-deploy-build/build/setup
ceph-deploy-docs/build/build
ceph-deploy-pull-requests/build/setup
ceph-deploy-tag/build/build
ceph-dev-build/build/build_deb
ceph-dev-build/build/setup_deb
ceph-dev-build/build/setup_osc
ceph-dev-build/build/setup_rpm
ceph-dev-new-build/build/build_deb
ceph-dev-new-build/build/setup_deb
ceph-dev-new-build/build/setup_mingw
ceph-dev-new-build/build/setup_rpm
ceph-iscsi-cli-flake8/build/build
ceph-iscsi-cli/build/setup
ceph-iscsi-config-flake8/build/build
ceph-iscsi-config/build/setup
ceph-iscsi-stable/build/setup
ceph-iscsi-tools/build/setup
ceph-iscsi-tox/build/build
ceph-iscsi/build/setup
ceph-medic-docs/build/build
ceph-medic-pull-requests/build/build
ceph-medic-release/build/build_rpm
ceph-medic-rpm/build/build
ceph-medic-tests/build/build
ceph-pr-commits/build/build
ceph-qa-suite-pull-requests/build/build
ceph-release-rpm/build/build
ceph-tag/build/build
ceph-volume-ansible-prs/build/build
ceph-volume-ansible-prs/build/teardown
ceph-volume-nightly/build/build
ceph-volume-nightly/build/teardown
ceph-volume-pr/build/build
ceph-volume-pr/build/teardown
ceph-volume-scenario/build/build
ceph-volume-scenario/build/teardown
cephadm-ansible-prs/build/build
cephadm-ansible-prs/build/teardown
cephmetrics-pull-requests/setup/setup
cephmetrics-release/build/setup
cephmetrics/build/setup
chacra-pull-requests/build/build
configshell-fb/build/setup
diamond-build/build/build_deb
diamond-build/build/build_rpm
diamond-build/build/setup
jenkins-job-builder/build/build
kernel/build/build_deb
kernel/build/build_rpm
kernel/build/setup
merfi-pull-requests/build/build
mita-deploy/build/build
nfs-ganesha-stable/build/setup
nfs-ganesha/build/setup
paddles-pull-requests/build/build
radosgw-agent-pull-requests/build/build
radosgw-agent/build/build
rtslib-fb/build/setup
samba/build/setup
scripts/build_utils.sh
shaman-pull-requests/build/build
tcmu-runner/build/setup
teuthology-docs/build/build
teuthology-pull-requests/build/build

index 6a8b3d4e07b55916a798bdb9e9db535e0c8d726a..585563ba9ce4b1d2c013530f3eb6c777e41f511b 100644 (file)
@@ -62,7 +62,7 @@ chacra_check_url="${chacra_endpoint}/${ARCH}/calamari-clients-${VERSION}-${RPM_R
 
 if [ "$THROWAWAY" = false ] ; then
     # this exists in scripts/build_utils.sh
-    check_binary_existence $chacra_check_url
+    check_binary_existence $VENV $chacra_check_url
 fi
 
 HOST=$(hostname --short)
index c97d4718f2939d2bec9a55f83ee15bd03833ec94..8856866ba1eaa3cfe9b61224e3fa2c3336bbaa69 100644 (file)
@@ -54,7 +54,7 @@ CentOS|Fedora|SUSE*|RedHatEnterpriseServer)
 esac
 
 pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 # ask shaman which chacra instance to use
 chacra_url=`curl -f -u $SHAMAN_API_USER:$SHAMAN_API_KEY https://shaman.ceph.com/api/nodes/next/`
index e014d1ff138b2fb083352c3b4ee1b081fab21ada..981ec8544fee757da33661c2a8ef5206e06d7af7 100644 (file)
@@ -36,7 +36,7 @@ echo "*****"
 export LC_ALL=C # the following is vulnerable to i18n
 
 pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 # ask shaman which chacra instance to use
 chacra_url=`curl -f -u $SHAMAN_API_USER:$SHAMAN_API_KEY https://shaman.ceph.com/api/nodes/next/`
index 50c9f920b2930e925e8dfbd132217c4f4bd7d516..ee4ec65163065efab640c9c9379150358902146d 100644 (file)
@@ -2,7 +2,7 @@
 
 # the following two methods exist in scripts/build_utils.sh
 pkgs=( "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 cd $WORKSPACE/docs/
 $VENV/tox -rv
index 2af4acb89f4d8d6b6a5cc230576850d5548868f9..b060335bb22e8e39fa598e55be6573aaa535fff1 100644 (file)
@@ -4,7 +4,7 @@ set -ex
 
 # the following two methods exist in scripts/build_utils.sh
 pkgs=( "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 # trims leading slashes
 BRANCH=${GIT_BRANCH#*/}
index 3514dd0f0cd725980c0aa2ad447558f2a697f99a..6a96d997e62144dffafff780ba12f6e29b493dc1 100644 (file)
@@ -2,7 +2,7 @@
 
 # the following two methods exist in scripts/build_utils.sh
 pkgs=( "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 # XXX this might not be needed
 source $VENV/activate
index 350248e524d88f91e9dfd934189035bcf8d471ae..02a05ccf6ed4d84722af83881bffd32d3a5b902f 100644 (file)
@@ -3,4 +3,4 @@
 cd $WORKSPACE/tests
 
 # the method exists in scripts/build_utils.sh
-teardown_vagrant_tests
+teardown_vagrant_tests $VENV
index c6ab69851a140bb430bd66319fd11d401e056210..a929dcdb2c54db185e4f2f90cec420248d5af4f5 100644 (file)
@@ -2,7 +2,7 @@
 
 # the following two methods exist in scripts/build_utils.sh
 pkgs=( "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 # XXX this might not be needed
 source $VENV/activate
@@ -35,6 +35,6 @@ rm -rf $HOME/ansible/facts/*
 [[ "$ghprbTargetBranch" != stable-3.2 && "$SCENARIO" == shrink_osd_legacy ]] ||
 [[ "$ghprbTargetBranch" =~ stable-3 && "$SCENARIO" == filestore_to_bluestore ]] ||
 [[ "$ghprbTargetBranch" == stable-5.0 && "$DEPLOYMENT" == "non_container" && "$SCENARIO" == update ]] ||
-start_tox
+start_tox $TEMPVENV
 
 # Update scenario on stable-5.0 must be enabled back once 15.2.8 is out
index e4434d6483d6797e204086b42aee82c497e1c037..6e250f61cc7fd1cb713e6be6e2a5edf3a2782f7a 100644 (file)
@@ -3,7 +3,7 @@
 cd $WORKSPACE/tests
 
 # the method exists in scripts/build_utils.sh
-teardown_vagrant_tests
+teardown_vagrant_tests $VENV
 
 # clean fact cache
 rm -rf $HOME/ansible/facts/*
index 08ecaf30628ad2f21b3bc595aca81df530a639fe..1a5ed0da0f48e0378049d176557e9b6a05225529 100644 (file)
@@ -18,7 +18,7 @@ make rpm || ( tail -n +1 {root,build}.log && exit 1 )
 # Chacra time
 
 pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 # ask shaman which chacra instance to use
 chacra_url=`curl -u $SHAMAN_API_USER:$SHAMAN_API_KEY https://shaman.ceph.com/api/nodes/next/`
index 20fe106f0856743b5a2632d3b39fcf6f30b6b2ce..aa99bd18586f75ec785db9556d38f51ee1290c0d 100644 (file)
@@ -2,7 +2,7 @@
 
 # the following two methods exist in scripts/build_utils.sh
 pkgs=( "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 # XXX this might not be needed
 source $VENV/activate
@@ -17,4 +17,4 @@ update_vagrant_boxes
 # In the same logic, clean fact cache
 rm -rf $HOME/ansible/facts/*
 
-start_tox
\ No newline at end of file
+start_tox
index b9e5ebfa932b7f8a8d263b04070f032e1060b524..6e250f61cc7fd1cb713e6be6e2a5edf3a2782f7a 100644 (file)
@@ -3,7 +3,7 @@
 cd $WORKSPACE/tests
 
 # the method exists in scripts/build_utils.sh
-teardown_vagrant_tests
+teardown_vagrant_tests $VENV
 
 # clean fact cache
-rm -rf $HOME/ansible/facts/*
\ No newline at end of file
+rm -rf $HOME/ansible/facts/*
index b51a923c96777de1fe3b5d8c36d94bebf9d5cbf3..fb6a7159afd517e0df075070aeec534cb7805e62 100644 (file)
@@ -6,7 +6,7 @@ set -e
 # must pin urllib3 to 1.22 because 1.23 is incompatible with requests, which
 # is used by jenkins-job-builder
 pkgs=( "ansible" "jenkins-job-builder>=3.5.0" "urllib3==1.22" "pyopenssl" "ndg-httpsclient" "pyasn1" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 
 # Test every definition if available in the current repository and update the jobs
index aa573c6e030cf94e3825bebbb8a7934051a5b436..312f379ab5bb36cc4674380b43a7a641f2420067 100644 (file)
@@ -1,4 +1,4 @@
 #!/bin/bash
 set -ex
 
-build_debs ${vers} ${debian_version}
+build_debs ${VENV} ${vers} ${debian_version}
index 6332a498cae9982f140428bd74a5ac759aa2cbb6..6ed8e12ebb59e744b5f04d73fc4f8041173f0894 100644 (file)
@@ -59,7 +59,7 @@ NORMAL_ARCH=$ARCH
 create_build_status "started" "ceph" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $NORMAL_ARCH
 
 pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 chacra_url=https://chacra.ceph.com/
 make_chacractl_config
@@ -75,5 +75,5 @@ chacra_check_url="${chacra_endpoint}/librados2_${bpvers}_${DEB_ARCH}.deb"
 if [ "$THROWAWAY" = false ] ; then
     # this exists in scripts/build_utils.sh
     # TODO if this exits we need to post to shaman a success
-    check_binary_existence $chacra_check_url
+    check_binary_existence $VENV $chacra_check_url
 fi
index 61edfdd67236241a55dda9cb42d521dc56161ca5..f6b63fe1a61a52fa3287c2cdc304c3ee682a3334 100644 (file)
@@ -49,7 +49,7 @@ NORMAL_ARCH=$ARCH
 create_build_status "started" "ceph" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $NORMAL_ARCH
 
 pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 # create the .chacractl config file using global variables
 make_chacractl_config
@@ -70,5 +70,5 @@ chacra_check_url="${chacra_endpoint}/${ARCH}/flavors/${FLAVOR}/librados2-${vers}
 if [ "$THROWAWAY" = false ] ; then
     # this exists in scripts/build_utils.sh
     # TODO if this exits we need to post to shaman a success
-    check_binary_existence $chacra_check_url
+    check_binary_existence $VENV $chacra_check_url
 fi
index 589d3fc5461b2e1b6f2d7bf03f2719deacbe74bd..df9a612828c0f9073ece04b2f6e55c56a8374349 100644 (file)
@@ -2,7 +2,7 @@
 
 # the following two methods exist in scripts/build_utils.sh
 pkgs=( "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 # XXX this might not be needed
 source $VENV/activate
index 589d3fc5461b2e1b6f2d7bf03f2719deacbe74bd..df9a612828c0f9073ece04b2f6e55c56a8374349 100644 (file)
@@ -2,7 +2,7 @@
 
 # the following two methods exist in scripts/build_utils.sh
 pkgs=( "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 # XXX this might not be needed
 source $VENV/activate
index e89ec9b98e131de55b4601fb109ddee95c9dc253..5edbae202913aa265f07cfd77c5f33b97bc14b87 100644 (file)
@@ -46,7 +46,7 @@ then
 
         # this exists in scripts/build_utils.sh for ceph-deploy, binaries have
         # no architecture so we POST them to 'noarch' for rpms
-        check_binary_existence $chacra_endpoint/noarch
+        check_binary_existence $VENV $chacra_endpoint/noarch
 
         if [ ! -e setup.py ] ; then
             echo "Are we in the right directory"
@@ -103,7 +103,7 @@ then
     chacra_endpoint="ceph-deploy/${chacra_ref}/${GIT_COMMIT}/${DISTRO}/universal/all"
 
     # this exists in scripts/build_utils.sh
-    check_binary_existence $chacra_endpoint
+    check_binary_existence $VENV $chacra_endpoint
 
     if [ ! -d debian ] ; then
         echo "Are we in the right directory"
index a1fa6a8c7b88985d127c92ae761ff63659ec27f9..1f71004f5a29e37372c8404206d7b4b23ead2ba2 100644 (file)
@@ -22,7 +22,7 @@ if test -f /etc/redhat-release ; then
 fi
 
 pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 # ask shaman which chacra instance to use
 chacra_url=`curl -u $SHAMAN_API_USER:$SHAMAN_API_KEY https://shaman.ceph.com/api/nodes/next/`
index 73e99b7a9f643eb08779bbc91f881e8efead543b..1f80aafb49d26929710b147e14166f027ebdca44 100644 (file)
@@ -4,7 +4,7 @@ set -ex
 
 # the following two methods exist in scripts/build_utils.sh
 pkgs=( "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 # create the docs build with tox
 $VENV/tox -rv -e docs
index d8dc99073df4ef6f7f7fbe83024cf74e6b21e563..ced5ae484ed245f289819eb85aa8559b0c240c0b 100644 (file)
@@ -2,7 +2,7 @@
 
 # the following two methods exist in scripts/build_utils.sh
 pkgs=( "ansible" "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 
 # run ansible to get this current host to meet our requirements, specifying
index 89bb0ad343ddea0df2cfd13d1036a818848c5e7a..1ea302bf39054184f6951680233abce479f676ee 100644 (file)
@@ -9,7 +9,7 @@ fi
 
 # the following two methods exist in scripts/build_utils.sh
 pkgs=( "ansible" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 # run ansible to do all the tagging and release specifying
 # a local connection and 'localhost' as the host where to execute
index aa573c6e030cf94e3825bebbb8a7934051a5b436..5881c4785c244a288bcf8fad9a7b3474ec823df9 100644 (file)
@@ -1,4 +1,4 @@
 #!/bin/bash
 set -ex
 
-build_debs ${vers} ${debian_version}
+build_debs $VENV ${vers} ${debian_version}
index 98888e5ae9d60a4fdeec1993339900596fab6635..9720f518a98b53a08d3f0a1c896f6f770782af77 100644 (file)
@@ -59,7 +59,7 @@ NORMAL_ARCH=$ARCH
 create_build_status "started" "ceph" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $NORMAL_ARCH
 
 pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 # ask shaman which chacra instance to use
 chacra_url=`curl -u $SHAMAN_API_USER:$SHAMAN_API_KEY https://shaman.ceph.com/api/nodes/next/`
@@ -75,5 +75,5 @@ chacra_check_url="${chacra_endpoint}/librados2_${bpvers}_${DEB_ARCH}.deb"
 if [ "$THROWAWAY" = false ] ; then
     # this exists in scripts/build_utils.sh
     # TODO if this exits we need to post to shaman a success
-    check_binary_existence $chacra_check_url
+    check_binary_existence $VENV $chacra_check_url
 fi
index 4b81c6e09f7610f2855230d37f84e133af5f3b24..591d4034774e30a32faca22520df7f4da2a24349 100644 (file)
@@ -78,7 +78,7 @@ NORMAL_ARCH=$ARCH
 create_build_status "started" "ceph" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $NORMAL_ARCH
 
 pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 # ask shaman which chacra instance to use
 chacra_url=`curl -u $SHAMAN_API_USER:$SHAMAN_API_KEY https://shaman.ceph.com/api/nodes/next/`
@@ -97,5 +97,5 @@ chacra_check_url="${chacra_endpoint}/${ARCH}/flavors/${FLAVOR}/librados2-${vers}
 if [ "$THROWAWAY" = false ] ; then
     # this exists in scripts/build_utils.sh
     # TODO if this exits we need to post to shaman a success
-    check_binary_existence $chacra_check_url
+    check_binary_existence $VENV $chacra_check_url
 fi
index 9146c30070ffa73d585aebc7024d106446393499..639d7b625e1d79c344bfdb62487bc4443c38fdbd 100644 (file)
@@ -51,7 +51,7 @@ NORMAL_ARCH=$ARCH
 create_build_status "started" "ceph" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $NORMAL_ARCH
 
 pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 # ask shaman which chacra instance to use
 chacra_url=`curl -u $SHAMAN_API_USER:$SHAMAN_API_KEY https://shaman.ceph.com/api/nodes/next/`
@@ -72,5 +72,5 @@ chacra_check_url="${chacra_endpoint}/${ARCH}/flavors/${FLAVOR}/librados2-${vers}
 if [ "$THROWAWAY" = false ] ; then
     # this exists in scripts/build_utils.sh
     # TODO if this exits we need to post to shaman a success
-    check_binary_existence $chacra_check_url
+    check_binary_existence $VENV $chacra_check_url
 fi
index aa573c6e030cf94e3825bebbb8a7934051a5b436..312f379ab5bb36cc4674380b43a7a641f2420067 100644 (file)
@@ -1,4 +1,4 @@
 #!/bin/bash
 set -ex
 
-build_debs ${vers} ${debian_version}
+build_debs ${VENV} ${vers} ${debian_version}
index 98888e5ae9d60a4fdeec1993339900596fab6635..9720f518a98b53a08d3f0a1c896f6f770782af77 100644 (file)
@@ -59,7 +59,7 @@ NORMAL_ARCH=$ARCH
 create_build_status "started" "ceph" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $NORMAL_ARCH
 
 pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 # ask shaman which chacra instance to use
 chacra_url=`curl -u $SHAMAN_API_USER:$SHAMAN_API_KEY https://shaman.ceph.com/api/nodes/next/`
@@ -75,5 +75,5 @@ chacra_check_url="${chacra_endpoint}/librados2_${bpvers}_${DEB_ARCH}.deb"
 if [ "$THROWAWAY" = false ] ; then
     # this exists in scripts/build_utils.sh
     # TODO if this exits we need to post to shaman a success
-    check_binary_existence $chacra_check_url
+    check_binary_existence $VENV $chacra_check_url
 fi
index 307c3ed69b81cf28e2f330cd25c6e9675fa4b5ed..08ba136fdae37bec802b6239110bd2633ed855a3 100644 (file)
@@ -45,7 +45,7 @@ NORMAL_ARCH=$ARCH
 create_build_status "started" "ceph" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $NORMAL_ARCH
 
 pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 # ask shaman which chacra instance to use
 chacra_url=`curl -u $SHAMAN_API_USER:$SHAMAN_API_KEY https://shaman.ceph.com/api/nodes/next/`
@@ -63,7 +63,7 @@ chacra_check_url="${chacra_binary_endpoint}/ceph.zip"
 if [ "$THROWAWAY" = false ] ; then
     # this exists in scripts/build_utils.sh
     # TODO if this exits we need to post to shaman a success
-    check_binary_existence $chacra_check_url
+    check_binary_existence $VENV $chacra_check_url
 fi
 
 # We need Ubuntu Focal to cross-compile Ceph for Windows.
index 5e6700794ff640e112857b2dd3fec7734434e19e..aad8c5d7428b78ab8435d06b039c431ea8adf7b9 100644 (file)
@@ -49,7 +49,7 @@ NORMAL_ARCH=$ARCH
 create_build_status "started" "ceph" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $NORMAL_ARCH
 
 pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 # ask shaman which chacra instance to use
 chacra_url=`curl -u $SHAMAN_API_USER:$SHAMAN_API_KEY https://shaman.ceph.com/api/nodes/next/`
@@ -70,5 +70,5 @@ chacra_check_url="${chacra_endpoint}/${ARCH}/flavors/${FLAVOR}/librados2-${vers}
 if [ "$THROWAWAY" = false ] ; then
     # this exists in scripts/build_utils.sh
     # TODO if this exits we need to post to shaman a success
-    check_binary_existence $chacra_check_url
+    check_binary_existence $VENV $chacra_check_url
 fi
index 8c66e74f2b6686fec40e8210b4ae2f20f135312b..70779665c31507e6f479ec664194d3afa8f7de49 100644 (file)
@@ -2,7 +2,7 @@
 
 # the following two methods exist in scripts/build_utils.sh
 pkgs=( "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 cd "$WORKSPACE/ceph-iscsi-cli"
 
index 085780331730376573a2bfa32e55c7dd417f3fbe..c36cffd2ddeb17e69894ed4c1167cb4ed73a77c9 100644 (file)
@@ -36,7 +36,7 @@ echo "*****"
 export LC_ALL=C # the following is vulnerable to i18n
 
 pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 # ask shaman which chacra instance to use
 chacra_url=`curl -f -u $SHAMAN_API_USER:$SHAMAN_API_KEY https://shaman.ceph.com/api/nodes/next/`
index 426bc9d4005945244208c815c0ca12ad35835cf8..2aa39eaa1f18d37a081b97a016cb23d00144725a 100644 (file)
@@ -2,7 +2,7 @@
 
 # the following two methods exist in scripts/build_utils.sh
 pkgs=( "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 cd "$WORKSPACE/ceph-iscsi-config"
 
index 085780331730376573a2bfa32e55c7dd417f3fbe..c36cffd2ddeb17e69894ed4c1167cb4ed73a77c9 100644 (file)
@@ -36,7 +36,7 @@ echo "*****"
 export LC_ALL=C # the following is vulnerable to i18n
 
 pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 # ask shaman which chacra instance to use
 chacra_url=`curl -f -u $SHAMAN_API_USER:$SHAMAN_API_KEY https://shaman.ceph.com/api/nodes/next/`
index 3989aced835e7d99c173aa43e81c2516341c374d..746f0f1d47e4108b8ab5128d3378615c3d33f2fc 100644 (file)
@@ -45,7 +45,7 @@ echo "*****"
 export LC_ALL=C # the following is vulnerable to i18n
 
 pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 chacra_url="https://chacra.ceph.com/"
 # create the .chacractl config file using global variables
index 085780331730376573a2bfa32e55c7dd417f3fbe..c36cffd2ddeb17e69894ed4c1167cb4ed73a77c9 100644 (file)
@@ -36,7 +36,7 @@ echo "*****"
 export LC_ALL=C # the following is vulnerable to i18n
 
 pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 # ask shaman which chacra instance to use
 chacra_url=`curl -f -u $SHAMAN_API_USER:$SHAMAN_API_KEY https://shaman.ceph.com/api/nodes/next/`
index 8a97583d338672117a0703ec1aaa456465db6b4e..e5b00a245a20f7e0c798bb7dfce7ee1123577698 100644 (file)
@@ -2,7 +2,7 @@
 
 # the following two methods exist in scripts/build_utils.sh
 pkgs=( "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 cd "$WORKSPACE/ceph-iscsi"
 
index 085780331730376573a2bfa32e55c7dd417f3fbe..c36cffd2ddeb17e69894ed4c1167cb4ed73a77c9 100644 (file)
@@ -36,7 +36,7 @@ echo "*****"
 export LC_ALL=C # the following is vulnerable to i18n
 
 pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 # ask shaman which chacra instance to use
 chacra_url=`curl -f -u $SHAMAN_API_USER:$SHAMAN_API_KEY https://shaman.ceph.com/api/nodes/next/`
index 5f99f47c7e6cc3ffe094592505ff6ba1fbe28fe0..003ddbbc7dc9b07512e96e8e2a91f951dc72a71d 100644 (file)
@@ -4,7 +4,7 @@ set -ex
 
 # the following two methods exist in scripts/build_utils.sh
 pkgs=( "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 # trims leading slashes
 BRANCH=`branch_slash_filter ${GIT_BRANCH}`
index ec6f1273142396ac32c72975efe74f2d83968083..c5385f196b415a1df7e38915c79db254458cc0b5 100644 (file)
@@ -2,7 +2,7 @@
 
 # the following two methods exist in scripts/build_utils.sh
 pkgs=( "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 sudo yum install -y epel-release
 sudo yum --enablerepo epel install -y python36
index 125bb4fa21ad13b5fe05526b887a14014204627c..cef722bcb6c677d251bb74943d9a332e9dfba6d5 100644 (file)
@@ -16,7 +16,7 @@ make rpm || ( tail -n +1 {root,build}.log && exit 1 )
 # Chacra time
 
 pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 make_chacractl_config
 
index 08ecaf30628ad2f21b3bc595aca81df530a639fe..1a5ed0da0f48e0378049d176557e9b6a05225529 100644 (file)
@@ -18,7 +18,7 @@ make rpm || ( tail -n +1 {root,build}.log && exit 1 )
 # Chacra time
 
 pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 # ask shaman which chacra instance to use
 chacra_url=`curl -u $SHAMAN_API_USER:$SHAMAN_API_KEY https://shaman.ceph.com/api/nodes/next/`
index 2ba71d3e9d89b5d5d727077d6e45a225f5ab5380..3a7453708596d8bab2e6a5e396cb29e7c7dad80f 100644 (file)
@@ -1,6 +1,6 @@
 # the following two methods exist in scripts/build_utils.sh
 pkgs=( "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 WORKDIR=$(mktemp -td tox.XXXXXXXXXX)
 
index 4c134b4d40216e299f62c78664956189fdea5557..0f4ac0bdc31e641e6571b0a33900c15f9439a65d 100644 (file)
@@ -17,7 +17,7 @@ fi
 
 # the following two methods exist in scripts/build_utils.sh
 pkgs=( "pytest" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 cd "$WORKSPACE"
 timeout 600 $VENV/py.test -m "${pytest_mark}" -vs --junitxml="$WORKSPACE/report.xml" "$WORKSPACE/ceph-build/ceph-pr-commits/build/test_commits.py"
index d1bd1238ac9d39b1f79c6eca2bbc02acfd52c012..08b39bbdf08b753ce3ceab1a398596aafde29dfa 100644 (file)
@@ -4,7 +4,7 @@ set -ex
 
 # the following two methods exist in scripts/build_utils.sh
 pkgs=( "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 
 # run tox by recreating the environment and in verbose mode
index ec8b5ab8c40c908228b2cf29455e14cc09bf0f7f..aed3cd23d66f4a877aeb6fa9e12e9ca5da30ebaa 100644 (file)
@@ -13,7 +13,7 @@ rm -rf dist
 rm -rf RPMBUILD
 
 pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 # create the .chacractl config file using global variables
 make_chacractl_config
@@ -37,7 +37,7 @@ if [ "$target" = "sles11sp2" ] ; then
 fi
 echo "Target directory is: $target"
 
-check_binary_existence $chacra_baseurl/noarch
+check_binary_existence $VENV $chacra_baseurl/noarch
 
 # setup rpm build area
 mkdir -p RPMBUILD/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
index 4fabef2da2f2c6cbe18976bb240085b24e3fdccf..d97a3e705b310ab6125bc1054557a417a6641373 100644 (file)
@@ -9,7 +9,7 @@ fi
 
 # the following two methods exist in scripts/build_utils.sh
 pkgs=( "ansible" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 # run ansible to do all the tagging and release specifying
 # a local connection and 'localhost' as the host where to execute
index d8d3e050cbd96495a944a5b36f50e16381131703..17c9ffa28a8cf1d69c5c57be02d0e48d5e9f028e 100644 (file)
@@ -10,7 +10,7 @@ github_status_setup
 
 # the following two methods exist in scripts/build_utils.sh
 pkgs=( "tox" "github-status>0.0.3" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 GITHUB_STATUS_STATE="pending" $VENV/github-status create
 
index 07ed0e329cfab61cbef94c7656829025bd8c869f..6b92cb3ee51bca7aa9e57178eb04532a46d04968 100644 (file)
@@ -4,11 +4,11 @@
 
 # the following two methods exist in scripts/build_utils.sh
 pkgs=( "tox" "github-status>0.0.3" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 GITHUB_STATUS_STATE="failure" $VENV/github-status create
 
 cd $WORKSPACE/src/ceph-volume/ceph_volume/tests/functional
 
 # the method exists in scripts/build_utils.sh
-teardown_vagrant_tests
+teardown_vagrant_tests $VENV
index f4f05480195ee94f53f5b19c2335ebb6b4668469..8f1a68f9ba28d02889441a74ad40664e988ca832 100644 (file)
@@ -4,7 +4,7 @@ WORKDIR=$(mktemp -td tox.XXXXXXXXXX)
 
 # the following two methods exist in scripts/build_utils.sh
 pkgs=( "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 prune_stale_vagrant_vms $WORKSPACE/../**/tests
 delete_libvirt_vms
index d4518338b745ada571a4c1c208975c25b7bf645d..ad7de0428fadf3064be55311f6eb100ec19047ec 100644 (file)
@@ -8,4 +8,4 @@ cd $WORKSPACE/src/ceph-volume/ceph_volume/tests/functional
 scenarios=$(find . | grep vagrant_ssh_config | xargs -r dirname)
 
 # the method exists in scripts/build_utils.sh
-teardown_vagrant_tests
+teardown_vagrant_tests $VENV
index 83833a7a2e9872e3b2d061dd8cd4ad476f1e3c18..8ee52a8e7a4deb2995afa705139c6b2641a1207b 100644 (file)
@@ -8,7 +8,7 @@ github_status_setup
 
 # the following two methods exist in scripts/build_utils.sh
 pkgs=( "tox" "github-status>0.0.3")
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 cd src/ceph-volume
 
index 057f0e9f5900e1303798450f899fb829183991a5..ab07894a58220dd5dbe621bfa6c4d92b2835b9a0 100644 (file)
@@ -4,6 +4,6 @@
 
 # the following two methods exist in scripts/build_utils.sh
 pkgs=( "github-status>0.0.3" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 GITHUB_STATUS_STATE="failure" $VENV/github-status create
index 2bac2e59460d6d4c766d74cdb5d4aa9d2eb3c2ab..2023af31375d5b4b45bd42e8981964afffd7ece6 100644 (file)
@@ -4,7 +4,7 @@ WORKDIR=$(mktemp -td tox.XXXXXXXXXX)
 
 # the following two methods exist in scripts/build_utils.sh
 pkgs=( "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 
 delete_libvirt_vms
index a5c26da80715e3eefe5cf2e5fb894f9be3853b3b..f03694a55d5e5239d730983bd4eaf839c68a1662 100644 (file)
@@ -3,4 +3,4 @@
 cd $WORKSPACE/src/ceph-volume/ceph_volume/tests/functional
 
 # the method exists in scripts/build_utils.sh
-teardown_vagrant_tests
+teardown_vagrant_tests $VENV
index a2edde822895fb43d6ef9318909eab30fbbe66b5..bd5afe3d4f5e5b33e892a058fc6bb48cac18b98a 100644 (file)
@@ -2,7 +2,7 @@
 
 # the following two methods exist in scripts/build_utils.sh
 pkgs=( "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 # XXX this might not be needed
 source $VENV/activate
index 9ce6137ff21ebd6bacf2b72ec4fb9dfdae4074f3..c4f2c3f8927ad5b8093ab6dc43f2aee7c14ac02e 100644 (file)
@@ -3,7 +3,7 @@
 cd "${WORKSPACE}"/tests
 
 # the method exists in scripts/build_utils.sh
-teardown_vagrant_tests
+teardown_vagrant_tests $VENV
 
 # clean fact cache
 rm -rf "${HOME}"/ansible/facts/*
index e7e861606e9b8836efe79125f8a7b592885deed9..420fbefc02e9323bd31523c8df14807bc6a1624e 100644 (file)
@@ -13,4 +13,4 @@ elif test -f /etc/debian_version ; then
 fi
 
 pkgs=( "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
index e4477e088313a7bbba04a56253f5711bdaab3042..576e7fb949b0c2e77a9c89abe2f683098abab7c5 100644 (file)
@@ -36,7 +36,7 @@ echo "*****"
 export LC_ALL=C # the following is vulnerable to i18n
 
 pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 # create the .chacractl config file using global variables
 make_chacractl_config
index 04867736f0f7b647d2a43d62f2fe9c9eeabc3764..14fec3fc7570b83b67f6d535caf695cd20f9b883 100644 (file)
@@ -36,7 +36,7 @@ echo "*****"
 export LC_ALL=C # the following is vulnerable to i18n
 
 pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 # ask shaman which chacra instance to use
 chacra_url=`curl -f -u $SHAMAN_API_USER:$SHAMAN_API_KEY https://shaman.ceph.com/api/nodes/next/`
index 6fc7c5924bfe5a1fad092ef62d018ea6a63eab39..44fae5c15928e4de103debf09a01914f2dfea4d3 100644 (file)
@@ -2,7 +2,7 @@
 
 # the following two methods exist in scripts/build_utils.sh
 pkgs=( "ansible" "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 # run ansible to get this current host to meet our requirements, specifying
 # a local connection and 'localhost' as the host where to execute
index 085780331730376573a2bfa32e55c7dd417f3fbe..c36cffd2ddeb17e69894ed4c1167cb4ed73a77c9 100644 (file)
@@ -36,7 +36,7 @@ echo "*****"
 export LC_ALL=C # the following is vulnerable to i18n
 
 pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 # ask shaman which chacra instance to use
 chacra_url=`curl -f -u $SHAMAN_API_USER:$SHAMAN_API_KEY https://shaman.ceph.com/api/nodes/next/`
index e8ef73550300a4f93294ddce3412e427b0f7c831..103644ac6006aa3e1b24f485b06a6b0892b3eb8e 100644 (file)
@@ -33,7 +33,7 @@ chacra_check_url="${chacra_endpoint}/diamond_${BPVER}_${ARCH}.deb"
 
 if [ "$THROWAWAY" = false ] ; then
     # this exists in scripts/build_utils.sh
-    check_binary_existence $chacra_check_url
+    check_binary_existence $VENV $chacra_check_url
 fi
 
 HOST=$(hostname --short)
index c63a62a807d8eca4646572919b12968fc9037d9e..4edc8e7800918fcd60387bec2390ba0e2edc78da 100644 (file)
@@ -63,7 +63,7 @@ chacra_check_url="${chacra_endpoint}/${ARCH}/diamond-${VERSION}-0.${DIST}.${ARCH
 
 if [ "$THROWAWAY" = false ] ; then
     # this exists in scripts/build_utils.sh
-    check_binary_existence $chacra_check_url
+    check_binary_existence $VENV $chacra_check_url
 fi
 
 HOST=$(hostname --short)
index c97d4718f2939d2bec9a55f83ee15bd03833ec94..8856866ba1eaa3cfe9b61224e3fa2c3336bbaa69 100644 (file)
@@ -54,7 +54,7 @@ CentOS|Fedora|SUSE*|RedHatEnterpriseServer)
 esac
 
 pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 # ask shaman which chacra instance to use
 chacra_url=`curl -f -u $SHAMAN_API_USER:$SHAMAN_API_KEY https://shaman.ceph.com/api/nodes/next/`
index 8683e045510890d44f7bb4fc2ab24451f2bb3b3b..bbc44b7ec66a6ddd5d863029052ca390ef5eb275 100644 (file)
@@ -10,7 +10,7 @@ set -euxo pipefail
 
 # the following two methods exist in scripts/build_utils.sh
 pkgs=( "jenkins-job-builder>=3.5.0" )
-install_python_packages "pkgs[@]" latest
+install_python_packages $TEMPVENV "pkgs[@]" latest
 
 # Wipe out JJB's cache if $FORCE is set.
 [ "$FORCE" = true ] && rm -rf "$HOME/.cache/jenkins_jobs/"
index aff31ee41eb18012fc4dedc8901b337480b5ec09..cdd5ddb99ed551c1184d3630f990185439269e72 100644 (file)
@@ -28,7 +28,7 @@ chacra_check_url="${chacra_endpoint}/kernel_${BPVER}_${DEB_ARCH}.deb"
 
 if [ "$THROWAWAY" = false ] ; then
     # this exists in scripts/build_utils.sh
-    check_binary_existence $chacra_check_url
+    check_binary_existence $VENV $chacra_check_url
 fi
 
 HOST=$(hostname --short)
index 0699c9d38841d7f87312d4596f598bedb3eb0407..366699fb34a9002a4c11bb219493be67bf510258 100644 (file)
@@ -55,7 +55,7 @@ chacra_check_url="${chacra_endpoint}/${ARCH}/kernel-${VERSION}-${RPM_RELEASE}.${
 
 if [ "$THROWAWAY" = false ] ; then
     # this exists in scripts/build_utils.sh
-    check_binary_existence $chacra_check_url
+    check_binary_existence $VENV $chacra_check_url
 fi
 
 HOST=$(hostname --short)
index 13570b7708c551bcbe440e2080361604aec0c938..b95471e384c160e9272d3a943ed18ed27e658eec 100644 (file)
@@ -68,7 +68,7 @@ CentOS|Fedora|SUSE*|RedHatEnterpriseServer)
 esac
 
 pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 # ask shaman which chacra instance to use
 chacra_url=`curl -u $SHAMAN_API_USER:$SHAMAN_API_KEY https://shaman.ceph.com/api/nodes/next/`
index 48947738bb1530d86a36df875bc35dd12e17755a..4d2603ceb3408dc2457a5ec0bcc4a5f84250962e 100644 (file)
@@ -4,7 +4,7 @@ set -ex
 
 # the following two methods exist in scripts/build_utils.sh
 pkgs=( "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 # run tox by recreating the environment and in verbose mode
 # by default this will run all environments defined
index 82ef308eb69870e37bd7920521aeabe88aa2d4da..83b0ee1767cbea1fa102944a248e7e7a2273fdfa 100644 (file)
@@ -4,7 +4,7 @@ set -ex
 
 # the following two methods exist in scripts/build_utils.sh
 pkgs=( "ansible" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 cd "$WORKSPACE/deploy/playbooks/"
 $VENV/ansible-playbook -i "localhost," -c local local_deploy.yml --extra-vars="branch=$BRANCH jenkins_prado_token=$JENKINS_PRADO_TOKEN prado_token=$PRADO_TOKEN"
index 43c019ed56b20fb428b90f677144cd9deafefe61..58c6f0853e40017564ea7afe22951fd8d24c3104 100644 (file)
@@ -45,7 +45,7 @@ echo "*****"
 export LC_ALL=C # the following is vulnerable to i18n
 
 pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 NFS_GANESHA_BRANCH=`branch_slash_filter $NFS_GANESHA_BRANCH`
 CEPH_BRANCH=`branch_slash_filter $CEPH_BRANCH`
index 4146be77f1b46895ea1676ed4b92b9c935fba892..57c1408cb4f80643d35f42cf44da8930ae259d7f 100644 (file)
@@ -42,7 +42,7 @@ echo "*****"
 export LC_ALL=C # the following is vulnerable to i18n
 
 pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 NFS_GANESHA_BRANCH=`branch_slash_filter $NFS_GANESHA_BRANCH`
 CEPH_BRANCH=`branch_slash_filter $CEPH_BRANCH`
index ec83f09e1338d505323c34c05b7a8b0bf4323fd4..9f0922e6332d12749389cc85b09d69c00b5d22e7 100644 (file)
@@ -2,7 +2,7 @@
 
 # the following two methods exist in scripts/build_utils.sh
 pkgs=( "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 sudo yum install -y epel-release
 sudo yum --enablerepo epel install -y python36
index 7ac19b72a2897ee298c7c78c0cc66ac0f4226b97..7ff22019b42f64ac36463b67c0b21e0b04e66e5e 100644 (file)
@@ -2,7 +2,7 @@
 
 # the following two methods exist in scripts/build_utils.sh
 pkgs=( "ansible" "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 
 # run ansible to get this current host to meet our requirements, specifying
index e9b935cb52ce65bf957b0af7d9226f0e479cfc88..9be367634fa643fe6ff5f3489a0fbea084303cc3 100644 (file)
@@ -15,7 +15,7 @@ ls -l
 
 # the following two methods exist in scripts/build_utils.sh
 pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 # create the .chacractl config file using global variables
 make_chacractl_config
@@ -37,7 +37,7 @@ if [[ -f /etc/redhat-release || -f /usr/bin/zypper ]] ; then
 
         chacra_endpoint="radosgw-agent/${chacra_ref}/${GIT_COMMIT}/${DISTRO}/${DISTRO_VERSION}"
 
-        check_binary_existence $chacra_endpoint/noarch
+        check_binary_existence $VENV $chacra_endpoint/noarch
 
         suse=$(uname -n | grep -ic -e suse -e sles || true)
         if [ $suse -gt 0 ]
@@ -75,7 +75,7 @@ else
 
         chacra_endpoint="radosgw-agent/${chacra_ref}/${GIT_COMMIT}/${DISTRO}/${DEB_BUILD}/noarch"
 
-        check_binary_existence $chacra_endpoint
+        check_binary_existence $VENV $chacra_endpoint
 
         dpkg-source -b .
         # we no longer sign the .dsc or .changes files (done by default with
index 085780331730376573a2bfa32e55c7dd417f3fbe..c36cffd2ddeb17e69894ed4c1167cb4ed73a77c9 100644 (file)
@@ -36,7 +36,7 @@ echo "*****"
 export LC_ALL=C # the following is vulnerable to i18n
 
 pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 # ask shaman which chacra instance to use
 chacra_url=`curl -f -u $SHAMAN_API_USER:$SHAMAN_API_KEY https://shaman.ceph.com/api/nodes/next/`
index 426b73ff24f49ad71a2f1fbd23e12e04d29a8359..d7956618f816da925b48155525e826ae835f0170 100644 (file)
@@ -36,7 +36,7 @@ echo "*****"
 export LC_ALL=C # the following is vulnerable to i18n
 
 pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 SAMBA_BRANCH=$(branch_slash_filter $SAMBA_BRANCH)
 CEPH_BRANCH=$(branch_slash_filter $CEPH_BRANCH)
index 7ef1cb93e0896d6ae0b19e3ee549fc1e47e2a6c0..a251c7dc97ec04a9295c05cb3d6fd1c487440794 100644 (file)
@@ -80,12 +80,14 @@ branch_slash_filter() {
 }
 
 pip_download() {
+    local venv=$1
+    shift
     local package=$1
     shift
     local options=$@
-    if ! $VENV/pip download $options --dest="$PIP_SDIST_INDEX" $package; then
+    if ! $venv/pip download $options --dest="$PIP_SDIST_INDEX" $package; then
         # pip <8.0.0 does not have "download" command
-        $VENV/pip install $options \
+        $venv/pip install $options \
                   --upgrade --exists-action=i --cache-dir="$PIP_SDIST_INDEX" \
                   $package
     fi
@@ -107,6 +109,9 @@ create_virtualenv () {
 }
 
 install_python_packages_no_binary () {
+    local venv_dir=$1
+    shift
+    local venv="$venv_dir/bin"
     # Use this function to create a virtualenv and install python packages
     # without compiling (or using wheels). Pass a list of package names.  If
     # the virtualenv exists it will get re-used since this function can be used
@@ -115,19 +120,19 @@ install_python_packages_no_binary () {
     # Usage (with pip==20.3.4 [the default]):
     #
     #   to_install=( "ansible" "chacractl>=0.0.21" )
-    #   install_python_packages_no_binary "to_install[@]"
+    #   install_python_packages_no_binary $TEMPVENV "to_install[@]"
     #
     # Usage (with pip<X.X.X [can also do ==X.X.X or !=X.X.X]):
     #
     #   to_install=( "ansible" "chacractl>=0.0.21" )
-    #   install_python_packages_no_binary "to_install[@]" "pip<X.X.X"
+    #   install_python_packages_no_binary $TEMPVENV "to_install[@]" "pip<X.X.X"
     #
     # Usage (with latest pip):
     #
     #   to_install=( "ansible" "chacractl>=0.0.21" )
-    #   install_python_packages_no_binary "to_install[@]" latest
+    #   install_python_packages_no_binary $TEMPVENV "to_install[@]" latest
 
-    create_virtualenv $TEMPVENV
+    create_virtualenv $venv_dir
 
     # Define and ensure the PIP cache
     PIP_SDIST_INDEX="$HOME/.cache/pip"
@@ -139,51 +144,54 @@ install_python_packages_no_binary () {
     # Updated to 20.3.4 in March 2021 because 10.0.0 is just too old.
     if [ "$2" == "latest" ]; then
         echo "Ensuring latest pip is installed"
-        $VENV/pip install -U pip
+        $venv/pip install -U pip
     elif [[ -n $2 && "$2" != "latest" ]]; then
         echo "Installing $2"
-        $VENV/pip install "$2"
+        $venv/pip install "$2"
     else
         # This is the default for most jobs.
         # See ff01d2c5 and fea10f52
         echo "Installing pip 20.3.4"
-        $VENV/pip install "pip==20.3.4"
+        $venv/pip install "pip==20.3.4"
     fi
 
     echo "Updating setuptools"
-    pip_download setuptools
+    pip_download $VENV setuptools
 
     pkgs=("${!1}")
     for package in ${pkgs[@]}; do
         echo $package
         # download packages to the local pip cache
-        pip_download $package --no-binary=:all:
+        pip_download $VENV $package --no-binary=:all:
         # install packages from the local pip cache, ignoring pypi
-        $VENV/pip install --no-binary=:all: --upgrade --exists-action=i --find-links="file://$PIP_SDIST_INDEX" --no-index $package
+        $venv/pip install --no-binary=:all: --upgrade --exists-action=i --find-links="file://$PIP_SDIST_INDEX" --no-index $package
     done
 }
 
 
 install_python_packages () {
+    local venv_dir=$1
+    shift
+    local venv="$venv_dir/bin"
     # Use this function to create a virtualenv and install
     # python packages. Pass a list of package names.
     #
     # Usage (with pip 20.3.4 [the default]):
     #
     #   to_install=( "ansible" "chacractl>=0.0.21" )
-    #   install_python_packages "to_install[@]"
+    #   install_python_packages $TEMPVENV "to_install[@]"
     #
     # Usage (with pip<X.X.X [can also do ==X.X.X or !=X.X.X]):
     #
     #   to_install=( "ansible" "chacractl>=0.0.21" )
-    #   install_python_packages_no_binary "to_install[@]" "pip<X.X.X"
+    #   install_python_packages_no_binary $TEMPVENV "to_install[@]" "pip<X.X.X"
     #
     # Usage (with latest pip):
     #
     #   to_install=( "ansible" "chacractl>=0.0.21" )
-    #   install_python_packages "to_install[@]" latest
+    #   install_python_packages $TEMPVENV "to_install[@]" latest
 
-    create_virtualenv $TEMPVENV
+    create_virtualenv $venv_dir
 
     # Define and ensure the PIP cache
     PIP_SDIST_INDEX="$HOME/.cache/pip"
@@ -195,27 +203,27 @@ install_python_packages () {
     # Updated to 20.3.4 in March 2021 because 10.0.0 is just too old.
     if [ "$2" == "latest" ]; then
         echo "Ensuring latest pip is installed"
-        $VENV/pip install -U pip
+        $venv/pip install -U pip
     elif [[ -n $2 && "$2" != "latest" ]]; then
         echo "Installing $2"
-        $VENV/pip install "$2"
+        $venv/pip install "$2"
     else
         # This is the default for most jobs.
         # See ff01d2c5 and fea10f52
         echo "Installing pip 20.3.4"
-        $VENV/pip install "pip==20.3.4"
+        $venv/pip install "pip==20.3.4"
     fi
 
     echo "Updating setuptools"
-    pip_download setuptools
+    pip_download $venv setuptools
 
     pkgs=("${!1}")
     for package in ${pkgs[@]}; do
         echo $package
         # download packages to the local pip cache
-        pip_download $package
+        pip_download $venv $package
         # install packages from the local pip cache, ignoring pypi
-        $VENV/pip install --upgrade --exists-action=i --find-links="file://$PIP_SDIST_INDEX" --no-index $package
+        $venv/pip install --upgrade --exists-action=i --find-links="file://$PIP_SDIST_INDEX" --no-index $package
     done
 }
 
@@ -283,11 +291,14 @@ get_rpm_dist() {
 }
 
 check_binary_existence () {
-    url=$1
+    local venv=$1
+    shift
+    local url=$1
+    shift
 
     # we have to use ! here so thet -e will ignore the error code for the command
     # because of this, the exit code is also reversed
-    ! $VENV/chacractl exists binaries/${url} ; exists=$?
+    ! $venv/chacractl exists binaries/${url} ; exists=$?
 
     # if the binary already exists in chacra, do not rebuild
     if [ $exists -eq 1 ] && [ "$FORCE" = false ] ; then
@@ -843,6 +854,8 @@ ceph_build_args_from_flavor() {
 }
 
 build_debs() {
+    local venv=$1
+    shift
     local vers=$1
     shift
     local debian_version=$1
@@ -912,7 +925,7 @@ build_debs() {
         find release/$vers/ | \
             egrep "*\.(changes|deb|ddeb|dsc|gz)$" | \
             egrep -v "(Packages|Sources|Contents)" | \
-            $VENV/chacractl binary ${chacra_flags} create ${chacra_endpoint}
+            $venv/chacractl binary ${chacra_flags} create ${chacra_endpoint}
         # write json file with build info
         cat > $WORKSPACE/repo-extra.json << EOF
 {
@@ -931,7 +944,7 @@ EOF
              -u $CHACRACTL_USER:$CHACRACTL_KEY \
              ${chacra_url}repos/${chacra_repo_endpoint}/extra/
         # start repo creation
-        $VENV/chacractl repo update ${chacra_repo_endpoint}
+        $venv/chacractl repo update ${chacra_repo_endpoint}
 
         echo Check the status of the repo at: https://shaman.ceph.com/api/repos/${chacra_repo_endpoint}/
     fi
@@ -1047,6 +1060,10 @@ update_vagrant_boxes() {
 }
 
 start_tox() {
+    local venv_dir=$1
+    shift
+    local venv="$venv_dir/bin"
+
     # the $SCENARIO var is injected by the job template. It maps
     # to an actual, defined, tox environment
     while true; do
@@ -1122,11 +1139,11 @@ start_tox() {
             ;;
     esac
 
-    for tox_env in $("$VENV"/tox -c "$TOX_INI_FILE" -l)
+    for tox_env in $("$venv"/tox -c "$TOX_INI_FILE" -l)
     do
         if [[ "$ENV_NAME" == "$tox_env" ]]; then
             # shellcheck disable=SC2116
-            if ! eval "$(echo "${TOX_RUN_ENV[@]}")" "$VENV"/tox -c "$TOX_INI_FILE" --workdir="$TEMPVENV" -v -e="$ENV_NAME" -- --provider=libvirt; then
+            if ! eval "$(echo "${TOX_RUN_ENV[@]}")" "$venv"/tox -c "$TOX_INI_FILE" --workdir="$venv_dir" -v -e="$ENV_NAME" -- --provider=libvirt; then
                 echo "ERROR: Job didn't complete successfully or got stuck for more than 3h."
                 exit 1
             fi
@@ -1244,6 +1261,8 @@ EOF
 }
 
 collect_ceph_logs() {
+    local venv=$1
+    shift
     # this is meant to be run in a testing scenario directory
     # with running vagrant vms. the ansible playbook will connect
     # to your test nodes and fetch any ceph logs that are present
@@ -1257,15 +1276,18 @@ collect_ceph_logs() {
         write_collect_logs_playbook
 
         pkgs=( "ansible" )
-        install_python_packages "pkgs[@]"
+        install_python_packages $TEMPVENV "pkgs[@]"
 
         export ANSIBLE_SSH_ARGS='-F ./vagrant_ssh_config'
         export ANSIBLE_STDOUT_CALLBACK='debug'
-        $VENV/ansible-playbook -vv -i hosts --limit $limit --extra-vars "archive_path=$WORKSPACE/logs" $WORKSPACE/collect-logs.yml || true
+        $venv/ansible-playbook -vv -i hosts --limit $limit --extra-vars "archive_path=$WORKSPACE/logs" $WORKSPACE/collect-logs.yml || true
     fi
 }
 
 teardown_vagrant_tests() {
+    local venv=$1
+    shift
+
     # collect ceph logs and teardown any running vagrant vms
     # this also cleans up any lingering livirt networks
     scenarios=$(find . | grep vagrant_ssh_config | xargs -r dirname)
@@ -1273,7 +1295,7 @@ teardown_vagrant_tests() {
     for scenario in $scenarios; do
         cd $scenario
         # collect all ceph logs from all test nodes
-        collect_ceph_logs all
+        collect_ceph_logs $venv all
         vagrant destroy -f
         stat ./fetch > /dev/null 2>&1 && rm -rf ./fetch
         cd -
index 71fa654c6e446a0b567231eab86944ce3db20272..85f1137d8b00c7ed3e32145f2113273cbb95f130 100644 (file)
@@ -2,7 +2,7 @@
 
 # the following two methods exist in scripts/build_utils.sh
 pkgs=( "ansible" "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 # run ansible to get this current host to meet our requirements, specifying
 # a local connection and 'localhost' as the host where to execute
index 085780331730376573a2bfa32e55c7dd417f3fbe..c36cffd2ddeb17e69894ed4c1167cb4ed73a77c9 100644 (file)
@@ -36,7 +36,7 @@ echo "*****"
 export LC_ALL=C # the following is vulnerable to i18n
 
 pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 # ask shaman which chacra instance to use
 chacra_url=`curl -f -u $SHAMAN_API_USER:$SHAMAN_API_KEY https://shaman.ceph.com/api/nodes/next/`
index 381c06d6cb38ef91e482ed479bf3d3507846a772..77628b1ace0dff08ad8dd052af9cefe2a3efd821 100644 (file)
@@ -4,7 +4,7 @@ set -ex
 
 # the following two methods exist in scripts/build_utils.sh
 pkgs=( "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 # create the docs build with tox
 $VENV/tox -rv -e docs
index 48947738bb1530d86a36df875bc35dd12e17755a..4d2603ceb3408dc2457a5ec0bcc4a5f84250962e 100644 (file)
@@ -4,7 +4,7 @@ set -ex
 
 # the following two methods exist in scripts/build_utils.sh
 pkgs=( "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
 
 # run tox by recreating the environment and in verbose mode
 # by default this will run all environments defined