Skip to content

Add SBOMs generation for Windows artifacts - #100

Merged
sethmlarson merged 11 commits into
masterfrom
windows-externals
Apr 10, 2024
Merged

Add SBOMs generation for Windows artifacts#100
sethmlarson merged 11 commits into
masterfrom
windows-externals

Conversation

@sethmlarson

Copy link
Copy Markdown
Collaborator

Moved the branch to this repo to allow testing before merging in Azure Pipelines. Requires python/cpython#115789 to be checked in to work.

@sethmlarson
sethmlarson requested a review from zooba February 23, 2024 16:45
@sethmlarson sethmlarson changed the title Add SBOMs generation for Windows artifacts #99 Feb 23, 2024
@sethmlarson
sethmlarson marked this pull request as ready for review February 23, 2024 22:02
Comment thread windows-release/stage-sbom.yml Outdated

@zooba zooba left a comment

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.

I'm confident enough we need the & in there that I'll wait for that change before running another build.

You're using gci fine, btw (it's short for Get-ChildItem which is also aliased as dir and ls, because who needs only one way to do things...)

Comment thread windows-release/msi-steps.yml Outdated
Comment thread windows-release/msi-steps.yml
Comment thread windows-release/stage-layout-embed.yml Outdated
@sethmlarson
sethmlarson requested a review from zooba April 5, 2024 14:00
@zooba

zooba commented Apr 8, 2024

Copy link
Copy Markdown
Member
Comment thread windows-release/msi-steps.yml Outdated
Comment thread windows-release/stage-layout-embed.yml Outdated
@sethmlarson
sethmlarson requested a review from zooba April 8, 2024 17:42
@sethmlarson

sethmlarson commented Apr 8, 2024

Copy link
Copy Markdown
Collaborator Author

@zooba Thanks for the run, the joys of developing CI workflow definitions continues :)

Comment thread windows-release/stage-layout-embed.yml Outdated
Comment thread windows-release/msi-steps.yml Outdated
@zooba

zooba commented Apr 8, 2024

Copy link
Copy Markdown
Member

Looking at the most recent failure, it seems you probably want $(Build.SourceBranchName) rather than $(Build.SourceBranch). (I really wish Git had a better way to just clone a single known commit, but apparently not...)

@sethmlarson

Copy link
Copy Markdown
Collaborator Author

The SBOM artifacts are getting uploaded into the sbom artifact name as expected: https://dev.azure.com/Python/cpython/_build/results?buildId=152774&view=artifacts&pathAsName=false&type=publishedArtifacts

I downloaded them all and gave them a look, they contain the components I expect and SBOM tooling accepts them. This PR can be ready to go as-is or we could also add the "upload" step in this PR too.

@sethmlarson
sethmlarson requested a review from zooba April 9, 2024 22:14

@zooba zooba left a comment

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.

I think we should just be able to add a *.spdx.json wildcard to $exe in uploadrelease.ps1 to pick up the SBOMs, right? Or maybe add a new parameter like $embed to specify the directory, to save copying them into the main directory.

TBH, I don't love the whole upload script, I just haven't looked at it in years (and it was written for a local build, which doesn't look like the automated one). Take a look and see whether you have a desperate desire to rewrite it, in which case we can do a new PR, or if you can easily hack it in then we can do it now.

@sethmlarson
sethmlarson merged commit e945180 into master Apr 10, 2024
@sethmlarson
sethmlarson deleted the windows-externals branch April 10, 2024 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants