Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[release/v7.6.1] Separate Official and NonOfficial templates for ADO pipelines#27176

Merged
adityapatwardhan merged 1 commit into
PowerShell:release/v7.6.1PowerShell/PowerShell:release/v7.6.1from
adityapatwardhan:backport/release/v7.6.1/26897-f9be17e6badityapatwardhan/PowerShell:backport/release/v7.6.1/26897-f9be17e6bCopy head branch name to clipboard
Apr 3, 2026
Merged

[release/v7.6.1] Separate Official and NonOfficial templates for ADO pipelines#27176
adityapatwardhan merged 1 commit into
PowerShell:release/v7.6.1PowerShell/PowerShell:release/v7.6.1from
adityapatwardhan:backport/release/v7.6.1/26897-f9be17e6badityapatwardhan/PowerShell:backport/release/v7.6.1/26897-f9be17e6bCopy head branch name to clipboard

Conversation

@adityapatwardhan

Copy link
Copy Markdown
Member

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 tooling change
  • Optional tooling change (include reasoning)

Required pipeline tooling update to align release/v7.6.1 ADO pipelines with Official/NonOfficial split and drift-management standards.

Customer Impact

  • Customer reported
  • Found internally

Regression

REQUIRED: Check exactly one box.

  • Yes
  • No

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.

  • High
  • Medium
  • Low

Changes are scoped to ADO pipeline YAML/configuration and mirror an already-merged change, but pipeline topology updates can affect release build orchestration.

…hell#26897)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@adityapatwardhan adityapatwardhan requested review from a team and jshigetomi as code owners April 2, 2026 23:28
@adityapatwardhan adityapatwardhan added the CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log label Apr 2, 2026
Copilot AI review requested due to automatic review settings April 2, 2026 23:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 variables and stages into 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
File Description
.pipelines/templates/variables/release-shared.yml Adds a shared variable template for release-related jobs (SDL/signing toggles, variable groups, paths).
.pipelines/templates/variables/PowerShell-vPack-Variables.yml Extracts vPack pipeline variables into a template.
.pipelines/templates/variables/PowerShell-Release-Variables.yml Extracts Release pipeline variables into a template.
.pipelines/templates/variables/PowerShell-Release-Azure-Variables.yml Extracts Release-Azure pipeline variables into a template.
.pipelines/templates/variables/PowerShell-Packages-Variables.yml Extracts Packages pipeline variables into a template.
.pipelines/templates/variables/PowerShell-Coordinated_Packages-Variables.yml Extracts Coordinated Packages pipeline variables into a template.
.pipelines/templates/stages/PowerShell-vPack-Stages.yml Extracts vPack stages/jobs into a template used by Official/NonOfficial pipelines.
.pipelines/templates/stages/PowerShell-Release-Stages.yml Extracts Release stages into a template used by Official/NonOfficial pipelines.
.pipelines/templates/stages/PowerShell-Packages-Stages.yml Extracts Packages stages into a template used by Official/NonOfficial pipelines.
.pipelines/templates/stages/PowerShell-Coordinated_Packages-Stages.yml Extracts Coordinated Packages stages into a template used by Official/NonOfficial pipelines.
.pipelines/templates/release-MSIX-Publish.yml Updates release shared-variable template reference path (./variables/...).
.pipelines/templates/release-githubNuget.yml Updates release shared-variable template reference path (./variables/...).
.pipelines/PowerShell-vPack-Official.yml Refactors Official vPack pipeline to use the new variables/stages templates.
.pipelines/PowerShell-Release-Official.yml Refactors Official Release pipeline to use the new variables/stages templates.
.pipelines/PowerShell-Release-Official-Azure.yml Refactors Official Release-Azure pipeline to use the new variables template.
.pipelines/PowerShell-Packages-Official.yml Refactors Official Packages pipeline to use the new variables/stages templates.
.pipelines/PowerShell-Coordinated_Packages-Official.yml Refactors Official Coordinated Packages pipeline to use the new variables/stages templates.
.pipelines/NonOfficial/PowerShell-vPack-NonOfficial.yml Adds NonOfficial vPack pipeline referencing shared templates.
.pipelines/NonOfficial/PowerShell-Release-NonOfficial.yml Adds NonOfficial Release pipeline referencing shared templates and NonOfficial dependencies.
.pipelines/NonOfficial/PowerShell-Release-Azure-NonOfficial.yml Adds NonOfficial Release-Azure pipeline referencing shared templates.
.pipelines/NonOfficial/PowerShell-Packages-NonOfficial.yml Adds NonOfficial Packages pipeline referencing shared templates and NonOfficial dependencies.
.pipelines/NonOfficial/PowerShell-Coordinated_Packages-NonOfficial.yml Adds NonOfficial Coordinated Packages pipeline referencing shared templates.
.github/agents/SplitADOPipelines.agent.md Adds an agent spec doc describing how to split ADO pipelines and extract templates.

env:
ob_restore_phase: true

- template: .pipelines/templates/SetVersionVariables.yml@self

Copilot AI Apr 2, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Suggested change
- template: .pipelines/templates/SetVersionVariables.yml@self
- template: ../SetVersionVariables.yml@self

Copilot uses AI. Check for mistakes.
Write-Host ("sending " + $vstsCommandString)
Write-Host "##$vstsCommandString"
if($previewPart) {
$vstsCommandString = "vso[task.setvariable variable=pwshPrereleaseVersion]$previewPart"

Copilot AI Apr 2, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
$vstsCommandString = "vso[task.setvariable variable=pwshPrereleaseVersion]$previewPart"
$vstsCommandString = "vso[task.setvariable variable=pwshPrereleaseVersion]$previewPart"
Write-Host ("sending " + $vstsCommandString)
Write-Host "##$vstsCommandString"

Copilot uses AI. Check for mistakes.
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
inputs:
sourceScanPath: '$(repoRoot)\src'

Copilot AI Apr 2, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
sourceScanPath: '$(repoRoot)\src'
sourceScanPath: '$(repoRoot)\src'
env:

Copilot uses AI. Check for mistakes.
Comment on lines +38 to +45
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

Copilot AI Apr 2, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Suggested change
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

Copilot uses AI. Check for mistakes.
- name: BuildConfiguration
value: Release
- name: WindowsContainerImage
value: 'onebranch.azurecr.io/windows/ltsc2019/vse2022:latest'

Copilot AI Apr 2, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
value: 'onebranch.azurecr.io/windows/ltsc2019/vse2022:latest'
value: 'onebranch.azurecr.io/windows/ltsc2022/vse2022:latest'

Copilot uses AI. Check for mistakes.
- name: LinuxContainerImage
value: mcr.microsoft.com/onebranch/azurelinux/build:3.0
- name: WindowsContainerImage
value: onebranch.azurecr.io/windows/ltsc2019/vse2022:latest

Copilot AI Apr 2, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
value: onebranch.azurecr.io/windows/ltsc2019/vse2022:latest
value: onebranch.azurecr.io/windows/ltsc2022/vse2022:latest

Copilot uses AI. Check for mistakes.
Comment on lines +7 to +36
This agent will implement and restructure the repository's existing ADO pipelines into Official and NonOfficial pipelines.

A repository will have under the ./pipelines directory a series of yaml files that define the ADO pipelines for the repository.

First confirm if the pipelines are using a toggle switch for Official and NonOfficial. This will look something like this

```yaml
parameters:
- name: templateFile
value: ${{ iif ( parameters.OfficialBuild, 'v2/OneBranch.Official.CrossPlat.yml@onebranchTemplates', 'v2/OneBranch.NonOfficial.CrossPlat.yml@onebranchTemplates' ) }}
```

Followed by:

```yaml
extends:
template: ${{ variables.templateFile }}
```

This is an indicator that this work needs to be done. This toggle switch is no longer allowed and the templates need to be hard coded.

## Refactoring Steps

### Step 1: Extract Shared Templates

For each pipeline file that uses the toggle switch pattern (e.g., `PowerShell-Packages.yml`):

1. Create a `./pipelines/templates` directory if it doesn't exist
2. Extract the **variables section** into `./pipelines/templates/PowerShell-Packages-Variables.yml`
3. Extract the **stages section** into `./pipelines/templates/PowerShell-Packages-Stages.yml`

Copilot AI Apr 2, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
@adityapatwardhan adityapatwardhan merged commit 30d30ab into PowerShell:release/v7.6.1 Apr 3, 2026
39 checks passed
@adityapatwardhan adityapatwardhan deleted the backport/release/v7.6.1/26897-f9be17e6b branch April 3, 2026 01:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.