onebranch: allow publish/package to run in :latest container (#17514)

We have to run in an older OneBranch Windows container image due to
compiler bugs.

This change prevents us from having to wait for the container image to
download for build legs that _aren't_ using the compiler.

(cherry picked from commit bc20225b089815db77e5c5f6a4de62881eea30aa)
Service-Card-Id: PVTI_lADOAF3p4s4AmhmszgSI7Rw
Service-Version: 1.21
This commit is contained in:
Dustin L. Howett 2024-07-08 13:37:50 -07:00 committed by Dustin L. Howett
parent cf7a6617ab
commit b028a5764b
2 changed files with 11 additions and 1 deletions

View File

@ -106,6 +106,11 @@ extends:
- stage: Build
displayName: Build
dependsOn: []
variables:
# This was set by the parent build, but we need to override it to select a specific compiler version
- template: ./build/pipelines/templates-v2/variables-onebranch-config.yml@self
parameters:
containerVersion: 1.0.02566.28
jobs:
- template: ./build/pipelines/templates-v2/job-build-project.yml@self
parameters:

View File

@ -1,2 +1,7 @@
parameters:
- name: containerVersion
type: string
default: latest
variables:
WindowsContainerImage: 'onebranch.azurecr.io/windows/ltsc2022/vse2022:1.0.02566.28'
WindowsContainerImage: 'onebranch.azurecr.io/windows/ltsc2022/vse2022:${{ parameters.containerVersion }}'