Skip to content

Commit 7d933e6

Browse files
Update dependencies from https://github.com/dotnet/arcade build 20221108.2 (#311)
[dotnet/release/6.0] Update dependencies from dotnet/arcade
1 parent 7196234 commit 7d933e6

File tree

5 files changed

+88
-30
lines changed

5 files changed

+88
-30
lines changed

eng/Version.Details.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
<ProductDependencies>
44
</ProductDependencies>
55
<ToolsetDependencies>
6-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.22512.3">
6+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.22558.2">
77
<Uri>https://github.com/dotnet/arcade</Uri>
8-
<Sha>bb1e72113a7eaf8bebda940beba8cf8bee1b453f</Sha>
8+
<Sha>841e1fe0d2498a7ac6445e458ae521511ec226ca</Sha>
99
</Dependency>
10-
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="6.0.0-beta.22512.3">
10+
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="6.0.0-beta.22558.2">
1111
<Uri>https://github.com/dotnet/arcade</Uri>
12-
<Sha>bb1e72113a7eaf8bebda940beba8cf8bee1b453f</Sha>
12+
<Sha>841e1fe0d2498a7ac6445e458ae521511ec226ca</Sha>
1313
</Dependency>
14-
<Dependency Name="Microsoft.DotNet.Build.Tasks.Packaging" Version="6.0.0-beta.22512.3">
14+
<Dependency Name="Microsoft.DotNet.Build.Tasks.Packaging" Version="6.0.0-beta.22558.2">
1515
<Uri>https://github.com/dotnet/arcade</Uri>
16-
<Sha>bb1e72113a7eaf8bebda940beba8cf8bee1b453f</Sha>
16+
<Sha>841e1fe0d2498a7ac6445e458ae521511ec226ca</Sha>
1717
</Dependency>
1818
</ToolsetDependencies>
1919
</Dependencies>

eng/Versions.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
<PreReleaseVersionIteration>1</PreReleaseVersionIteration>
77
</PropertyGroup>
88
<PropertyGroup>
9-
<MicrosoftDotNetBuildTasksPackagingVersion>6.0.0-beta.22512.3</MicrosoftDotNetBuildTasksPackagingVersion>
9+
<MicrosoftDotNetBuildTasksPackagingVersion>6.0.0-beta.22558.2</MicrosoftDotNetBuildTasksPackagingVersion>
1010
</PropertyGroup>
1111
</Project>

eng/common/sdl/sdl.ps1

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
2+
function Install-Gdn {
3+
param(
4+
[Parameter(Mandatory=$true)]
5+
[string]$Path,
6+
7+
# If omitted, install the latest version of Guardian, otherwise install that specific version.
8+
[string]$Version
9+
)
10+
11+
$ErrorActionPreference = 'Stop'
12+
Set-StrictMode -Version 2.0
13+
$disableConfigureToolsetImport = $true
14+
$global:LASTEXITCODE = 0
15+
16+
# `tools.ps1` checks $ci to perform some actions. Since the SDL
17+
# scripts don't necessarily execute in the same agent that run the
18+
# build.ps1/sh script this variable isn't automatically set.
19+
$ci = $true
20+
. $PSScriptRoot\..\tools.ps1
21+
22+
$argumentList = @("install", "Microsoft.Guardian.Cli", "-Source https://securitytools.pkgs.visualstudio.com/_packaging/Guardian/nuget/v3/index.json", "-OutputDirectory $Path", "-NonInteractive", "-NoCache")
23+
24+
if ($Version) {
25+
$argumentList += "-Version $Version"
26+
}
27+
28+
Start-Process nuget -Verbose -ArgumentList $argumentList -NoNewWindow -Wait
29+
30+
$gdnCliPath = Get-ChildItem -Filter guardian.cmd -Recurse -Path $Path
31+
32+
if (!$gdnCliPath)
33+
{
34+
Write-PipelineTelemetryError -Category 'Sdl' -Message 'Failure installing Guardian'
35+
}
36+
37+
return $gdnCliPath.FullName
38+
}

eng/common/templates/steps/execute-sdl.yml

Lines changed: 40 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,28 @@ parameters:
88
condition: ''
99

1010
steps:
11-
- ${{ if ne(parameters.overrideGuardianVersion, '') }}:
12-
- powershell: |
13-
$content = Get-Content $(GuardianPackagesConfigFile)
14-
15-
Write-Host "packages.config content was:`n$content"
16-
17-
$content = $content.Replace('$(DefaultGuardianVersion)', '$(GuardianVersion)')
18-
$content | Set-Content $(GuardianPackagesConfigFile)
19-
20-
Write-Host "packages.config content updated to:`n$content"
21-
displayName: Use overridden Guardian version ${{ parameters.overrideGuardianVersion }}
11+
- task: NuGetAuthenticate@1
12+
inputs:
13+
nuGetServiceConnections: GuardianConnect
2214

2315
- task: NuGetToolInstaller@1
2416
displayName: 'Install NuGet.exe'
2517

26-
- task: NuGetCommand@2
27-
displayName: 'Install Guardian'
28-
inputs:
29-
restoreSolution: $(Build.SourcesDirectory)\eng\common\sdl\packages.config
30-
feedsToUse: config
31-
nugetConfigPath: $(Build.SourcesDirectory)\eng\common\sdl\NuGet.config
32-
externalFeedCredentials: GuardianConnect
33-
restoreDirectory: $(Build.SourcesDirectory)\.packages
18+
- ${{ if ne(parameters.overrideGuardianVersion, '') }}:
19+
- pwsh: |
20+
Set-Location -Path $(Build.SourcesDirectory)\eng\common\sdl
21+
. .\sdl.ps1
22+
$guardianCliLocation = Install-Gdn -Path $(Build.SourcesDirectory)\.artifacts -Version ${{ parameters.overrideGuardianVersion }}
23+
Write-Host "##vso[task.setvariable variable=GuardianCliLocation]$guardianCliLocation"
24+
displayName: Install Guardian (Overridden)
25+
26+
- ${{ if eq(parameters.overrideGuardianVersion, '') }}:
27+
- pwsh: |
28+
Set-Location -Path $(Build.SourcesDirectory)\eng\common\sdl
29+
. .\sdl.ps1
30+
$guardianCliLocation = Install-Gdn -Path $(Build.SourcesDirectory)\.artifacts
31+
Write-Host "##vso[task.setvariable variable=GuardianCliLocation]$guardianCliLocation"
32+
displayName: Install Guardian
3433
3534
- ${{ if ne(parameters.overrideParameters, '') }}:
3635
- powershell: ${{ parameters.executeAllSdlToolsScript }} ${{ parameters.overrideParameters }}
@@ -40,7 +39,7 @@ steps:
4039

4140
- ${{ if eq(parameters.overrideParameters, '') }}:
4241
- powershell: ${{ parameters.executeAllSdlToolsScript }}
43-
-GuardianPackageName Microsoft.Guardian.Cli.$(GuardianVersion)
42+
-GuardianCliLocation $(GuardianCliLocation)
4443
-NugetPackageDirectory $(Build.SourcesDirectory)\.packages
4544
-AzureDevOpsAccessToken $(dn-bot-dotnet-build-rw-code-rw)
4645
${{ parameters.additionalParameters }}
@@ -62,7 +61,28 @@ steps:
6261
c
6362
i
6463
condition: succeededOrFailed()
64+
6565
- publish: $(Agent.BuildDirectory)/.gdn
6666
artifact: GuardianConfiguration
6767
displayName: Publish GuardianConfiguration
68+
condition: succeededOrFailed()
69+
70+
# Publish the SARIF files in a container named CodeAnalysisLogs to enable integration
71+
# with the "SARIF SAST Scans Tab" Azure DevOps extension
72+
- task: CopyFiles@2
73+
displayName: Copy SARIF files
74+
inputs:
75+
flattenFolders: true
76+
sourceFolder: $(Agent.BuildDirectory)/.gdn/rc/
77+
contents: '**/*.sarif'
78+
targetFolder: $(Build.SourcesDirectory)/CodeAnalysisLogs
79+
condition: succeededOrFailed()
80+
81+
# Use PublishBuildArtifacts because the SARIF extension only checks this case
82+
# see microsoft/sarif-azuredevops-extension#4
83+
- task: PublishBuildArtifacts@1
84+
displayName: Publish SARIF files to CodeAnalysisLogs container
85+
inputs:
86+
pathToPublish: $(Build.SourcesDirectory)/CodeAnalysisLogs
87+
artifactName: CodeAnalysisLogs
6888
condition: succeededOrFailed()

global.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"tools": {
3-
"dotnet": "6.0.110"
3+
"dotnet": "6.0.111"
44
},
55
"msbuild-sdks": {
6-
"Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.22512.3",
7-
"Microsoft.DotNet.Helix.Sdk": "6.0.0-beta.22512.3",
6+
"Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.22558.2",
7+
"Microsoft.DotNet.Helix.Sdk": "6.0.0-beta.22558.2",
88
"Microsoft.Build.Traversal": "2.0.2"
99
}
1010
}

0 commit comments

Comments
 (0)