Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 27, 2025

Plan: Make linux_packaging independent of ci_build

Problem:

  • linux_packaging job depends on ci_build
  • When only packaging files change (packagingChanged=true but source=false), ci_build is skipped
  • This causes linux_packaging to also be skipped due to the dependency

Solution:

  • Update .github/workflows/linux-ci.yml to remove ci_build dependency from linux_packaging
  • Update .github/actions/test/linux-packaging/action.yml to do its own build instead of downloading artifacts
  • Follow the pattern used by windows-packaging-reusable.yml which does its own build
  • Ensure linux_packaging only depends on changes job
  • Update path-filters to include Linux packaging paths for consistency
  • Fix YAML linting issues (trailing spaces)
  • Code review passed with no issues
  • Security scan passed with no issues
  • Address reviewer feedback: combine build and packaging into single step
  • Add instructions documenting the build/packaging pattern
  • Fix missing packaging dependencies (fpm) by adding Start-PSBootstrap
  • Remove redundant Sync-PSTags calls (already done by Invoke-CIInstall)
  • Remove -PSModuleRestore parameter (now enabled by default)

Changes Made:

  1. Removed ci_build from linux_packaging job dependencies in linux-ci.yml
  2. Updated linux-packaging action to:
    • Remove artifact download and extraction steps (43 lines removed)
    • Add combined build and package step using Start-PSBuild + Invoke-CIFinish
    • Run build and packaging in same step to maintain PSOptions in memory
    • Add Start-PSBootstrap -Scenario Package to install packaging dependencies (fpm, rpmbuild, etc.)
    • Remove redundant Sync-PSTags calls (already handled by Invoke-CIInstall)
    • Remove -PSModuleRestore parameter (now default behavior)
    • Simplified from 111 lines to 59 lines
  3. The action now follows the same pattern as Windows packaging: bootstrap, then build+package
  4. Updated path-filters to include:
    • .github/workflows/linux-ci.yml (was only including windows-ci.yml)
    • test/packaging/linux/ (was only including windows tests)
  5. Fixed trailing spaces in path-filters YAML file
  6. Added comprehensive instruction file documenting the build/packaging pattern with correct default behavior

Result:
The linux_packaging job will now run whenever packagingChanged=true, regardless of whether source=true or ci_build runs. This matches the behavior of the Windows packaging workflow.

Original prompt

On linux-ci.yml, linux_packaging is getting skipped when only packagingChanged is true. Update the linux-packaging action to do it's own build and make linux_packaging not depend on ci_build, to resolve this issue.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI self-assigned this Oct 27, 2025
Copilot AI changed the title [WIP] Update linux-packaging action to resolve skipping issue Fix linux_packaging skip when only packaging files change Oct 27, 2025
Copilot AI requested a review from TravisEz13 October 27, 2025 21:19
Copilot AI requested a review from TravisEz13 October 27, 2025 21:33
@TravisEz13 TravisEz13 added the CL-Test Indicates that a PR should be marked as a test change in the Change Log label Oct 27, 2025
@TravisEz13
Copy link
Member

@copilot
We are getting this error on ubuntu-latest

Packaging RID: 'linux-x64'; Packaging Configuration: 'Release'
WARNING: Skipping release checks.
VERBOSE: Source: /home/runner/work/PowerShell/PowerShell/src/powershell-unix/bin/Release/net10.0/linux-x64/publish
VERBOSE: Created psoptions file: /home/runner/work/PowerShell/PowerShell/src/powershell-unix/bin/Release/net10.0/linux-x64/publish/psoptions.json
VERBOSE: Created manifest.spdx.json file: /home/runner/work/PowerShell/PowerShell/src/powershell-unix/bin/Release/net10.0/linux-x64/publish/_manifest/spdx_2.2/manifest.spdx.json
VERBOSE: Created manifest.spdx.json.sha256 file: /home/runner/work/PowerShell/PowerShell/src/powershell-unix/bin/Release/net10.0/linux-x64/publish/_manifest/spdx_2.2/manifest.spdx.json.sha256
Packaging Source: '/home/runner/work/PowerShell/PowerShell/src/powershell-unix/bin/Release/net10.0/linux-x64/publish'
Packaging Type: deb rpm rpm-fxdependent-arm64 tar
WARNING: Package dependency 'fpm' not found. Run Start-PSBootstrap -Scenario Package
Get-ChildItem: Cannot find path '/usr/lib64/ruby/gems' because it does not exist.
Error: Process completed with exit code 1.

Copy link
Contributor Author

Copilot AI commented Oct 27, 2025

@copilot
We are getting this error on ubuntu-latest

...

Fixed in commit d41793e. Added Start-PSBootstrap -Scenario Package to the Bootstrap step to install packaging dependencies like fpm, rpmbuild, etc. This was present in the original action but was missing in my refactored version.

@TravisEz13 TravisEz13 marked this pull request as ready for review October 27, 2025 22:52
@TravisEz13 TravisEz13 requested review from a team and jshigetomi as code owners October 27, 2025 22:52
Copilot AI review requested due to automatic review settings October 27, 2025 22:52
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 fixes the issue where the linux_packaging job was being skipped when only packaging-related files changed. The solution removes the dependency on ci_build and makes the Linux packaging action perform its own build, following the same pattern as Windows packaging.

Key changes:

  • Removed ci_build dependency from linux_packaging job
  • Updated Linux packaging action to build and package in a single step
  • Enhanced path filters to include Linux-specific packaging paths

Reviewed Changes

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

File Description
.github/workflows/linux-ci.yml Removed ci_build from linux_packaging dependencies to allow it to run independently
.github/actions/test/linux-packaging/action.yml Replaced artifact download/extraction logic with combined build and package step
.github/instructions/build-and-packaging-steps.instructions.md Added comprehensive documentation of the build/packaging pattern
.github/actions/infrastructure/path-filters/action.yml Extended packaging change detection to include Linux CI workflow and test paths

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

@TravisEz13 TravisEz13 changed the title Fix linux_packaging skip when only packaging files change Fix linux_packaging job being skipped when only packaging files change Oct 27, 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

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


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

@TravisEz13 TravisEz13 merged commit d13cdad into master Oct 28, 2025
47 of 71 checks passed
@microsoft-github-policy-service
Copy link
Contributor

microsoft-github-policy-service bot commented Oct 28, 2025

📣 Hey @@Copilot, how did we do? We would love to hear your feedback with the link below! 🗣️

🔗 https://aka.ms/PSRepoFeedback

@TravisEz13 TravisEz13 deleted the copilot/update-linux-packaging-action branch October 28, 2025 17:45
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

CL-Test Indicates that a PR should be marked as a test change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants