Skip to content

Fix SBoM generation#15578

Merged
hoyosjs merged 1 commit intodotnet:mainfrom
hoyosjs:juhoyosa/change-sbom
Feb 26, 2025
Merged

Fix SBoM generation#15578
hoyosjs merged 1 commit intodotnet:mainfrom
hoyosjs:juhoyosa/change-sbom

Conversation

@hoyosjs
Copy link
Copy Markdown
Member

@hoyosjs hoyosjs commented Feb 25, 2025

1ES templates generates SBoM's for all artifacts uploaded - only issue is it does it in the root of the artifact that's uploaded inside the _manifest folder. If there's a manifest in the uploaded artifact, it will clobber the SBOM with an SBOM for the SBOM. The quick and dirty solution for now: generate the SBoM in a subdirectory of the upload root.

@hoyosjs
Copy link
Copy Markdown
Member Author

hoyosjs commented Feb 25, 2025

/backport to release/9.0

@github-actions
Copy link
Copy Markdown
Contributor

Started backporting to release/9.0: https://github.com/dotnet/arcade/actions/runs/13529811107

@hoyosjs
Copy link
Copy Markdown
Member Author

hoyosjs commented Feb 25, 2025

/backport to release/8.0

@github-actions
Copy link
Copy Markdown
Contributor

Started backporting to release/8.0: https://github.com/dotnet/arcade/actions/runs/13529813530

@github-actions
Copy link
Copy Markdown
Contributor

@hoyosjs backporting to "release/8.0" failed, the patch most likely resulted in conflicts:

$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch

Applying: Fixup sbom
Using index info to reconstruct a base tree...
A	eng/common/core-templates/steps/generate-sbom.yml
M	eng/common/templates-official/job/job.yml
Falling back to patching base and 3-way merge...
Auto-merging eng/common/templates-official/steps/generate-sbom.yml
Auto-merging eng/common/templates-official/job/job.yml
CONFLICT (content): Merge conflict in eng/common/templates-official/job/job.yml
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 Fixup sbom
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

@hoyosjs
Copy link
Copy Markdown
Member Author

hoyosjs commented Feb 25, 2025

Couple leg test https://dev.azure.com/dnceng/internal/_build/results?buildId=2650044&view=results

@hoyosjs hoyosjs mentioned this pull request Feb 25, 2025
2 tasks
parameters:
PackageVersion: ${{ parameters.packageVersion }}
BuildDropPath: ${{ parameters.buildDropPath }}
ManifestDirPath: $(Build.ArtifactStagingDirectory)/sbom
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This already appears to be the default value. What's the reason behind this?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Just for readability. Line 66 assumes that this is the path that it gets published here, so I enforce that it exists at this level.

@hoyosjs hoyosjs merged commit 6d4b01b into dotnet:main Feb 26, 2025
11 checks passed
@hoyosjs hoyosjs deleted the juhoyosa/change-sbom branch March 3, 2025 17:51
YuliiaKovalova pushed a commit that referenced this pull request Mar 20, 2025
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