summaryrefslogtreecommitdiff
path: root/.azurepipelines
diff options
context:
space:
mode:
authorOliver Steffen <osteffen@redhat.com>2025-02-28 08:12:12 +0100
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2025-02-28 18:34:59 +0000
commita1b2eeb6ff7902b27f78e1c405c95d40656e77ec (patch)
tree3e0b932de7124f21e5472a293252eebc2ab4f5fd /.azurepipelines
parent29f02d0161bc5d10a6e3b2cfc4d10799644964a5 (diff)
downloadedk2-a1b2eeb6ff7902b27f78e1c405c95d40656e77ec.tar.gz
edk2-a1b2eeb6ff7902b27f78e1c405c95d40656e77ec.zip
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>
Diffstat (limited to '.azurepipelines')
-rw-r--r--.azurepipelines/templates/platform-build-run-steps.yml7
-rw-r--r--.azurepipelines/templates/pr-gate-steps.yml7
2 files changed, 12 insertions, 2 deletions
diff --git a/.azurepipelines/templates/platform-build-run-steps.yml b/.azurepipelines/templates/platform-build-run-steps.yml
index 8be46cda0e..480979b5f8 100644
--- a/.azurepipelines/templates/platform-build-run-steps.yml
+++ b/.azurepipelines/templates/platform-build-run-steps.yml
@@ -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
diff --git a/.azurepipelines/templates/pr-gate-steps.yml b/.azurepipelines/templates/pr-gate-steps.yml
index 78b2b2c8d9..944b91412d 100644
--- a/.azurepipelines/templates/pr-gate-steps.yml
+++ b/.azurepipelines/templates/pr-gate-steps.yml
@@ -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