CI: Install a fresh python virtual env every time (Linux)

Install a fresh python virtual environment every time to ensure
correct permissions and compatibility of the packages.
This is more robust than relying on being able to upgrade
an existing one.

Signed-off-by: Oliver Steffen <osteffen@redhat.com>
This commit is contained in:
Oliver Steffen 2025-02-28 08:12:12 +01:00 committed by mergify[bot]
parent 29f02d0161
commit a1b2eeb6ff
2 changed files with 12 additions and 2 deletions

View File

@ -55,7 +55,12 @@ steps:
architecture: "x64"
condition: ne('${{ parameters.usePythonVersion }}', '')
- script: pip install -r pip-requirements.txt --upgrade
- bash: |
virtualenv ~/venv
. ~/venv/bin/activate
echo "##vso[task.setvariable variable=VIRTUAL_ENV]${VIRTUAL_ENV}"
echo "##vso[task.prependpath]${VIRTUAL_ENV}/bin"
pip install -r pip-requirements.txt --upgrade
displayName: 'Install/Upgrade pip modules'
# Set default

View File

@ -32,7 +32,12 @@ steps:
architecture: "x64"
condition: ne('${{ parameters.usePythonVersion }}', '')
- script: pip install -r pip-requirements.txt --upgrade
- bash: |
virtualenv ~/venv
. ~/venv/bin/activate
echo "##vso[task.setvariable variable=VIRTUAL_ENV]${VIRTUAL_ENV}"
echo "##vso[task.prependpath]${VIRTUAL_ENV}/bin"
pip install -r pip-requirements.txt --upgrade
displayName: 'Install/Upgrade pip modules'
# Set default