Skip to content

Commit 69576d6

Browse files
committed
Update OneBranch pipeline and dependencies
1 parent 472b500 commit 69576d6

File tree

4 files changed

+21
-17
lines changed

4 files changed

+21
-17
lines changed

.pipelines/ConsoleGuiTools-Official.yml

+10-5
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ parameters:
2727
variables:
2828
system.debug: ${{ parameters.debug }}
2929
BuildConfiguration: Release
30-
WindowsContainerImage: onebranch.azurecr.io/windows/ltsc2019/vse2022:latest
30+
WindowsContainerImage: onebranch.azurecr.io/windows/ltsc2022/vse2022:latest
3131
DOTNET_NOLOGO: true
3232
DOTNET_GENERATE_ASPNET_CERTIFICATE: false
3333

@@ -46,6 +46,11 @@ extends:
4646
asyncSdl:
4747
enabled: true
4848
forStages: [build]
49+
featureFlags:
50+
EnableCDPxPAT: false
51+
WindowsHostVersion:
52+
Version: 2022
53+
Network: Netlock
4954
stages:
5055
- stage: build
5156
jobs:
@@ -71,11 +76,11 @@ extends:
7176
inputs:
7277
packageType: sdk
7378
useGlobalJson: true
74-
- task: PowerShell@2
79+
- pwsh: |
80+
Register-PSRepository -Name CFS -SourceLocation "https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/powershell/nuget/v2" -InstallationPolicy Trusted
81+
Install-Module -Repository CFS -Name Microsoft.PowerShell.PSResourceGet
82+
./tools/installPSResources.ps1 -PSRepository CFS
7583
displayName: Install PSResources
76-
inputs:
77-
pwsh: true
78-
filePath: tools/installPSResources.ps1
7984
- pwsh: Invoke-Build -Configuration $(BuildConfiguration)
8085
displayName: Build
8186
- task: onebranch.pipeline.signing@1

global.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
3-
"version": "6.0.420",
3+
"version": "6.0.425",
44
"rollForward": "latestFeature",
55
"allowPrerelease": false
66
}

src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
<ItemGroup>
1818
<PackageReference Include="Nstack.Core" Version="1.1.1" />
19-
<PackageReference Include="Terminal.Gui" Version="1.16.0" />
20-
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.2.19" />
19+
<PackageReference Include="Terminal.Gui" Version="1.17.1" />
20+
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.2.23" />
2121
</ItemGroup>
2222

2323
<ItemGroup>

tools/installPSResources.ps1

+8-9
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
# Copyright (c) Microsoft Corporation.
22
# Licensed under the MIT License.
3+
param(
4+
[ValidateSet("PSGallery", "CFS")]
5+
[string]$PSRepository = "PSGallery"
6+
)
37

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

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

0 commit comments

Comments
 (0)