You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit da377e2
Browse filesBrowse the repository at this point in the historyBrowse files
# Azure CLI can emit non-fatal Python warnings to stderr even when signing succeeds.
78
+
# Use the exit code to determine success for this invocation.
79
+
$PSNativeCommandUseErrorActionPreference=$false
80
+
$signatureBase64= az keyvault key sign `
81
+
--vault-name $KeyVaultName`
82
+
--name $KeyName`
83
+
--algorithm RS256 `
84
+
--digest $digestBase64`
85
+
--query signature `
86
+
--output tsv `
87
+
--only-show-errors
88
+
$signExitCode=$LASTEXITCODE
89
+
}
90
+
catch {
91
+
Write-PipelineTelemetryError-Category 'Build'-Message "Failed to sign the JWT via Key Vault (key '$KeyName', vault '$KeyVaultName'): $_. Verify the service connection identity has the 'Key Vault Crypto User' role (Sign action) on the key."
if ($signExitCode-ne0-or [string]::IsNullOrWhiteSpace($signatureBase64)) {
98
+
Write-PipelineTelemetryError-Category 'Build'-Message "'az keyvault key sign' exited with code $signExitCode for key '$KeyName' in vault '$KeyVaultName'. Verify the service connection identity has the 'Key Vault Crypto User' role (Sign action) on the key."
Write-PipelineTelemetryError-Category 'Build'-Message "Failed to list GitHub App installations: $_. The signed JWT may be invalid or the App's Client ID ('$AppClientId') may be incorrect."
Write-PipelineTelemetryError-Category 'Build'-Message "Failed to mint an installation access token for '$InstallationOwner' (installation $($installation.id)): $_"
144
+
exit1
145
+
}
146
+
147
+
Write-Host"Got installation token for '$InstallationOwner' (expires $($tokenResponse.expires_at))."
# Due to https://github.com/NuGet/Home/issues/10291, we must actually remove the disabled entries
Copy file name to clipboardExpand all lines: src/nuget-client/eng/common/build.ps1
+6-3Lines changed: 6 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,7 @@ Param(
8
8
[bool] $warnAsError=$true,
9
9
[string] $warnNotAsError='',
10
10
[bool] $nodeReuse=$true,
11
+
[bool][Alias('mt')]$msbuildMultiThreaded=$false,
11
12
[switch] $buildCheck=$false,
12
13
[switch][Alias('r')]$restore,
13
14
[switch] $deployDeps,
@@ -23,6 +24,7 @@ Param(
23
24
[switch] $clean,
24
25
[switch][Alias('pb')]$productBuild,
25
26
[switch]$fromVMR,
27
+
[switch]$disablePipelineSetResult,
26
28
[switch][Alias('bl')]$binaryLog,
27
29
[string][Alias('bln')]$binaryLogName='',
28
30
[switch][Alias('nobl')]$excludeCIBinarylog,
@@ -78,8 +80,10 @@ function Print-Usage() {
78
80
Write-Host" -excludePrereleaseVS Set to exclude build engines in prerelease versions of Visual Studio"
79
81
Write-Host" -nativeToolsOnMachine Sets the native tools on machine environment variable (indicating that the script should use native tools on machine)"
80
82
Write-Host" -nodeReuse <value> Sets nodereuse msbuild parameter ('true' or 'false')"
83
+
Write-Host" -msbuildMultiThreaded <value> Sets MSBuild's multi-threaded mode, i.e. the -mt switch ('1' or '0') (short: -mt)"
Write-Host" -fromVMR Set when building from within the VMR"
86
+
Write-Host" -disablePipelineSetResult Set to disable masking the actual exit code in the pipeline when the build fails"
83
87
Write-Host""
84
88
85
89
Write-Host"Command line arguments not listed above are passed thru to msbuild."
@@ -173,9 +177,8 @@ try {
173
177
if (-not$excludeCIBinarylog) {
174
178
$binaryLog=$true
175
179
}
176
-
# Disable node reuse on CI unless explicitly opted in via MSBUILD_NODEREUSE_ENABLED.
177
-
# Internal testing only; this env var will be replaced with a switch (https://github.com/dotnet/arcade/issues/17013) and must not be depended on.
178
-
if ($env:MSBUILD_NODEREUSE_ENABLED-ne"1") {
180
+
# Node reuse isn't used on CI unless it was explicitly requested via -nodeReuse.
181
+
if (-not$PSBoundParameters.ContainsKey('nodeReuse')) {
0 commit comments