[PATCH v7 3/6] CI: Allow running in a container.


Oliver Steffen
 

Add a parameter of the pr-gate-build-job template to specify a
container image URL. If the value is not '' (default), then the
jobs will be run inside a container based on that image.

Signed-off-by: Oliver Steffen <osteffen@...>
---
.azurepipelines/templates/pr-gate-build-job.yml | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/.azurepipelines/templates/pr-gate-build-job.yml
b/.azurepipelines/templates/pr-gate-build-job.yml
index d0a6ccd10700..52e6260b1c77 100644
--- a/.azurepipelines/templates/pr-gate-build-job.yml
+++ b/.azurepipelines/templates/pr-gate-build-job.yml
@@ -12,6 +12,7 @@ parameters:
tool_chain_tag: ''
vm_image: ''
arch_list: ''
+ container: ''
usePythonVersion: '>=3.10.6'

# Build step
@@ -71,6 +72,9 @@ jobs:
pool:
vmImage: ${{ parameters.vm_image }}

+ ${{ if not(eq(parameters.container, '')) }}:
+ container: ${{ parameters.container }}
+
steps:
- template: pr-gate-steps.yml
parameters:
--
2.38.1