Skip to content

Commit 42ace91

Browse files
[main] Update dependencies from dotnet/arcade (#17906)
[main] Update dependencies from dotnet/arcade
1 parent 193078b commit 42ace91

File tree

8 files changed

+124
-14
lines changed

8 files changed

+124
-14
lines changed

eng/Version.Details.xml

+8-8
Original file line numberDiff line numberDiff line change
@@ -206,18 +206,18 @@
206206
</Dependency>
207207
</ProductDependencies>
208208
<ToolsetDependencies>
209-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.23580.7">
209+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.23601.1">
210210
<Uri>https://github.com/dotnet/arcade</Uri>
211-
<Sha>9cb7d80460fcd74ce5b31633d2deb32a93fd30de</Sha>
211+
<Sha>38aa367e014493c6f6ebfe94d9029bea01d072c4</Sha>
212212
<SourceBuild RepoName="arcade" ManagedOnly="true" />
213213
</Dependency>
214-
<Dependency Name="Microsoft.DotNet.CMake.Sdk" Version="9.0.0-beta.23580.7">
214+
<Dependency Name="Microsoft.DotNet.CMake.Sdk" Version="9.0.0-beta.23601.1">
215215
<Uri>https://github.com/dotnet/arcade</Uri>
216-
<Sha>9cb7d80460fcd74ce5b31633d2deb32a93fd30de</Sha>
216+
<Sha>38aa367e014493c6f6ebfe94d9029bea01d072c4</Sha>
217217
</Dependency>
218-
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="9.0.0-beta.23580.7">
218+
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="9.0.0-beta.23601.1">
219219
<Uri>https://github.com/dotnet/arcade</Uri>
220-
<Sha>9cb7d80460fcd74ce5b31633d2deb32a93fd30de</Sha>
220+
<Sha>38aa367e014493c6f6ebfe94d9029bea01d072c4</Sha>
221221
</Dependency>
222222
<Dependency Name="Microsoft.DotNet.Darc" Version="1.1.0-beta.23578.2">
223223
<Uri>https://github.com/dotnet/arcade-services</Uri>
@@ -227,9 +227,9 @@
227227
<Uri>https://github.com/dotnet/arcade-services</Uri>
228228
<Sha>5263b603d90991a0c200aca8b8892c3d7cfe4751</Sha>
229229
</Dependency>
230-
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="9.0.0-beta.23580.7">
230+
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="9.0.0-beta.23601.1">
231231
<Uri>https://github.com/dotnet/arcade</Uri>
232-
<Sha>9cb7d80460fcd74ce5b31633d2deb32a93fd30de</Sha>
232+
<Sha>38aa367e014493c6f6ebfe94d9029bea01d072c4</Sha>
233233
</Dependency>
234234
<Dependency Name="Microsoft.Extensions.Logging.Console" Version="8.0.0-alpha.1.22557.12">
235235
<Uri>https://github.com/dotnet/runtime</Uri>

eng/Versions.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
</PropertyGroup>
4141
<PropertyGroup>
4242
<!-- Dependency from https://github.com/dotnet/arcade -->
43-
<MicrosoftDotNetBuildTasksInstallersPackageVersion>9.0.0-beta.23580.7</MicrosoftDotNetBuildTasksInstallersPackageVersion>
43+
<MicrosoftDotNetBuildTasksInstallersPackageVersion>9.0.0-beta.23601.1</MicrosoftDotNetBuildTasksInstallersPackageVersion>
4444
</PropertyGroup>
4545
<PropertyGroup>
4646
<!-- Dependency from https://github.com/dotnet/arcade-services -->

eng/common/post-build/redact-logs.ps1

+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
[CmdletBinding(PositionalBinding=$False)]
2+
param(
3+
[Parameter(Mandatory=$true, Position=0)][string] $InputPath,
4+
[Parameter(Mandatory=$true)][string] $BinlogToolVersion,
5+
[Parameter(Mandatory=$false)][string] $DotnetPath,
6+
[Parameter(Mandatory=$false)][string] $PackageFeed = 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json',
7+
# File with strings to redact - separated by newlines.
8+
# For comments start the line with '# ' - such lines are ignored
9+
[Parameter(Mandatory=$false)][string] $TokensFilePath,
10+
[Parameter(ValueFromRemainingArguments=$true)][String[]]$TokensToRedact
11+
)
12+
13+
try {
14+
. $PSScriptRoot\post-build-utils.ps1
15+
16+
$packageName = 'binlogtool'
17+
18+
$dotnet = $DotnetPath
19+
20+
if (!$dotnet) {
21+
$dotnetRoot = InitializeDotNetCli -install:$true
22+
$dotnet = "$dotnetRoot\dotnet.exe"
23+
}
24+
25+
$toolList = & "$dotnet" tool list -g
26+
27+
if ($toolList -like "*$packageName*") {
28+
& "$dotnet" tool uninstall $packageName -g
29+
}
30+
31+
$toolPath = "$PSScriptRoot\..\..\..\.tools"
32+
$verbosity = 'minimal'
33+
34+
New-Item -ItemType Directory -Force -Path $toolPath
35+
36+
Push-Location -Path $toolPath
37+
38+
try {
39+
Write-Host "Installing Binlog redactor CLI..."
40+
Write-Host "'$dotnet' new tool-manifest"
41+
& "$dotnet" new tool-manifest
42+
Write-Host "'$dotnet' tool install $packageName --local --add-source '$PackageFeed' -v $verbosity --version $BinlogToolVersion"
43+
& "$dotnet" tool install $packageName --local --add-source "$PackageFeed" -v $verbosity --version $BinlogToolVersion
44+
45+
if (Test-Path $TokensFilePath) {
46+
Write-Host "Adding additional sensitive data for redaction from file: " $TokensFilePath
47+
$TokensToRedact += Get-Content -Path $TokensFilePath | Foreach {$_.Trim()} | Where { $_ -notmatch "^# " }
48+
}
49+
50+
$optionalParams = [System.Collections.ArrayList]::new()
51+
52+
Foreach ($p in $TokensToRedact)
53+
{
54+
if($p -match '^\$\(.*\)$')
55+
{
56+
Write-Host ("Ignoring token {0} as it is probably unexpanded AzDO variable" -f $p)
57+
}
58+
elseif($p)
59+
{
60+
$optionalParams.Add("-p:" + $p) | Out-Null
61+
}
62+
}
63+
64+
& $dotnet binlogtool redact --input:$InputPath --recurse --in-place `
65+
@optionalParams
66+
67+
if ($LastExitCode -ne 0) {
68+
Write-PipelineTelemetryError -Category 'Redactor' -Type 'warning' -Message "Problems using Redactor tool (exit code: $LastExitCode). But ignoring them now."
69+
}
70+
}
71+
finally {
72+
Pop-Location
73+
}
74+
75+
Write-Host 'done.'
76+
}
77+
catch {
78+
Write-Host $_
79+
Write-PipelineTelemetryError -Category 'Redactor' -Message "There was an error while trying to redact logs. Error: $_"
80+
ExitWithExitCode 1
81+
}

eng/common/templates/job/publish-build-assets.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ jobs:
4848
- group: AzureDevOps-Artifact-Feeds-Pats
4949
- name: runCodesignValidationInjection
5050
value: false
51-
- ${{ if eq(parameters.publishAssetsImmediately, 'true') }}:
52-
- template: /eng/common/templates/post-build/common-variables.yml
51+
# unconditional - needed for logs publishing (redactor tool version)
52+
- template: /eng/common/templates/post-build/common-variables.yml
5353

5454
pool:
5555
# We don't use the collection uri here because it might vary (.visualstudio.com vs. dev.azure.com)

eng/common/templates/post-build/common-variables.yml

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ variables:
1717
value: 3.0.0
1818
- name: SymbolToolVersion
1919
value: 1.0.1
20+
- name: BinlogToolVersion
21+
value: 1.0.8
2022

2123
- name: runCodesignValidationInjection
2224
value: false

eng/common/templates/post-build/post-build.yml

+1
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ stages:
187187
parameters:
188188
StageLabel: 'Validation'
189189
JobLabel: 'Signing'
190+
BinlogToolVersion: $(BinlogToolVersion)
190191

191192
- job:
192193
displayName: SourceLink Validation

eng/common/templates/steps/publish-logs.yml

+27-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
parameters:
22
StageLabel: ''
33
JobLabel: ''
4+
CustomSensitiveDataList: ''
5+
# A default - in case value from eng/common/templates/post-build/common-variables.yml is not passed
6+
BinlogToolVersion: '1.0.8'
47

58
steps:
69
- task: Powershell@2
@@ -12,7 +15,30 @@ steps:
1215
Move-Item -Path $(Build.SourcesDirectory)/artifacts/log/Debug/* $(Build.SourcesDirectory)/PostBuildLogs/${{parameters.StageLabel}}/${{parameters.JobLabel}}/
1316
continueOnError: true
1417
condition: always()
15-
18+
19+
- task: PowerShell@2
20+
displayName: Redact Logs
21+
inputs:
22+
filePath: $(Build.SourcesDirectory)/eng/common/post-build/redact-logs.ps1
23+
# For now this needs to have explicit list of all sensitive data. Taken from eng/publishing/v3/publish.yml
24+
# Sensitive data can as well be added to $(Build.SourcesDirectory)/eng/BinlogSecretsRedactionFile.txt'
25+
# If the file exists - sensitive data for redaction will be sourced from it
26+
# (single entry per line, lines starting with '# ' are considered comments and skipped)
27+
arguments: -InputPath '$(Build.SourcesDirectory)/PostBuildLogs'
28+
-BinlogToolVersion ${{parameters.BinlogToolVersion}}
29+
-TokensFilePath '$(Build.SourcesDirectory)/eng/BinlogSecretsRedactionFile.txt'
30+
'$(publishing-dnceng-devdiv-code-r-build-re)'
31+
'$(MaestroAccessToken)'
32+
'$(dn-bot-all-orgs-artifact-feeds-rw)'
33+
'$(akams-client-id)'
34+
'$(akams-client-secret)'
35+
'$(microsoft-symbol-server-pat)'
36+
'$(symweb-symbol-server-pat)'
37+
'$(dn-bot-all-orgs-build-rw-code-rw)'
38+
${{parameters.CustomSensitiveDataList}}
39+
continueOnError: true
40+
condition: always()
41+
1642
- task: PublishBuildArtifacts@1
1743
displayName: Publish Logs
1844
inputs:

global.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"cmake": "3.21.0"
1212
},
1313
"msbuild-sdks": {
14-
"Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.23580.7",
15-
"Microsoft.DotNet.CMake.Sdk": "9.0.0-beta.23580.7"
14+
"Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.23601.1",
15+
"Microsoft.DotNet.CMake.Sdk": "9.0.0-beta.23601.1"
1616
}
1717
}

0 commit comments

Comments
 (0)