Add SBOMs generation for Windows artifacts by sethmlarson · Pull Request #99 · python/release-tools · GitHub
Skip to content

Add SBOMs generation for Windows artifacts - #99

Closed
sethmlarson wants to merge 1 commit into
python:masterfrom
sethmlarson:windows-externals
Closed

Add SBOMs generation for Windows artifacts#99
sethmlarson wants to merge 1 commit into
python:masterfrom
sethmlarson:windows-externals

Conversation

@sethmlarson

Copy link
Copy Markdown
Collaborator

Requires python/cpython#115789 to be checked in to work.

  • Does checkout.yml essentially pull CPython's source code into the release-tools directory?
  • Do the Windows artifacts have pip included? I couldn't find it in ensurepip for the embed artifacts
  • Is it possible to run Azure Pipelines off of a branch besides master so I can test this code before enabling it for future releases?

cc @zooba

@sethmlarson sethmlarson changed the title Start of Windows artifact SBOMs Add SBOMs generation for Windows artifacts Feb 22, 2024
@zooba

zooba commented Feb 22, 2024

Copy link
Copy Markdown
Member

- powershell: >
python
"$(Build.SourcesDirectory)\sbom.py"
(gci msi\*\python-*.exe | select -First 1)

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.

Any reason we wouldn't/shouldn't just do all of them? (Omitting the select -First 1 should pass them all as separate args, and then sys.argv[1:] in Python can get them all.)

Comment on lines +41 to +45
- task: PublishPipelineArtifact@0
displayName: 'Publish artifact: sbom'
inputs:
targetPath: '$(Build.BinariesDirectory)\sbom'
artifactName: 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.

Suggested change
- task: PublishPipelineArtifact@0
displayName: 'Publish artifact: sbom'
inputs:
targetPath: '$(Build.BinariesDirectory)\sbom'
artifactName: sbom
- publish: '$(Build.BinariesDirectory)\sbom'
artifact: sbom
displayName: 'Publish artifact: sbom'

This is the preferred format for simple cases now (should auto-update when they need to make changes to the publish task).

dependsOn: ['Test_MSI', 'Test']
dependsOn: ['SBOM', 'Test_MSI', 'Test']
jobs:
- template: stage-publish-pythonorg.yml

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 assume we're going to get chances to this template as well to SSH the files up to the server?

@sethmlarson sethmlarson Feb 23, 2024

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yeah that's the plan, I might do that in a follow-up PR though. Maybe I'll remove this dependsOn for now.

@sethmlarson

Copy link
Copy Markdown
Collaborator Author

@sethmlarson
sethmlarson deleted the windows-externals branch February 23, 2024 16:46
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