Skip to content

Conversation

@TravisEz13
Copy link
Member

@TravisEz13 TravisEz13 commented Nov 10, 2025

This pull request introduces improved handling for "rebuild" branches across the build and packaging pipelines. The main goal is to ensure that rebuild branches are not treated as LTS (Long Term Support) releases, and that LTS packages are not built or published from these branches. The changes also add better diagnostics and parameterization for official builds.

Key changes include:

Rebuild Branch Detection and Propagation:

  • Added a new template, rebuild-branch-check.yml, which detects if the current branch is a rebuild branch and sets an output variable (IsRebuildBranch) for use in other templates and scripts.
  • Integrated the rebuild branch check into major build and packaging templates (linux-package-build.yml, mac-package-build.yml, packaging/windows/package.yml, and PowerShell-Coordinated_Packages-Official.yml), ensuring consistent detection across platforms. [1] [2] [3] [4]

LTS Handling Adjustments:

  • Modified scripts and templates to prevent LTS packages from being built or published when on a rebuild branch. This includes logic updates in PowerShell scripts and YAML templates to check the IsRebuildBranch variable before marking a build as LTS or adding LTS packages. [1] [2] [3] [4] [5] [6]

Channel and Preview Logic Improvements:

  • Updated the channel selection logic to force preview mode for rebuild branches, ensuring that such builds are never treated as stable or LTS releases.

Pipeline Parameterization and Diagnostics:

  • Enhanced the package-create-msix.yml template to accept an OfficialBuild parameter and only sign MSIX bundles for official builds. Added more verbose logging and a debug step to check variable values during the pipeline. [1] [2] [3] [4]

These changes collectively ensure that rebuild branches are handled safely and consistently, preventing accidental LTS releases and improving traceability in the build process.

Enables rebuild branches to skip LTS packaging and conditionally sign MSIX packages.
Copilot AI review requested due to automatic review settings November 10, 2025 21:39
@TravisEz13 TravisEz13 requested a review from a team as a code owner November 10, 2025 21:39
Copy link
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 adds support for rebuild branches in the PowerShell CI/CD pipeline. Rebuild branches (e.g., rebuild/v7.4.13-rebuild.5) are used for rebuilding existing releases with packaging or infrastructure fixes. The changes enable these branches to skip LTS package creation and conditionally sign MSIX packages based on whether it's an official build.

Key changes:

  • New template rebuild-branch-check.yml detects rebuild branches and sets a reusable variable
  • All platform packaging templates (Windows, macOS, Linux) skip LTS package building for rebuild branches
  • MSIX signing becomes conditional based on the OfficialBuild parameter
  • Channel selection forces rebuild branches to use the Preview channel
  • Deployment script excludes LTS packages for rebuild versions

Reviewed Changes

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

Show a summary per file
File Description
.pipelines/templates/rebuild-branch-check.yml New template that detects rebuild branches using regex pattern and sets output variable
.pipelines/templates/packaging/windows/package.yml Windows packaging - adds rebuild check and skips LTS packages for rebuild branches
.pipelines/templates/mac-package-build.yml macOS packaging - adds rebuild check and skips LTS packages for rebuild branches
.pipelines/templates/linux-package-build.yml Linux packaging - adds rebuild check and skips LTS packages for rebuild branches
.pipelines/templates/package-create-msix.yml MSIX creation - adds OfficialBuild parameter for conditional signing and formatting cleanup
.pipelines/templates/channelSelection.yml Channel selection - forces rebuild branches to Preview channel
.pipelines/PowerShell-Packages-Official.yml Official pipeline - passes OfficialBuild parameter to MSIX template
.pipelines/PowerShell-Coordinated_Packages-Official.yml Coordinated pipeline - adds rebuild check for release.json creation
.pipelines/EV2Specs/ServiceGroupRoot/Shell/Run/Run.ps1 Deployment script - excludes LTS packages for rebuild versions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@TravisEz13 TravisEz13 added CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log BackPort-7.4.x-Consider BackPort-7.5.x-Consider BackPort-7.6.x-Consider labels Nov 10, 2025
@TravisEz13 TravisEz13 merged commit 8b7e493 into PowerShell:master Nov 10, 2025
38 of 39 checks passed
@TravisEz13 TravisEz13 deleted the add-rebuild-branch-support branch November 10, 2025 22:03
TravisEz13 added a commit to TravisEz13/PowerShell that referenced this pull request Nov 11, 2025
adityapatwardhan pushed a commit to adityapatwardhan/PowerShell that referenced this pull request Dec 2, 2025
adityapatwardhan pushed a commit to adityapatwardhan/PowerShell that referenced this pull request Dec 5, 2025
SIRMARGIN pushed a commit to SIRMARGIN/PowerShell that referenced this pull request Dec 12, 2025
kilasuit pushed a commit to kilasuit/PowerShell that referenced this pull request Jan 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backport-7.4.x-Migrated BackPort-7.5.x-Consider Backport-7.6.x-Migrated 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.

3 participants