Skip to content

ci: publish SBoM once#4416

Open
QxBytes wants to merge 1 commit into
masterfrom
alew/sbom-testing
Open

ci: publish SBoM once#4416
QxBytes wants to merge 1 commit into
masterfrom
alew/sbom-testing

Conversation

@QxBytes
Copy link
Copy Markdown
Contributor

@QxBytes QxBytes commented May 21, 2026

Reason for Change:

See below

Issue Fixed:

Previously we published the SBoM for each manifest, which kept overwriting the _manifest directory under output/ in published artifacts. Then, when the release pipeline consumed the artifacts, the _manifest directory would only contain the contents of the last publish leading to hash mismatches. This PR aims to only publish the _manifest directory w/ the SBoM (software bill of materials) once after all artifacts are available.

Requirements:

Notes:
Tested using the microsoft sbom validation tool to verify the _manifest folder validates the output/ folder in 20260520.3 and 20260519.8

The only surefire way to validate this that I know of is to run the real official release pipeline. The release pipeline only downloads the output artifact/folder so the _manifest should account for everything in that folder.

@QxBytes QxBytes self-assigned this May 21, 2026
@QxBytes QxBytes added the ci Infra or tooling. label May 21, 2026
@QxBytes QxBytes marked this pull request as ready for review May 21, 2026 17:04
@QxBytes QxBytes requested a review from a team as a code owner May 21, 2026 17:04
@QxBytes QxBytes requested review from agrawaliti and Copilot May 21, 2026 17:04
Copy link
Copy Markdown
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 changes the Azure DevOps pipeline to generate and publish the signed SBOM exactly once, after all build outputs (binaries and per-image archives) have been produced, to avoid _manifest being overwritten across multiple publishes and causing downstream hash mismatches.

Changes:

  • Renames the binaries artifact from output to unsigned-binaries so it can be treated as an intermediate input.
  • Updates multi-arch manifest publishing to emit per-image intermediate artifacts (unsigned-images-<name>) instead of publishing output repeatedly.
  • Adds a new sbom_publish stage that aggregates intermediate artifacts, generates a signed SBOM, and publishes the final output artifact once.

Reviewed changes

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

File Description
.pipelines/pipeline.yaml Introduces the consolidated sbom_publish stage and switches binaries publishing to an intermediate artifact name.
.pipelines/containers/manifest-template.yaml Removes per-manifest SBOM generation and publishes per-image intermediate artifacts for later aggregation.

Comment thread .pipelines/pipeline.yaml
Comment thread .pipelines/pipeline.yaml
Comment on lines +385 to +394
# Run as long as no producer failed and at least one succeeded.
condition: |
and(
not(failed()),
or(
eq(dependencies.binaries.result, 'Succeeded'),
eq(dependencies.publish.result, 'Succeeded'),
eq(dependencies.publish_npm.result, 'Succeeded')
)
)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

if other stages like unit tests fail, this shouldn't run anyway

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Infra or tooling.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants