Skip to content

[release/v7.5] Add rebuild branch support with conditional MSIX signing#26817

Merged
daxian-dbw merged 1 commit intoPowerShell:release/v7.5from
daxian-dbw:backport/release/v7.5/26415-8b7e493dd
Feb 13, 2026
Merged

[release/v7.5] Add rebuild branch support with conditional MSIX signing#26817
daxian-dbw merged 1 commit intoPowerShell:release/v7.5from
daxian-dbw:backport/release/v7.5/26415-8b7e493dd

Conversation

@daxian-dbw
Copy link
Member

Backport of #26415 to release/v7.5

Triggered by @daxian-dbw 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)

Adds rebuild branch detection and conditional MSIX signing for official builds only

Customer Impact

  • Customer reported
  • Found internally

Regression

REQUIRED: Check exactly one box.

  • Yes
  • No

This is not a regression.

Testing

Successfully tested in 7.4 and 7.6 releases. Rebuild branch detection prevents incorrect LTS package creation.

Risk

REQUIRED: Check exactly one box.

  • High
  • Medium
  • Low

Adds rebuild branch detection to prevent LTS packages from being built on rebuild branches. Adds conditional MSIX signing. Successfully backported to 7.4 and 7.6 branches.

Merge Conflicts

Conflict in package-create-msix.yml resolved - context differences in MSIX signing configuration

…26415)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@daxian-dbw daxian-dbw requested a review from a team as a code owner February 13, 2026 23:12
@daxian-dbw daxian-dbw added the CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log label Feb 13, 2026
Copilot AI review requested due to automatic review settings February 13, 2026 23:12
@daxian-dbw daxian-dbw merged commit 914288e into PowerShell:release/v7.5 Feb 13, 2026
19 checks passed
@daxian-dbw daxian-dbw deleted the backport/release/v7.5/26415-8b7e493dd branch February 13, 2026 23:16
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

Backports rebuild-branch awareness into the release/v7.5 packaging/release pipelines to prevent rebuild branches from being treated as LTS, and adds an OfficialBuild switch intended to gate MSIX signing to official builds only.

Changes:

  • Adds a reusable rebuild-branch-check.yml step template and wires it into Linux/macOS/Windows packaging templates to skip LTS package creation on rebuild branches.
  • Updates channelSelection.yml to force Preview channel behavior on rebuild branches.
  • Adds an OfficialBuild parameter to package-create-msix.yml and passes it from the official packaging pipeline to conditionally run MSIX signing.

Reviewed changes

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

Show a summary per file
File Description
.pipelines/templates/rebuild-branch-check.yml New step template to detect rebuild branches and expose IsRebuildBranch as an output variable.
.pipelines/templates/packaging/windows/package.yml Consumes rebuild-branch detection to avoid building LTS packages on rebuild branches.
.pipelines/templates/linux-package-build.yml Consumes rebuild-branch detection to avoid building LTS packages on rebuild branches.
.pipelines/templates/mac-package-build.yml Consumes rebuild-branch detection to avoid building LTS packages on rebuild branches.
.pipelines/templates/channelSelection.yml Forces rebuild branches to be treated as Preview (not Stable/LTS).
.pipelines/templates/package-create-msix.yml Introduces OfficialBuild parameter and attempts to conditionally sign MSIX bundles.
.pipelines/PowerShell-Packages-Official.yml Passes OfficialBuild into the MSIX bundle template.
.pipelines/PowerShell-Coordinated_Packages-Official.yml Uses rebuild-branch detection to avoid marking rebuild builds as LTS in release.json.
.pipelines/EV2Specs/ServiceGroupRoot/Shell/Run/Run.ps1 Avoids adding powershell-lts package when the version indicates a rebuild.


- task: onebranch.pipeline.signing@1
displayName: Sign MsixBundle
condition: eq('${{ parameters.OfficialBuild }}', 'true')
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

This condition is comparing strings, but OfficialBuild is a boolean template parameter. With the current quoting, the expression expansion can produce unexpected values/casing and the signing step may be skipped even for official builds. Use a boolean comparison like eq(${{ parameters.OfficialBuild }}, true) (or just ${{ parameters.OfficialBuild }} combined with succeeded()).

Suggested change
condition: eq('${{ parameters.OfficialBuild }}', 'true')
condition: eq(${{ parameters.OfficialBuild }}, true)

Copilot uses AI. Check for mistakes.
Comment on lines 101 to 104
- task: onebranch.pipeline.signing@1
displayName: Sign MsixBundle
condition: eq('${{ parameters.OfficialBuild }}', 'true')
inputs:
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

Since signing is now conditional, when OfficialBuild is false this job becomes build-only but will still run with OneBranch signing infrastructure defaults (and uses restore-phase semantics earlier in the job). Consider explicitly setting ob_signing_setup_enabled/ob_sdl_codeSignValidation_enabled based on OfficialBuild (and only using restore phase when signing is enabled) to avoid unnecessary overhead in non-official runs.

Copilot uses AI. Check for mistakes.
nativePathRoot: '$(Agent.TempDirectory)'
ob_restore_phase: false

- template: rebuild-branch-check.yml@self
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

The template include path looks incorrect here. Because this file is under .pipelines/templates/packaging/windows/, rebuild-branch-check.yml@self will be resolved relative to that folder and the template won’t be found. Use the repo-rooted path (e.g. /.pipelines/templates/rebuild-branch-check.yml@self) to match the other template includes in this file.

Suggested change
- template: rebuild-branch-check.yml@self
- template: /.pipelines/templates/rebuild-branch-check.yml@self

Copilot uses AI. Check for mistakes.
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