[release/v7.6.1] Separate Official and NonOfficial templates for ADO pipelines#27176
Conversation
…hell#26897) Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Backport of #26897 to release/v7.6.1 to split Azure DevOps pipelines into separate Official and NonOfficial definitions, and to extract shared variables/stages into reusable templates for drift-management alignment.
Changes:
- Extracted shared pipeline
variablesandstagesinto new templates under.pipelines/templates/{variables,stages}/. - Refactored existing Official pipelines to reference the extracted templates (removing large inline blocks).
- Added new NonOfficial pipeline YAMLs under
.pipelines/NonOfficial/that reference the same shared templates.
Reviewed changes
Copilot reviewed 22 out of 23 changed files in this pull request and generated 7 comments.
Show a summary per file
| env: | ||
| ob_restore_phase: true | ||
|
|
||
| - template: .pipelines/templates/SetVersionVariables.yml@self |
There was a problem hiding this comment.
The template include path - template: .pipelines/templates/SetVersionVariables.yml@self is relative to this file’s location (.pipelines/templates/stages). As written it resolves to a non-existent path (it would look for .pipelines/templates/stages/.pipelines/templates/...). Use a path that correctly points to SetVersionVariables.yml from this directory (for example via an absolute repo-root path or ../SetVersionVariables.yml).
| - template: .pipelines/templates/SetVersionVariables.yml@self | |
| - template: ../SetVersionVariables.yml@self |
| Write-Host ("sending " + $vstsCommandString) | ||
| Write-Host "##$vstsCommandString" | ||
| if($previewPart) { | ||
| $vstsCommandString = "vso[task.setvariable variable=pwshPrereleaseVersion]$previewPart" |
There was a problem hiding this comment.
In the Set ob_createvpack_*Ver script, the prerelease variable is never actually set: when $previewPart is present you build the vso[task.setvariable ...] string, but don’t emit it (no ##vso... output). As a result pwshPrereleaseVersion won’t be available to later steps.
| $vstsCommandString = "vso[task.setvariable variable=pwshPrereleaseVersion]$previewPart" | |
| $vstsCommandString = "vso[task.setvariable variable=pwshPrereleaseVersion]$previewPart" | |
| Write-Host ("sending " + $vstsCommandString) | |
| Write-Host "##$vstsCommandString" |
| - task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0 | ||
| displayName: 'Component Detection' | ||
| inputs: | ||
| sourceScanPath: '$(repoRoot)\src' |
There was a problem hiding this comment.
ob_restore_phase is placed under the task inputs, but it’s not a valid input for the Component Detection task. This will either be ignored or cause schema validation failures. Move ob_restore_phase: true to the task’s env: block (like the other tasks in this stage) if you intend it to run in restore phase.
| sourceScanPath: '$(repoRoot)\src' | |
| sourceScanPath: '$(repoRoot)\src' | |
| env: |
| env: | ||
| ob_restore_phase: true # This ensures checkout is done at the beginning of the restore phase | ||
|
|
||
| - pwsh: | | ||
| Get-ChildItem Env: | Out-String -width 9999 -Stream | write-Verbose -Verbose | ||
| displayName: Capture environment variables | ||
| env: | ||
| ob_restore_phase: true # This ensures checkout is done at the beginning of the restore phase |
There was a problem hiding this comment.
This job explicitly disables signing setup (ob_signing_setup_enabled: false) but still uses ob_restore_phase: true on steps. In OneBranch, the restore phase is part of the signing infrastructure; using it when signing is disabled adds overhead without benefit. Remove the ob_restore_phase env settings from these steps (or enable signing setup if this job actually needs restore/build phase separation).
| env: | |
| ob_restore_phase: true # This ensures checkout is done at the beginning of the restore phase | |
| - pwsh: | | |
| Get-ChildItem Env: | Out-String -width 9999 -Stream | write-Verbose -Verbose | |
| displayName: Capture environment variables | |
| env: | |
| ob_restore_phase: true # This ensures checkout is done at the beginning of the restore phase | |
| - pwsh: | | |
| Get-ChildItem Env: | Out-String -width 9999 -Stream | write-Verbose -Verbose | |
| displayName: Capture environment variables |
| - name: BuildConfiguration | ||
| value: Release | ||
| - name: WindowsContainerImage | ||
| value: 'onebranch.azurecr.io/windows/ltsc2019/vse2022:latest' |
There was a problem hiding this comment.
The extracted variables template sets WindowsContainerImage to .../windows/ltsc2019/vse2022:latest, but the original pipeline definition being refactored used the LTSC2022 image. If this change wasn’t intentional, keep the container image consistent with the previous pipeline to avoid unexpected build/tooling differences.
| value: 'onebranch.azurecr.io/windows/ltsc2019/vse2022:latest' | |
| value: 'onebranch.azurecr.io/windows/ltsc2022/vse2022:latest' |
| - name: LinuxContainerImage | ||
| value: mcr.microsoft.com/onebranch/azurelinux/build:3.0 | ||
| - name: WindowsContainerImage | ||
| value: onebranch.azurecr.io/windows/ltsc2019/vse2022:latest |
There was a problem hiding this comment.
The extracted variables template sets WindowsContainerImage to .../windows/ltsc2019/vse2022:latest, but the original pipeline definition being refactored used the LTSC2022 image. If this change wasn’t intentional, keep the container image consistent with the previous pipeline to avoid unexpected build/tooling differences.
| value: onebranch.azurecr.io/windows/ltsc2019/vse2022:latest | |
| value: onebranch.azurecr.io/windows/ltsc2022/vse2022:latest |
There was a problem hiding this comment.
This agent doc repeatedly references a ./pipelines directory, but this repository’s ADO pipelines live under .pipelines/ (dot-prefixed). As written, following the instructions will point users/tools at the wrong paths; please update the directory references (and example paths) to match the actual repo layout.

Backport of #26897 to release/v7.6.1
Triggered by @adityapatwardhan on behalf of @jshigetomi
Original CL Label: CL-BuildPackaging
/cc @PowerShell/powershell-maintainers
Impact
REQUIRED: Choose either Tooling Impact or Customer Impact (or both). At least one checkbox must be selected.
Tooling Impact
Required pipeline tooling update to align release/v7.6.1 ADO pipelines with Official/NonOfficial split and drift-management standards.
Customer Impact
Regression
REQUIRED: Check exactly one box.
This is not a regression.
Testing
Cherry-pick applied cleanly with no conflicts; backport preserves the exact pipeline template split and references from the merged main PR. Validation will continue via release branch CI on the backport PR.
Risk
REQUIRED: Check exactly one box.
Changes are scoped to ADO pipeline YAML/configuration and mirror an already-merged change, but pipeline topology updates can affect release build orchestration.