Skip to content

Commit

Permalink
Release SBOM (#4201)
Browse files Browse the repository at this point in the history
  • Loading branch information
daxian-dbw committed Oct 2, 2024
1 parent 3c6e8cb commit 920ca2c
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 25 deletions.
37 changes: 17 additions & 20 deletions .pipelines/PSReadLine-Official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,22 @@ pr: none
variables:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
POWERSHELL_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_NOLOGO: 1
WindowsContainerImage: onebranch.azurecr.io/windows/ltsc2022/vse2022:latest

resources:
repositories:
- repository: onebranchTemplates
type: git
name: OneBranch.Pipelines/GovernedTemplates
ref: refs/heads/main
- repository: templates
type: git
name: OneBranch.Pipelines/GovernedTemplates
ref: refs/heads/main

extends:
template: v2/OneBranch.Official.CrossPlat.yml@onebranchTemplates
template: v2/OneBranch.Official.CrossPlat.yml@templates
parameters:
featureFlags:
WindowsHostVersion: '1ESWindows2022'
WindowsHostVersion:
Version: 2022
globalSdl:
disableLegacyManifest: true
cg: # Component Governance parameters. Ignore test components.
Expand All @@ -43,7 +44,7 @@ extends:
enabled: true
asyncSdl: # https://aka.ms/obpipelines/asyncsdl
enabled: true
forStages: [Build]
forStages: [buildstage]
credscan:
enabled: true
scanFolder: $(Build.SourcesDirectory)\PSReadLine\PSReadLine
Expand Down Expand Up @@ -154,7 +155,7 @@ extends:
}
Write-Host "Display files in the folder ..." -ForegroundColor Yellow
Get-ChildItem -Path $(signSrcPath) -Recurse | Out-String -Width 120
Get-ChildItem -Path $(signSrcPath) -Recurse | Out-String -Width 120 -Stream
displayName: 'Verify the signed files'
- task: CopyFiles@2
Expand Down Expand Up @@ -212,7 +213,11 @@ extends:
artifact: drop_buildstage_buildjob

- pwsh: |
Get-ChildItem $(signOutPath) -Recurse
if (Test-Path '$(signOutPath)\_manifest') {
Write-Verbose -Verbose "Delete SBOM files ..."
Remove-Item -Path '$(signOutPath)\_manifest' -Recurse -Force
}
Get-ChildItem $(signOutPath) -Recurse | Out-String -Width 120 -Stream
New-Item -Path $(nugetPath) -ItemType Directory > $null
displayName: Capture artifacts structure
env:
Expand All @@ -226,7 +231,7 @@ extends:
} finally {
Unregister-PSRepository -Name $RepoName -ErrorAction SilentlyContinue
}
Get-ChildItem -Path $(nugetPath)
Get-ChildItem -Path $(nugetPath) | Out-String -Width 120 -Stream
displayName: 'Create the NuGet package'
env:
ob_restore_phase: true # This ensures this done in restore phase to workaround signing issue
Expand Down Expand Up @@ -290,17 +295,9 @@ extends:
artifact: drop_buildstage_nupkg

- pwsh: |
Get-ChildItem $(nugetPath) -Recurse
Get-ChildItem $(nugetPath) -Recurse | Out-String -Width 120 -Stream
displayName: Find signed Nupkg
- task: NuGetCommand@2
displayName: Push PSReadLine module to Azure feed
inputs:
command: push
packagesToPush: $(nugetPath)\PSReadLine.*.nupkg
nuGetFeedType: external
publishFeedCredentials: AzArtifactsFeed

- task: NuGetCommand@2
displayName: Push PSReadLine module to PSGallery feed
inputs:
Expand Down
2 changes: 1 addition & 1 deletion MockPSConsole/MockPSConsole.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<PackageReference Include="Microsoft.PowerShell.SDK" version="7.2.18" />
<PackageReference Include="Microsoft.PowerShell.SDK" version="7.2.23" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion PSReadLine/PSReadLine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<PackageReference Include="System.Management.Automation" Version="7.2.18" />
<PackageReference Include="System.Management.Automation" Version="7.2.23" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Polyfill/Polyfill.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<PackageReference Include="System.Management.Automation" Version="7.2.18" />
<PackageReference Include="System.Management.Automation" Version="7.2.23" />
</ItemGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'net462'">
Expand Down
2 changes: 1 addition & 1 deletion test/PSReadLine.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.2.18" />
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.2.23" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion tools/helper.psm1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

$MinimalSDKVersion = '6.0.100'
$MinimalSDKVersion = '6.0.425'
$IsWindowsEnv = [System.Environment]::OSVersion.Platform -eq "Win32NT"
$RepoRoot = (Resolve-Path "$PSScriptRoot/..").Path
$LocalDotnetDirPath = if ($IsWindowsEnv) { "$env:LocalAppData\Microsoft\dotnet" } else { "$env:HOME/.dotnet" }
Expand Down

0 comments on commit 920ca2c

Please sign in to comment.