Skip to content

Fixing official pipeline #4394

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions eng/ci/templates/official/jobs/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,6 @@ jobs:
Install-Dotnet
displayName: 'Install .NET 6.0 and 3.1'

- pwsh: |
Import-Module "./eng/scripts/modules/pipelineUtilities.psm1" -Force
Install-SBOMUtil -SBOMUtilSASUrl $env:SBOMUtilSASUrl
env:
SBOMUtilSASUrl: $(SBOMUtilSASUrl)
condition: eq(variables['IsReleaseBuild'], 'true')
displayName: 'Install SBOM ManifestTool'

- task: NuGetToolInstaller@1
inputs:
versionSpec:
Expand Down
42 changes: 0 additions & 42 deletions eng/scripts/modules/pipelineUtilities.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -7,48 +7,6 @@

using namespace System.Runtime.InteropServices

$DLL_NAME = "Microsoft.ManifestTool.dll"
$MANIFESTOOLNAME = "ManifestTool"
$MANIFESTOOL_DIRECTORY = Join-Path $PSScriptRoot $MANIFESTOOLNAME
$MANIFEST_TOOL_PATH = "$MANIFESTOOL_DIRECTORY/$DLL_NAME"

function Get-ManifestToolPath
{
if (Test-Path $MANIFEST_TOOL_PATH)
{
return $MANIFEST_TOOL_PATH
}
throw "The SBOM Manifest Tool is not installed. Please run Install-SBOMUtil -SBOMUtilSASUrl <SASUrl>"
}

function Install-SBOMUtil
{
param(
[string]
$SBOMUtilSASUrl
)

if ([string]::IsNullOrEmpty($SBOMUtilSASUrl))
{
throw "The `$SBOMUtilSASUrl parameter cannot be null or empty when specifying `$(addSBOM)"
}

Write-Host "Installing $MANIFESTOOLNAME..."
Remove-Item -Recurse -Force $MANIFESTOOL_DIRECTORY -ErrorAction Ignore

Invoke-RestMethod -Uri $SBOMUtilSASUrl -OutFile "$MANIFESTOOL_DIRECTORY.zip"
Expand-Archive "$MANIFESTOOL_DIRECTORY.zip" -DestinationPath $MANIFESTOOL_DIRECTORY

if (-not (Test-Path $MANIFEST_TOOL_PATH))
{
throw "$MANIFESTOOL_DIRECTORY does not contain '$DLL_NAME'"
}

Write-Host 'Done.'

return $MANIFEST_TOOL_PATH
}

$DotnetSDKVersionRequirements = @{

# .NET SDK 3.1 is required by the Microsoft.ManifestTool.dll tool
Expand Down