Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[CI] Publish: Fix SBOM error #395

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 30, 2025

Conversation

edvilme
Copy link
Member

@edvilme edvilme commented Apr 30, 2025

Currently there is an error before publishing to AzDO feeds related to SBOM generation.

Packages were imported from the previous stage without SBOM information.

@edvilme edvilme changed the title [CI[ Publish: Fix SBOM error [CI] Publish: Fix SBOM error Apr 30, 2025
@edvilme edvilme marked this pull request as ready for review April 30, 2025 22:34
@edvilme edvilme requested review from a team and Copilot April 30, 2025 22:34
Copy link

@Copilot 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 SBOM generation error by updating the artifact paths used between pipeline stages before publishing to AzDO feeds.

  • Updated package paths in the publish YAML to reference the correct directories.
  • Revised artifact names and target paths in the official pipeline file to align with the new structure.

Reviewed Changes

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

File Description
eng/pipelines/templates/steps/workload-publish.yml Updated package paths to point to the new release artifact directory.
eng/pipelines/official.yml Changed artifact name and target path to match the new release structure for SBOM generation.

@@ -7,8 +7,8 @@ steps:
displayName: 🟣 Publish package to AzDO
inputs:
useDotNetTask: true
Copy link
Preview

Copilot AI Apr 30, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider adding an inline comment explaining the rationale behind the new package path to aid future maintainers in understanding this change.

Suggested change
useDotNetTask: true
useDotNetTask: true
# The path below points to the Release/Shipping directory where the build process outputs NuGet packages.
# This ensures only finalized, shippable packages are published.

Copilot uses AI. Check for mistakes.

Comment on lines 134 to +136
inputs:
artifactName: PackageArtifacts
targetPath: $(Pipeline.Workspace)/PackageArtifacts
artifactName: Artifacts_Windows_NT_Release
targetPath: $(Pipeline.Workspace)/Artifacts_Windows_NT_Release
Copy link
Preview

Copilot AI Apr 30, 2025

Choose a reason for hiding this comment

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

[nitpick] Ensure that the updated artifact name is consistently applied across all related pipeline tasks; adding a comment here might help clarify the new naming convention.

Copilot uses AI. Check for mistakes.

@edvilme edvilme merged commit 22705a5 into dotnet:main Apr 30, 2025
2 checks passed
Comment on lines +135 to +136
artifactName: Artifacts_Windows_NT_Release
targetPath: $(Pipeline.Workspace)/Artifacts_Windows_NT_Release
Copy link
Member

Choose a reason for hiding this comment

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

Why was the artifact name changed? And this name seems arbitrary (meaning, it has no relationship to the build being created). We don't build any binaries so naming it this is misleading.

Comment on lines +10 to +11
packagesToPush: $(Pipeline.Workspace)/Artifacts_Windows_NT_Release/packages/Release/Shipping/*.nupkg
packageParentPath: $(Pipeline.Workspace)/Artifacts_Windows_NT_Release/
Copy link
Member

Choose a reason for hiding this comment

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

So, what was wrong with:

Suggested change
packagesToPush: $(Pipeline.Workspace)/Artifacts_Windows_NT_Release/packages/Release/Shipping/*.nupkg
packageParentPath: $(Pipeline.Workspace)/Artifacts_Windows_NT_Release/
packagesToPush: $(Pipeline.Workspace)/PackageArtifacts/packages/Release/Shipping/*.nupkg
packageParentPath: $(Pipeline.Workspace)/PackageArtifacts/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants