Skip to content
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

Add SBOMs generation for Windows artifacts #100

Merged
merged 11 commits into from
Apr 10, 2024
Merged

Conversation

sethmlarson
Copy link
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 Add SBOMs generation for Windows artifacts Feb 23, 2024
@sethmlarson sethmlarson marked this pull request as ready for review February 23, 2024 22:02
Copy link
Member

@zooba zooba left a comment

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...)

windows-release/msi-steps.yml Outdated Show resolved Hide resolved
windows-release/msi-steps.yml Show resolved Hide resolved
windows-release/stage-layout-embed.yml Outdated Show resolved Hide resolved
@sethmlarson sethmlarson requested a review from zooba April 5, 2024 14:00
@zooba
Copy link
Member

zooba commented Apr 8, 2024

windows-release/msi-steps.yml Outdated Show resolved Hide resolved
windows-release/stage-layout-embed.yml Outdated Show resolved Hide resolved
@sethmlarson sethmlarson requested a review from zooba April 8, 2024 17:42
@sethmlarson
Copy link
Collaborator Author

sethmlarson commented Apr 8, 2024

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

windows-release/stage-layout-embed.yml Outdated Show resolved Hide resolved
windows-release/msi-steps.yml Outdated Show resolved Hide resolved
@zooba
Copy link
Member

zooba commented Apr 8, 2024

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
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
Copy link
Member

@zooba zooba left a comment

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
5 checks passed
@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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants