diff --git a/ci/tests/Jenkinsfile.e2e-nightly b/ci/tests/Jenkinsfile.e2e-nightly index 75156ee4e9..9c17a6d254 100644 --- a/ci/tests/Jenkinsfile.e2e-nightly +++ b/ci/tests/Jenkinsfile.e2e-nightly @@ -36,6 +36,12 @@ pipeline { )) } + environment { + /* Avoid race conditions with other builds using virtualenv. */ + VIRTUAL_ENV = "${WORKSPACE_TMP}/venv" + PATH = "${VIRTUAL_ENV}/bin:${PATH}" + } + stages { stage('Fetch') { steps { script { @@ -52,7 +58,8 @@ pipeline { stage('Setup') { steps { script { dir('test/appium') { - sh 'pip3 install --user -r requirements.txt' + sh "python3 -m venv ${VIRTUAL_ENV}" + sh 'pip3 install -r requirements.txt' } } } } diff --git a/ci/tests/Jenkinsfile.e2e-prs b/ci/tests/Jenkinsfile.e2e-prs index 7cbf6a17c4..4dcf06b32a 100644 --- a/ci/tests/Jenkinsfile.e2e-prs +++ b/ci/tests/Jenkinsfile.e2e-prs @@ -54,6 +54,12 @@ pipeline { )) } + environment { + /* Avoid race conditions with other builds using virtualenv. */ + VIRTUAL_ENV = "${WORKSPACE_TMP}/venv" + PATH = "${VIRTUAL_ENV}/bin:${PATH}" + } + stages { stage('Prep') { steps { script { @@ -79,7 +85,8 @@ pipeline { stage('Setup') { steps { script { dir('test/appium') { - sh 'pip3 install --user -r requirements.txt' + sh "python3 -m venv ${VIRTUAL_ENV}" + sh 'pip3 install -r requirements.txt' } } } } diff --git a/ci/tests/Jenkinsfile.e2e-upgrade b/ci/tests/Jenkinsfile.e2e-upgrade index 56ed8f9573..eeb9771bec 100644 --- a/ci/tests/Jenkinsfile.e2e-upgrade +++ b/ci/tests/Jenkinsfile.e2e-upgrade @@ -35,6 +35,11 @@ pipeline { )) } + environment { + /* Avoid race conditions with other builds using virtualenv. */ + VIRTUAL_ENV = "${WORKSPACE_TMP}/venv" + PATH = "${VIRTUAL_ENV}/bin:${PATH}" + } stages { stage('Prep') { @@ -51,7 +56,8 @@ pipeline { stage('Setup') { steps { script { dir('test/appium') { - sh 'pip3 install --user -r requirements.txt' + sh "python3 -m venv ${VIRTUAL_ENV}" + sh 'pip3 install -r requirements.txt' } } } }