Skip to content

Commit 2ab85b7

Browse files
authored
FIX: Use imageOverride demand instead of vmImage for 1ES Windows pool selection (#429)
### Work Item / Issue Reference [AB#42368](https://sqlclientdrivers.visualstudio.com/c6d89619-62de-46a0-8b46-70b92a84d85e/_workitems/edit/42368) > N/A ------------------------------------------------------------------- ### Summary Fix 1ES Pipeline Templates validation failure (`1ES PT Error: Using an image without 1es-pt-prerequisites artifact is not allowed`) on Windows build stages. The `Django-1ES-pool` custom 1ES Hosted Pool was falling back to its default `MMS2016` (Windows Server 2019) image because `vmImage` doesn't properly select images from custom pools. Changed all three Windows pool configurations to use `demands` with `imageOverride` (matching the pattern already used by the Linux stage template) to correctly select the `WIN22-SQL22` image. **Files changed:** - `OneBranchPipelines/stages/build-windows-single-stage.yml` - `OneBranchPipelines/official-release-pipeline.yml` - `OneBranchPipelines/dummy-release-pipeline.yml`
1 parent d424c6f commit 2ab85b7

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

OneBranchPipelines/dummy-release-pipeline.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ extends:
9797
type: windows
9898
isCustom: true
9999
name: Django-1ES-pool
100-
vmImage: WIN22-SQL22
100+
demands:
101+
- imageOverride -equals WIN22-SQL22
101102

102103
variables:
103104
ob_outputDirectory: '$(Build.ArtifactStagingDirectory)'

OneBranchPipelines/official-release-pipeline.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ extends:
100100
type: windows
101101
isCustom: true
102102
name: Django-1ES-pool
103-
vmImage: WIN22-SQL22
103+
demands:
104+
- imageOverride -equals WIN22-SQL22
104105

105106
variables:
106107
ob_outputDirectory: '$(Build.ArtifactStagingDirectory)'

OneBranchPipelines/stages/build-windows-single-stage.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ stages:
3939
type: windows
4040
isCustom: true
4141
name: Django-1ES-pool
42-
vmImage: WIN22-SQL22
42+
demands:
43+
- imageOverride -equals WIN22-SQL22
4344
# Extended timeout for downloads, builds, and testing
4445
timeoutInMinutes: 120
4546

0 commit comments

Comments
 (0)