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:
parent
29f02d0161
commit
a1b2eeb6ff
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue