Skip to content

Separate Official and NonOfficial templates for ADO pipelines#26897

Merged
jshigetomi merged 11 commits into
PowerShell:masterfrom
jshigetomi:fixTemplateIssue
Mar 24, 2026
Merged

Separate Official and NonOfficial templates for ADO pipelines#26897
jshigetomi merged 11 commits into
PowerShell:masterfrom
jshigetomi:fixTemplateIssue

Conversation

@jshigetomi
Copy link
Copy Markdown
Collaborator

@jshigetomi jshigetomi commented Feb 25, 2026

PR Summary

This pull request restructures the ADO pipeline configuration to split existing pipelines into distinct Official and NonOfficial versions, following new repository standards. It introduces new NonOfficial pipeline YAML files, extracts shared variables and stages into templates, and updates the Official pipeline to remove toggle-based logic. These changes improve maintainability, clarity, and compliance with updated Azure DevOps practices.

Pipeline Restructuring and Standardization

  • Added a detailed agent specification in .github/agents/SplitADOPipelines.agent.md describing the process for splitting pipelines, extracting shared templates, and ensuring correct artifact dependencies between Official and NonOfficial pipelines.
  • Created new NonOfficial pipeline YAML files under .pipelines/NonOfficial/ for PowerShell-Packages, PowerShell-Coordinated_Packages, PowerShell-Release, PowerShell-Release-Azure, and PowerShell-vPack, each hardcoding the NonOfficial template reference and referencing shared variable and stage templates. [1] [2] [3] [4] [5]

Official Pipeline Refactoring

  • Updated .pipelines/PowerShell-Coordinated_Packages-Official.yml to:
    • Remove the OfficialBuild parameter and toggle-based template logic.
    • Replace inline variables with a shared template reference and hardcode the Official template reference in the extends section.

Dependency and Artifact Management

  • Ensured that NonOfficial pipelines reference artifacts and dependencies from other NonOfficial pipelines, not Official ones, aligning with the new standards outlined in the agent specification. [1] [2] [3] [4]

These changes collectively modernize the pipeline structure, reduce duplication, and enforce a clear separation between Official and NonOfficial build processes.

PR Context

This PR was written in an effort to comply with 1ES Pipeline's Drift Management.

PR Checklist

@jshigetomi jshigetomi changed the title First refactor with agent Separate Official and NonOfficial templates for ADO pipelines Feb 27, 2026
@jshigetomi jshigetomi added the CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log label Feb 27, 2026
@TravisEz13 TravisEz13 added CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log and removed CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log labels Mar 2, 2026
@jshigetomi jshigetomi marked this pull request as ready for review March 2, 2026 18:43
@jshigetomi jshigetomi requested a review from a team as a code owner March 2, 2026 18:43
Copilot AI review requested due to automatic review settings March 2, 2026 18:43
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR restructures ADO pipeline configurations to comply with 1ES Pipeline Drift Management requirements by eliminating toggle-based OfficialBuild parameters that dynamically switched between Official and NonOfficial OneBranch templates. Instead, it creates dedicated NonOfficial pipeline YAML files, extracts shared variables and stages into reusable templates, and hard-codes the appropriate template reference in each pipeline file.

Changes:

  • Creates new NonOfficial pipeline YAML files under .pipelines/NonOfficial/ for all five pipeline types (Packages, Coordinated Packages, Release, Release-Azure, vPack).
  • Extracts shared pipeline variables and stages into dedicated template files under .pipelines/templates/variables/ and .pipelines/templates/stages/.
  • Refactors Official pipelines to remove the OfficialBuild toggle parameter and replace inline variables/stages sections with template references.

Reviewed changes

Copilot reviewed 22 out of 23 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
.pipelines/templates/variables/release-shared.yml New shared variable template for release jobs; fixes path from variable/ to variables/
.pipelines/templates/variables/PowerShell-*-Variables.yml New shared variable templates extracted from each Official pipeline
.pipelines/templates/stages/PowerShell-*-Stages.yml New shared stage templates extracted from each Official pipeline
.pipelines/templates/release-githubNuget.yml Path fix: ./variable/./variables/ for release-shared.yml reference
.pipelines/templates/release-MSIX-Publish.yml Path fix: ./variable/./variables/ for release-shared.yml reference
.pipelines/PowerShell-*-Official.yml Removes OfficialBuild param, replaces inline variables/stages with template references, hard-codes Official template
.pipelines/NonOfficial/PowerShell-*-NonOfficial.yml New NonOfficial pipeline files using shared templates with NonOfficial extends template
.github/agents/SplitADOPipelines.agent.md Agent specification documenting the pipeline split process

Comment thread .pipelines/NonOfficial/PowerShell-Release-Azure-NonOfficial.yml
Comment thread .pipelines/templates/stages/PowerShell-Release-Stages.yml Outdated
Comment thread .pipelines/templates/variables/PowerShell-vPack-Variables.yml Outdated
Comment thread .pipelines/NonOfficial/PowerShell-Release-NonOfficial.yml
jshigetomi and others added 5 commits March 2, 2026 13:29
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
tsaOptionsFile: .config\tsaoptions.json

stages:
- template: ../templates/stages/PowerShell-Release-Stages.yml
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

in general its better to use absolute paths with @self

@jshigetomi jshigetomi merged commit f9be17e into PowerShell:master Mar 24, 2026
36 checks passed
adityapatwardhan pushed a commit to adityapatwardhan/PowerShell that referenced this pull request Apr 1, 2026
…hell#26897)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
adityapatwardhan pushed a commit to adityapatwardhan/PowerShell that referenced this pull request Apr 2, 2026
…hell#26897)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
adityapatwardhan pushed a commit to adityapatwardhan/PowerShell that referenced this pull request Apr 2, 2026
…hell#26897)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@microsoft-github-policy-service microsoft-github-policy-service Bot removed the Review - Needed The PR is being reviewed label Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backport-7.4.x-Done Backport-7.5.x-Done Backport-7.6.x-Done 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.

5 participants