2022-02-11 16:15:13 +00:00
|
|
|
# BuildDropPath - The root folder of the drop directory for which the manifest file will be generated.
|
|
|
|
# PackageName - The name of the package this SBOM represents.
|
|
|
|
# PackageVersion - The version of the package this SBOM represents.
|
|
|
|
# ManifestDirPath - The path of the directory where the generated manifest files will be placed
|
|
|
|
|
|
|
|
parameters:
|
|
|
|
PackageVersion: 7.0.0
|
|
|
|
BuildDropPath: '$(Build.SourcesDirectory)/artifacts'
|
|
|
|
PackageName: '.NET'
|
|
|
|
ManifestDirPath: $(Build.ArtifactStagingDirectory)/sbom
|
|
|
|
sbomContinueOnError: true
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- task: PowerShell@2
|
|
|
|
displayName: Prep for SBOM generation in (Non-linux)
|
|
|
|
condition: or(eq(variables['Agent.Os'], 'Windows_NT'), eq(variables['Agent.Os'], 'Darwin'))
|
|
|
|
inputs:
|
|
|
|
filePath: ./eng/common/generate-sbom-prep.ps1
|
|
|
|
arguments: ${{parameters.manifestDirPath}}
|
|
|
|
|
2022-02-12 13:21:24 +00:00
|
|
|
# Chmodding is a workaround for https://github.com/dotnet/arcade/issues/8461
|
2022-02-11 16:15:13 +00:00
|
|
|
- script: |
|
2022-02-12 13:21:24 +00:00
|
|
|
chmod +x ./eng/common/generate-sbom-prep.sh
|
2022-02-11 16:15:13 +00:00
|
|
|
./eng/common/generate-sbom-prep.sh ${{parameters.manifestDirPath}}
|
|
|
|
displayName: Prep for SBOM generation in (Linux)
|
|
|
|
condition: eq(variables['Agent.Os'], 'Linux')
|
|
|
|
continueOnError: ${{ parameters.sbomContinueOnError }}
|
|
|
|
|
|
|
|
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
|
|
|
|
displayName: 'Generate SBOM manifest'
|
|
|
|
continueOnError: ${{ parameters.sbomContinueOnError }}
|
|
|
|
inputs:
|
|
|
|
PackageName: ${{ parameters.packageName }}
|
|
|
|
BuildDropPath: ${{ parameters.buildDropPath }}
|
|
|
|
PackageVersion: ${{ parameters.packageVersion }}
|
|
|
|
ManifestDirPath: ${{ parameters.manifestDirPath }}
|
|
|
|
|
|
|
|
- task: PublishPipelineArtifact@1
|
|
|
|
displayName: Publish SBOM manifest
|
|
|
|
continueOnError: ${{parameters.sbomContinueOnError}}
|
|
|
|
inputs:
|
|
|
|
targetPath: '${{parameters.manifestDirPath}}'
|
|
|
|
artifactName: $(ARTIFACT_NAME)
|
|
|
|
|