Signed-off-by: Andrew Schoen <aschoen@redhat.com>
set -ex
-VENV="/tmp/jenkins-venv/bin"
+TEMPVENV=$(mktemp -td venv.XXXXXXXXXX)
+VENV="$TEMPVENV/bin"
install_python_packages () {
# Use this function to create a virtualenv and install
# install_python_packages "to_install[@]"
# Create the virtualenv
- rm -rf "/tmp/jenkins-venv"
- virtualenv /tmp/jenkins-venv
+ virtualenv $TEMPVENV
# Define and ensure the PIP cache
PIP_SDIST_INDEX="$HOME/.cache/pip"