diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 394b058cb4b22e..d0d017b9fe7f11 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -54,77 +54,77 @@ - + https://github.com/dotnet/arcade - afc901d73d7d3bd363547ddf8769efe14052bfa7 + 0c027eede69ba22bafca9a1955f1e00848655ece - + https://github.com/dotnet/arcade - afc901d73d7d3bd363547ddf8769efe14052bfa7 + 0c027eede69ba22bafca9a1955f1e00848655ece - + https://github.com/dotnet/arcade - afc901d73d7d3bd363547ddf8769efe14052bfa7 + 0c027eede69ba22bafca9a1955f1e00848655ece - + https://github.com/dotnet/arcade - afc901d73d7d3bd363547ddf8769efe14052bfa7 + 0c027eede69ba22bafca9a1955f1e00848655ece - + https://github.com/dotnet/arcade - afc901d73d7d3bd363547ddf8769efe14052bfa7 + 0c027eede69ba22bafca9a1955f1e00848655ece - + https://github.com/dotnet/arcade - afc901d73d7d3bd363547ddf8769efe14052bfa7 + 0c027eede69ba22bafca9a1955f1e00848655ece - + https://github.com/dotnet/arcade - afc901d73d7d3bd363547ddf8769efe14052bfa7 + 0c027eede69ba22bafca9a1955f1e00848655ece - + https://github.com/dotnet/arcade - afc901d73d7d3bd363547ddf8769efe14052bfa7 + 0c027eede69ba22bafca9a1955f1e00848655ece - + https://github.com/dotnet/arcade - afc901d73d7d3bd363547ddf8769efe14052bfa7 + 0c027eede69ba22bafca9a1955f1e00848655ece - + https://github.com/dotnet/arcade - afc901d73d7d3bd363547ddf8769efe14052bfa7 + 0c027eede69ba22bafca9a1955f1e00848655ece - + https://github.com/dotnet/arcade - afc901d73d7d3bd363547ddf8769efe14052bfa7 + 0c027eede69ba22bafca9a1955f1e00848655ece - + https://github.com/dotnet/arcade - afc901d73d7d3bd363547ddf8769efe14052bfa7 + 0c027eede69ba22bafca9a1955f1e00848655ece - + https://github.com/dotnet/arcade - afc901d73d7d3bd363547ddf8769efe14052bfa7 + 0c027eede69ba22bafca9a1955f1e00848655ece - + https://github.com/dotnet/arcade - afc901d73d7d3bd363547ddf8769efe14052bfa7 + 0c027eede69ba22bafca9a1955f1e00848655ece - + https://github.com/dotnet/arcade - afc901d73d7d3bd363547ddf8769efe14052bfa7 + 0c027eede69ba22bafca9a1955f1e00848655ece - + https://github.com/dotnet/arcade - afc901d73d7d3bd363547ddf8769efe14052bfa7 + 0c027eede69ba22bafca9a1955f1e00848655ece - + https://github.com/dotnet/arcade - afc901d73d7d3bd363547ddf8769efe14052bfa7 + 0c027eede69ba22bafca9a1955f1e00848655ece - + https://github.com/dotnet/arcade - afc901d73d7d3bd363547ddf8769efe14052bfa7 + 0c027eede69ba22bafca9a1955f1e00848655ece https://github.com/dotnet/runtime-assets @@ -250,9 +250,9 @@ https://github.com/dotnet/xharness 5ebf69650b9f7b4ecab485be840b3022420f7812 - + https://github.com/dotnet/arcade - afc901d73d7d3bd363547ddf8769efe14052bfa7 + 0c027eede69ba22bafca9a1955f1e00848655ece https://dev.azure.com/dnceng/internal/_git/dotnet-optimization diff --git a/eng/Versions.props b/eng/Versions.props index 0a1d7ed3b2f309..b0dcb3125698b1 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -54,22 +54,22 @@ 7.0.100-rc.1.22402.1 - 7.0.0-beta.22416.1 - 7.0.0-beta.22416.1 - 7.0.0-beta.22416.1 - 7.0.0-beta.22416.1 - 7.0.0-beta.22416.1 - 7.0.0-beta.22416.1 - 2.5.1-beta.22416.1 - 7.0.0-beta.22416.1 - 7.0.0-beta.22416.1 - 7.0.0-beta.22416.1 - 7.0.0-beta.22416.1 - 7.0.0-beta.22416.1 - 7.0.0-beta.22416.1 - 7.0.0-beta.22416.1 - 7.0.0-beta.22416.1 - 7.0.0-beta.22416.1 + 7.0.0-beta.22418.4 + 7.0.0-beta.22418.4 + 7.0.0-beta.22418.4 + 7.0.0-beta.22418.4 + 7.0.0-beta.22418.4 + 7.0.0-beta.22418.4 + 2.5.1-beta.22418.4 + 7.0.0-beta.22418.4 + 7.0.0-beta.22418.4 + 7.0.0-beta.22418.4 + 7.0.0-beta.22418.4 + 7.0.0-beta.22418.4 + 7.0.0-beta.22418.4 + 7.0.0-beta.22418.4 + 7.0.0-beta.22418.4 + 7.0.0-beta.22418.4 6.0.0-preview.1.102 diff --git a/eng/common/sdl/sdl.ps1 b/eng/common/sdl/sdl.ps1 new file mode 100644 index 00000000000000..ac196e164a4016 --- /dev/null +++ b/eng/common/sdl/sdl.ps1 @@ -0,0 +1,37 @@ + +function Install-Gdn { + param( + [string]$Path, + + # If omitted, install the latest version of Guardian, otherwise install that specific version. + [string]$Version + ) + + $ErrorActionPreference = 'Stop' + Set-StrictMode -Version 2.0 + $disableConfigureToolsetImport = $true + $global:LASTEXITCODE = 0 + + # `tools.ps1` checks $ci to perform some actions. Since the SDL + # scripts don't necessarily execute in the same agent that run the + # build.ps1/sh script this variable isn't automatically set. + $ci = $true + . $PSScriptRoot\..\tools.ps1 + + $argumentList = @("install", "Microsoft.Guardian.Cli", "-Source https://securitytools.pkgs.visualstudio.com/_packaging/Guardian/nuget/v3/index.json", "-OutputDirectory $Path", "-NonInteractive", "-NoCache") + + if ($Version) { + $argumentList += "-Version $Version" + } + + Start-Process nuget -Verbose -ArgumentList $argumentList -NoNewWindow -Wait + + $gdnCliPath = Get-ChildItem -Filter guardian.cmd -Recurse -Path $Path + + if (!$gdnCliPath) + { + Write-PipelineTelemetryError -Category 'Sdl' -Message 'Failure installing Guardian' + } + + return $gdnCliPath.FullName +} \ No newline at end of file diff --git a/eng/common/templates/steps/execute-sdl.yml b/eng/common/templates/steps/execute-sdl.yml index 73245593cef53d..86cf578c431443 100644 --- a/eng/common/templates/steps/execute-sdl.yml +++ b/eng/common/templates/steps/execute-sdl.yml @@ -8,29 +8,26 @@ parameters: condition: '' steps: -- ${{ if ne(parameters.overrideGuardianVersion, '') }}: - - powershell: | - $content = Get-Content $(GuardianPackagesConfigFile) - - Write-Host "packages.config content was:`n$content" - - $content = $content.Replace('$(DefaultGuardianVersion)', '$(GuardianVersion)') - $content | Set-Content $(GuardianPackagesConfigFile) - - Write-Host "packages.config content updated to:`n$content" - displayName: Use overridden Guardian version ${{ parameters.overrideGuardianVersion }} +- task: NuGetAuthenticate@1 + inputs: + nuGetServiceConnections: GuardianConnect - task: NuGetToolInstaller@1 displayName: 'Install NuGet.exe' -- task: NuGetCommand@2 - displayName: 'Install Guardian' - inputs: - restoreSolution: $(Build.SourcesDirectory)\eng\common\sdl\packages.config - feedsToUse: config - nugetConfigPath: $(Build.SourcesDirectory)\eng\common\sdl\NuGet.config - externalFeedCredentials: GuardianConnect - restoreDirectory: $(Build.SourcesDirectory)\.packages +- ${{ if ne(parameters.overrideGuardianVersion, '') }}: + - pwsh: | + . $(Build.SourcesDirectory)\eng\common\sdl\sdl.ps1 + $guardianCliLocation = Install-Gdn -Path $(Build.SourcesDirectory)\.artifacts -Version ${{ parameters.overrideGuardianVersion }} + Write-Host "##vso[task.setvariable variable=GuardianCliLocation]$guardianCliLocation" + displayName: Install Guardian (Overridden) + +- ${{ if eq(parameters.overrideGuardianVersion, '') }}: + - pwsh: | + . $(Build.SourcesDirectory)\eng\common\sdl\sdl.ps1 + $guardianCliLocation = Install-Gdn -Path $(Build.SourcesDirectory)\.artifacts + Write-Host "##vso[task.setvariable variable=GuardianCliLocation]$guardianCliLocation" + displayName: Install Guardian - ${{ if ne(parameters.overrideParameters, '') }}: - powershell: ${{ parameters.executeAllSdlToolsScript }} ${{ parameters.overrideParameters }} @@ -40,7 +37,7 @@ steps: - ${{ if eq(parameters.overrideParameters, '') }}: - powershell: ${{ parameters.executeAllSdlToolsScript }} - -GuardianPackageName Microsoft.Guardian.Cli.$(GuardianVersion) + -GuardianCliLocation $(GuardianCliLocation) -NugetPackageDirectory $(Build.SourcesDirectory)\.packages -AzureDevOpsAccessToken $(dn-bot-dotnet-build-rw-code-rw) ${{ parameters.additionalParameters }} diff --git a/global.json b/global.json index 4a177769017cf9..555895afe031e4 100644 --- a/global.json +++ b/global.json @@ -8,9 +8,9 @@ "dotnet": "7.0.100-preview.7.22377.5" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22416.1", - "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22416.1", - "Microsoft.DotNet.SharedFramework.Sdk": "7.0.0-beta.22416.1", + "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22418.4", + "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22418.4", + "Microsoft.DotNet.SharedFramework.Sdk": "7.0.0-beta.22418.4", "Microsoft.Build.NoTargets": "3.5.0", "Microsoft.Build.Traversal": "3.1.6", "Microsoft.NET.Sdk.IL": "7.0.0-rc.1.22414.6"