Skip to content
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

Update OneBranch pipeline and dependencies #253

Merged
merged 1 commit into from
Sep 5, 2024
Merged
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
15 changes: 10 additions & 5 deletions .pipelines/ConsoleGuiTools-Official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ parameters:
variables:
system.debug: ${{ parameters.debug }}
BuildConfiguration: Release
WindowsContainerImage: onebranch.azurecr.io/windows/ltsc2019/vse2022:latest
WindowsContainerImage: onebranch.azurecr.io/windows/ltsc2022/vse2022:latest
DOTNET_NOLOGO: true
DOTNET_GENERATE_ASPNET_CERTIFICATE: false

Expand All @@ -46,6 +46,11 @@ extends:
asyncSdl:
enabled: true
forStages: [build]
featureFlags:
EnableCDPxPAT: false
WindowsHostVersion:
Version: 2022
Network: Netlock
stages:
- stage: build
jobs:
Expand All @@ -71,11 +76,11 @@ extends:
inputs:
packageType: sdk
useGlobalJson: true
- task: PowerShell@2
- pwsh: |
Register-PSRepository -Name CFS -SourceLocation "https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/powershell/nuget/v2" -InstallationPolicy Trusted
Install-Module -Repository CFS -Name Microsoft.PowerShell.PSResourceGet
./tools/installPSResources.ps1 -PSRepository CFS
displayName: Install PSResources
inputs:
pwsh: true
filePath: tools/installPSResources.ps1
- pwsh: Invoke-Build -Configuration $(BuildConfiguration)
displayName: Build
- task: onebranch.pipeline.signing@1
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "6.0.420",
"version": "6.0.425",
"rollForward": "latestFeature",
"allowPrerelease": false
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

<ItemGroup>
<PackageReference Include="Nstack.Core" Version="1.1.1" />
<PackageReference Include="Terminal.Gui" Version="1.16.0" />
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.2.19" />
<PackageReference Include="Terminal.Gui" Version="1.17.1" />
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.2.23" />
</ItemGroup>

<ItemGroup>
Expand Down
17 changes: 8 additions & 9 deletions tools/installPSResources.ps1
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
param(
[ValidateSet("PSGallery", "CFS")]
[string]$PSRepository = "PSGallery"
)

$ErrorActionPreference = 'Stop'

Set-PSRepository -Name PSGallery -InstallationPolicy Trusted | Out-Null
if ($PSVersionTable.PSVersion.Major -lt 6) {
throw "The build script requires PowerShell 7!"
if ($PSRepository -eq "CFS" -and -not (Get-PSResourceRepository -Name CFS -ErrorAction SilentlyContinue)) {
Register-PSResourceRepository -Name CFS -Uri "https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/powershell/nuget/v3/index.json"
}

# TODO: Switch to Install-PSResource when CI uses PowerShell 7.4
Install-Module -Name InvokeBuild -Scope CurrentUser
Install-Module -Name platyPS -Scope CurrentUser
Install-Module -Name Microsoft.PowerShell.PSResourceGet -Scope CurrentUser
Install-PSResource -Repository $PSRepository -TrustRepository -Name InvokeBuild
Install-PSResource -Repository $PSRepository -TrustRepository -Name platyPS