Welcome to mirror list, hosted at ThFree Co, Russian Federation.

generate-sbom-prep.ps1 « common « eng - github.com/mono/linker.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3e5c1c74a1c50d58c230788207131634aea9c3cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Param(
    [Parameter(Mandatory=$true)][string] $ManifestDirPath    # Manifest directory where sbom will be placed
)

. $PSScriptRoot\pipeline-logging-functions.ps1

Write-Host "Creating dir $ManifestDirPath"
# create directory for sbom manifest to be placed
if (!(Test-Path -path $ManifestDirPath))
{
  New-Item -ItemType Directory -path $ManifestDirPath
  Write-Host "Successfully created directory $ManifestDirPath"
}
else{
  Write-PipelineTelemetryError -category 'Build'  "Unable to create sbom folder."
}

Write-Host "Updating artifact name"
$artifact_name = "${env:SYSTEM_STAGENAME}_${env:AGENT_JOBNAME}_SBOM" -replace '["/:<>\\|?@*"() ]', '_'
Write-Host "Artifact name $artifact_name"
Write-Host "##vso[task.setvariable variable=ARTIFACT_NAME]$artifact_name"