Skip to content

Conversation

@adityapatwardhan
Copy link
Member

Backport of #26415 to release/v7.6

Triggered by @adityapatwardhan on behalf of @TravisEz13

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)

This change is required for proper handling of rebuild branches in the release pipeline. It prevents LTS packages from being incorrectly built and published from rebuild branches, and adds conditional MSIX signing for official builds only. Without this backport, rebuild branches for v7.6 would not have the proper safety checks in place.

Customer Impact

  • Customer reported
  • Found internally

Regression

REQUIRED: Check exactly one box.

  • Yes
  • No

This is not a regression.

Testing

The original PR was tested on master branch with rebuild branch scenarios. For backport verification: (1) Confirmed all modified templates compile without syntax errors, (2) Verified cherry-pick applied all intended changes correctly, (3) Conflict resolution preserved the enhanced logging functionality from the original PR. Full CI testing will validate the rebuild branch detection logic and conditional MSIX signing behavior.

Risk

REQUIRED: Check exactly one box.

  • High
  • Medium
  • Low

This backport affects build and packaging pipelines across multiple platforms. While the changes are well-contained and add safety checks for rebuild branches, any modifications to CI/CD infrastructure carry inherent risk. The changes include conditional logic that could affect package generation, but the logic is defensive and designed to prevent incorrect package builds.

Merge Conflicts

Merge conflict in .pipelines/templates/package-create-msix.yml: Release branch had simplified variable setting, PR added verbose logging. Resolved by applying the enhanced version with verbose logging from the original PR.

…26415)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings December 5, 2025 00:07
@adityapatwardhan adityapatwardhan requested a review from a team as a code owner December 5, 2025 00:07
@adityapatwardhan adityapatwardhan added the CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log label Dec 5, 2025
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 backports #26415 to the release/v7.6 branch, adding rebuild branch support to prevent incorrect LTS package builds and implementing conditional MSIX signing for official builds only. Rebuild branches (e.g., rebuild/v7.4.13-rebuild.5) are special branches used for re-building specific versions and should not create LTS packages or use LTS channel configuration.

Key Changes:

  • Adds a new rebuild-branch-check.yml template that detects rebuild branches and sets an output variable for consumption by other templates
  • Modifies all platform packaging templates (Windows, macOS, Linux) to skip LTS package creation on rebuild branches
  • Updates channel selection logic to force rebuild branches into preview mode
  • Adds conditional MSIX signing that only signs when OfficialBuild parameter is true

Reviewed changes

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

Show a summary per file
File Description
.pipelines/templates/rebuild-branch-check.yml New template that checks if the current branch is a rebuild branch and exposes the result as an output variable
.pipelines/templates/packaging/windows/package.yml Integrates rebuild branch check to prevent LTS package builds on rebuild branches
.pipelines/templates/mac-package-build.yml Integrates rebuild branch check to prevent LTS package builds on rebuild branches
.pipelines/templates/linux-package-build.yml Integrates rebuild branch check to prevent LTS package builds on rebuild branches
.pipelines/templates/package-create-msix.yml Adds OfficialBuild parameter and conditional signing; includes whitespace cleanup
.pipelines/templates/channelSelection.yml Adds rebuild branch detection to force preview channel mode and prevent LTS channel selection
.pipelines/PowerShell-Packages-Official.yml Passes OfficialBuild parameter to MSIX package creation template
.pipelines/PowerShell-Coordinated_Packages-Official.yml Integrates rebuild branch check to prevent marking rebuild releases as LTS
.pipelines/EV2Specs/ServiceGroupRoot/Shell/Run/Run.ps1 Adds rebuild version detection to skip LTS package publishing for rebuild versions

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

@adityapatwardhan adityapatwardhan merged commit f19ac4c into PowerShell:release/v7.6 Dec 5, 2025
39 checks passed
@adityapatwardhan adityapatwardhan deleted the backport/release/v7.6/26415-8b7e493dd branch December 5, 2025 19:04
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.

3 participants