Skip to content

Commit

Permalink
Fix VSInsertion artifact collection
Browse files Browse the repository at this point in the history
  • Loading branch information
AArnott committed Apr 12, 2022
1 parent 6f47238 commit 00eb19d
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions azure-pipelines/artifacts/VSInsertion.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,11 @@ if (!$BuildConfiguration) {
$BuildConfiguration = 'Debug'
}

$NuGetPackages = "$RepoRoot\bin\Packages\$config\NuGet"
$CoreXTPackages = "$RepoRoot\bin\Packages\$config\CoreXT"
# This artifact is not ready if we're running on the devdiv AzDO account and we don't have an SBOM yet.
if ($env:SYSTEM_COLLECTIONID -eq '011b8bdf-6d56-4f87-be0d-0092136884d9' -and -not (Test-Path $NuGetPackages/_manifest) -and -not $SbomNotRequired) {
Write-Host "Skipping because SBOM isn't generated yet."
return @{}
}
$NuGetPackages = "$RepoRoot\bin\Packages\$BuildConfiguration\NuGet"
$CoreXTPackages = "$RepoRoot\bin\Packages\$BuildConfiguration\CoreXT"

if (!(Test-Path $NuGetPackages)) {
Write-Warning "Skipping because packages haven't been built yet."
Write-Warning "Skipping because NuGet packages haven't been built yet."
return @{}
}

Expand All @@ -57,6 +52,12 @@ if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}

# This artifact is not ready if we're running on the devdiv AzDO account and we don't have an SBOM yet.
if ($env:SYSTEM_COLLECTIONID -eq '011b8bdf-6d56-4f87-be0d-0092136884d9' -and -not (Test-Path $NuGetPackages/_manifest) -and -not $SbomNotRequired) {
Write-Host "Skipping because SBOM isn't generated yet."
return @{}
}

@{
"$NuGetPackages" = (Get-ChildItem $NuGetPackages -Recurse)
"$CoreXTPackages" = (Get-ChildItem "$CoreXTPackages\Microsoft.VisualStudio.Threading.VSInsertionMetadata.$InsertionMetadataVersion.nupkg");
Expand Down

0 comments on commit 00eb19d

Please sign in to comment.