From 873a804155083882f72503b78965d64c0848d2ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Mon, 15 Apr 2024 15:02:00 +0300 Subject: [PATCH] ci: use virtualenv to avoid race conditions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Desktop QA tests also use Pytest packages and their versions are different, so we can't install them globally, it needs to be done per build using `WORKSPACE_TMP` as destination. Signed-off-by: Jakub SokoĊ‚owski --- test/e2e/ci/Jenkinsfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/e2e/ci/Jenkinsfile b/test/e2e/ci/Jenkinsfile index e0d37a016e..24a3c3d91f 100644 --- a/test/e2e/ci/Jenkinsfile +++ b/test/e2e/ci/Jenkinsfile @@ -70,6 +70,10 @@ pipeline { PYTHONPATH = "${SQUISH_DIR}/lib:${SQUISH_DIR}/lib/python:${PYTHONPATH}" LD_LIBRARY_PATH = "${SQUISH_DIR}/lib:${SQUISH_DIR}/python3/lib:${LD_LIBRARY_PATH}" + /* Avoid race conditions with other builds using virtualenv. */ + VIRTUAL_ENV = "${WORKSPACE_TMP}/venv" + PATH = "${VIRTUAL_ENV}/bin:${PATH}" + TESTRAIL_URL = 'https://ethstatus.testrail.net' TESTRAIL_PROJECT_ID = 17 @@ -87,7 +91,8 @@ pipeline { stage('Deps') { steps { script { - sh 'pip3 install --user -r requirements.txt' + sh "python3 -m venv ${VIRTUAL_ENV}" + sh 'pip3 install -r requirements.txt' } } }