Skip to content

Commit 3430828

Browse files
author
Steve Lee (POWERSHELL HE/HIM) (from Dev Box)
committed
Fix using CFS in release build, store sign msixbundle, remove scheduled build
1 parent 06f2b94 commit 3430828

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

.pipelines/DSC-Official.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,6 @@ pr:
77
- onebranch
88
- release/v*
99

10-
schedules:
11-
- cron: '0 3 * * 1'
12-
displayName: Weekly Build
13-
branches:
14-
include:
15-
- main
16-
always: true
17-
1810
variables:
1911
BuildConfiguration: 'release'
2012
PackageRoot: '$(System.ArtifactsDirectory)/Packages'
@@ -149,6 +141,14 @@ extends:
149141
Copy-Item ./bin/*.msixbundle "$(ob_outputDirectory)"
150142
displayName: 'Create msixbundle'
151143
condition: succeeded()
144+
- task: onebranch.pipeline.signing@1
145+
displayName: Sign MsixBundle
146+
condition: succeeded()
147+
inputs:
148+
command: 'sign'
149+
signing_profile: $(MSIXProfile)
150+
files_to_sign: '*.msixbundle'
151+
search_root: '$(ob_outputDirectory)'
152152

153153
- job: BuildLinuxMusl
154154
dependsOn: SetPackageVersion

build.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,9 @@ if (!$SkipBuild) {
237237
Write-Host "Using CFS for cargo source replacement"
238238
${env:CARGO_SOURCE_crates-io_REPLACE_WITH} = $null
239239
$env:CARGO_REGISTRIES_CRATESIO_INDEX = $null
240+
$env:CARGO_REGISTRIES_POWERSHELL_INDEX = "sparse+https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/powershell~force-auth/Cargo/index/"
240241

241-
if ($UseCFSAuth -or $null -ne $env:TF_BUILD) {
242+
if ($UseCFSAuth) {
242243
if ($null -eq (Get-Command 'az' -ErrorAction Ignore)) {
243244
throw "Azure CLI not found"
244245
}
@@ -250,13 +251,12 @@ if (!$SkipBuild) {
250251
Write-Warning "Failed to get access token, use 'az login' first, or use '-useCratesIO' to use crates.io. Proceeding with anonymous access."
251252
} else {
252253
$header = "Bearer $accessToken"
253-
$env:CARGO_REGISTRIES_POWERSHELL_INDEX = "sparse+https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/powershell~force-auth/Cargo/index/"
254254
$env:CARGO_REGISTRIES_POWERSHELL_TOKEN = $header
255255
$env:CARGO_REGISTRIES_POWERSHELL_CREDENTIAL_PROVIDER = 'cargo:token'
256256
}
257257
}
258258
else {
259-
Write-Warning "Azure CLI not found, proceeding with anonymous access."
259+
Write-Warning "Azure CLI not found or running in ADO, proceeding with anonymous access."
260260
}
261261
}
262262
}

0 commit comments

Comments
 (0)