X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Fjjb-install.sh;h=86fbef71f7975cb4c90d21fc1b8432be1ce9e815;hb=6eefde1f463638b5021c2ec96eb67a017d379f1f;hp=9351f489409d6cd0dc5d4a096e492bfe8a341431;hpb=9f237eb9ddb18fe6e01cbadea0a75e36a0baf8d7;p=releng%2Fglobal-jjb.git diff --git a/shell/jjb-install.sh b/shell/jjb-install.sh index 9351f489..86fbef71 100644 --- a/shell/jjb-install.sh +++ b/shell/jjb-install.sh @@ -14,9 +14,14 @@ echo "---> jjb-install.sh" # DO NOT set -u as virtualenv's activate script has unbound variables set -e -o pipefail -virtualenv "/tmp/v/jjb" -# shellcheck source=/tmp/v/jjb/bin/activate disable=SC1091 -source "/tmp/v/jjb/bin/activate" +# Create a virtualenv in a temporary directoy and write it down to used +# or cleaned up later; cleanup is done in the script jjb-cleanup.sh. +JJB_VENV="$(mktemp -d)" +export JJB_VENV +virtualenv "$JJB_VENV" +echo "JJB_VENV=$JJB_VENV" > "$WORKSPACE/.jjb.properties" +# shellcheck source=$VENV_DIR/bin/activate disable=SC1091 +source "$JJB_VENV/bin/activate" pip install --quiet --upgrade "pip==9.0.3" setuptools pip install --quiet --upgrade "jenkins-job-builder==$JJB_VERSION"