mirror of
https://github.com/VSadov/Satori.git
synced 2025-06-09 09:34:49 +09:00
![dotnet-maestro[bot]](/assets/img/avatar_default.png)
Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.TargetFramework , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.GenAPI , Microsoft.DotNet.GenFacades , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.SharedFramework.Sdk , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.XliffTasks , Microsoft.DotNet.XUnitAssert , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.XUnitExtensions From Version 9.0.0-beta.25111.5 -> To Version 9.0.0-beta.25164.2 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: Carlos Sánchez López <1175054+carlossanlop@users.noreply.github.com>
29 lines
1.1 KiB
PowerShell
29 lines
1.1 KiB
PowerShell
Param(
|
|
[Parameter(Mandatory=$true)][string] $ManifestDirPath # Manifest directory where sbom will be placed
|
|
)
|
|
|
|
. $PSScriptRoot\pipeline-logging-functions.ps1
|
|
|
|
# Normally - we'd listen to the manifest path given, but 1ES templates will overwrite if this level gets uploaded directly
|
|
# with their own overwriting ours. So we create it as a sub directory of the requested manifest path.
|
|
$ArtifactName = "${env:SYSTEM_STAGENAME}_${env:AGENT_JOBNAME}_SBOM"
|
|
$SafeArtifactName = $ArtifactName -replace '["/:<>\\|?@*"() ]', '_'
|
|
$SbomGenerationDir = Join-Path $ManifestDirPath $SafeArtifactName
|
|
|
|
Write-Host "Artifact name before : $ArtifactName"
|
|
Write-Host "Artifact name after : $SafeArtifactName"
|
|
|
|
Write-Host "Creating dir $ManifestDirPath"
|
|
|
|
# create directory for sbom manifest to be placed
|
|
if (!(Test-Path -path $SbomGenerationDir))
|
|
{
|
|
New-Item -ItemType Directory -path $SbomGenerationDir
|
|
Write-Host "Successfully created directory $SbomGenerationDir"
|
|
}
|
|
else{
|
|
Write-PipelineTelemetryError -category 'Build' "Unable to create sbom folder."
|
|
}
|
|
|
|
Write-Host "Updating artifact name"
|
|
Write-Host "##vso[task.setvariable variable=ARTIFACT_NAME]$SafeArtifactName"
|