[release/v7.6] Fix template path for rebuild branch check in package.yml by adityapatwardhan · Pull Request #26560 · PowerShell/PowerShell

Backport of #26425 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)

Fixes Windows packaging pipeline failures on release/v7.6 by correcting template path reference. Without this fix, the packaging pipeline fails with 'template not found' errors, preventing successful Windows package builds for the v7.6 release.

Customer Impact

  • Customer reported
  • Found internally

Regression

REQUIRED: Check exactly one box.

  • Yes
  • No

This is not a regression.

Testing

Original PR fixed pipeline failures on main branch. Backport verified by:

  1. Conflict resolution preserves the fix intent (absolute template path)
  2. Template reference format matches other references in v7.6 file
  3. No syntax errors in resolved pipeline template

The fix resolves the pipeline error 'File /.pipelines/templates/packaging/windows/rebuild-branch-check.yml not found' by using the correct absolute path.

Risk

REQUIRED: Check exactly one box.

  • High
  • Medium
  • Low

High risk due to changes in build pipeline, but necessary to maintain build health on release branch. Not taking this change creates technical debt and makes future pipeline updates difficult to backport. The change has been validated in master for 3 weeks without issues.

Merge Conflicts

The file .pipelines/templates/windows-package-build.yml had conflicts during cherry-pick:

Conflict: The v7.6 release branch was missing the rebuild-branch-check.yml template reference that exists in main.

Resolution: Added the template reference with the correct absolute path /.pipelines/templates/rebuild-branch-check.yml@self and the required ob_restore_phase: false parameter. Adapted the change to fit the v7.6 file structure (different file name than main branch).