Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,16 @@
<clear />
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
<!-- Begin: Package sources from dotnet-aspnetcore -->
<add key="darc-int-dotnet-aspnetcore-617d594" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-aspnetcore-617d594f/nuget/v3/index.json" />
<!-- End: Package sources from dotnet-aspnetcore -->
<!-- Begin: Package sources from DotNet-msbuild-Trusted -->
<!-- End: Package sources from DotNet-msbuild-Trusted -->
<!-- Begin: Package sources from dotnet-roslyn-analyzers -->
<!-- End: Package sources from dotnet-roslyn-analyzers -->
<!-- Begin: Package sources from dotnet-runtime -->
<add key="darc-int-dotnet-runtime-943474c" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-runtime-943474ca/nuget/v3/index.json" />
<!-- End: Package sources from dotnet-runtime -->
<!-- Begin: Package sources from dotnet-templating -->
<add key="darc-int-dotnet-templating-84fa040" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-templating-84fa0403/nuget/v3/index.json" />
<!-- End: Package sources from dotnet-templating -->
<!-- Begin: Package sources from dotnet-windowsdesktop -->
<add key="darc-int-dotnet-windowsdesktop-ee26d5b" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-windowsdesktop-ee26d5bd/nuget/v3/index.json" />
<!-- End: Package sources from dotnet-windowsdesktop -->
<!--End: Package sources managed by Dependency Flow automation. Do not edit the sources above.-->
<add key="dotnet6" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json" />
Expand All @@ -37,16 +33,12 @@
<!-- Begin: Package sources from DotNet-msbuild-Trusted -->
<!-- End: Package sources from DotNet-msbuild-Trusted -->
<!-- Begin: Package sources from dotnet-templating -->
<add key="darc-int-dotnet-templating-84fa040" value="true" />
<!-- End: Package sources from dotnet-templating -->
<!-- Begin: Package sources from dotnet-aspnetcore -->
<add key="darc-int-dotnet-aspnetcore-617d594" value="true" />
<!-- End: Package sources from dotnet-aspnetcore -->
<!-- Begin: Package sources from dotnet-runtime -->
<add key="darc-int-dotnet-runtime-943474c" value="true" />
<!-- End: Package sources from dotnet-runtime -->
<!-- Begin: Package sources from dotnet-windowsdesktop -->
<add key="darc-int-dotnet-windowsdesktop-ee26d5b" value="true" />
<!-- End: Package sources from dotnet-windowsdesktop -->
<!--End: Package sources managed by Dependency Flow automation. Do not edit the sources above.-->
</disabledPackageSources>
Expand Down
16 changes: 8 additions & 8 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -287,22 +287,22 @@
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.22517.1">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.22564.9">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>afc36a16c1ef79fd1969ca7effc7e99b61e4e9a6</Sha>
<Sha>3a5fc99d467769acc6f951cfefef5a9718ecfc42</Sha>
<SourceBuild RepoName="arcade" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="6.0.0-beta.22517.1">
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="6.0.0-beta.22564.9">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>afc36a16c1ef79fd1969ca7effc7e99b61e4e9a6</Sha>
<Sha>3a5fc99d467769acc6f951cfefef5a9718ecfc42</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.SignTool" Version="6.0.0-beta.22517.1">
<Dependency Name="Microsoft.DotNet.SignTool" Version="6.0.0-beta.22564.9">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>afc36a16c1ef79fd1969ca7effc7e99b61e4e9a6</Sha>
<Sha>3a5fc99d467769acc6f951cfefef5a9718ecfc42</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="6.0.0-beta.22517.1">
<Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="6.0.0-beta.22564.9">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>afc36a16c1ef79fd1969ca7effc7e99b61e4e9a6</Sha>
<Sha>3a5fc99d467769acc6f951cfefef5a9718ecfc42</Sha>
</Dependency>
<Dependency Name="System.Reflection.MetadataLoadContext" Version="6.0.0">
<Uri>https://github.com/dotnet/runtime</Uri>
Expand Down
4 changes: 2 additions & 2 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<NewtonsoftJsonVersion>$(NewtonsoftJsonPackageVersion)</NewtonsoftJsonVersion>
<SystemDiagnosticsFileVersionInfoVersion>4.0.0</SystemDiagnosticsFileVersionInfoVersion>
<SystemReflectionMetadataVersion>5.0.0</SystemReflectionMetadataVersion>
<MicrosoftDotNetSignToolVersion>6.0.0-beta.22517.1</MicrosoftDotNetSignToolVersion>
<MicrosoftDotNetSignToolVersion>6.0.0-beta.22564.9</MicrosoftDotNetSignToolVersion>
<MicrosoftWebXdtPackageVersion>3.1.0</MicrosoftWebXdtPackageVersion>
<SystemSecurityCryptographyProtectedDataPackageVersion>6.0.0</SystemSecurityCryptographyProtectedDataPackageVersion>
<SystemCollectionsSpecializedPackageVersion>4.3.0</SystemCollectionsSpecializedPackageVersion>
Expand Down Expand Up @@ -168,7 +168,7 @@
<PropertyGroup>
<FluentAssertionsVersion>4.19.2</FluentAssertionsVersion>
<FluentAssertionsJsonVersion>4.19.0</FluentAssertionsJsonVersion>
<MicrosoftDotNetXUnitExtensionsVersion>6.0.0-beta.22517.1</MicrosoftDotNetXUnitExtensionsVersion>
<MicrosoftDotNetXUnitExtensionsVersion>6.0.0-beta.22564.9</MicrosoftDotNetXUnitExtensionsVersion>
<MoqPackageVersion>4.8.2</MoqPackageVersion>
<MicrosoftDotNetInstallerWindowsSecurityTestDataPackageVersion>6.0.0-beta.22262.1</MicrosoftDotNetInstallerWindowsSecurityTestDataPackageVersion>
</PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions eng/common/dotnet-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ done
# Use uname to determine what the CPU is, see https://en.wikipedia.org/wiki/Uname#Examples
cpuname=$(uname -m)
case $cpuname in
aarch64)
arm64|aarch64)
buildarch=arm64
;;
amd64|x86_64)
Expand All @@ -61,7 +61,7 @@ case $cpuname in
armv*l)
buildarch=arm
;;
i686)
i[3-6]86)
buildarch=x86
;;
*)
Expand Down
38 changes: 38 additions & 0 deletions eng/common/sdl/sdl.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@

function Install-Gdn {
param(
[Parameter(Mandatory=$true)]
[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
}
60 changes: 40 additions & 20 deletions eng/common/templates/steps/execute-sdl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,28 @@ 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: |
Set-Location -Path $(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: |
Set-Location -Path $(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 }}
Expand All @@ -40,7 +39,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 }}
Expand All @@ -62,7 +61,28 @@ steps:
c
i
condition: succeededOrFailed()

- publish: $(Agent.BuildDirectory)/.gdn
artifact: GuardianConfiguration
displayName: Publish GuardianConfiguration
condition: succeededOrFailed()

# Publish the SARIF files in a container named CodeAnalysisLogs to enable integration
# with the "SARIF SAST Scans Tab" Azure DevOps extension
- task: CopyFiles@2
displayName: Copy SARIF files
inputs:
flattenFolders: true
sourceFolder: $(Agent.BuildDirectory)/.gdn/rc/
contents: '**/*.sarif'
targetFolder: $(Build.SourcesDirectory)/CodeAnalysisLogs
condition: succeededOrFailed()

# Use PublishBuildArtifacts because the SARIF extension only checks this case
# see microsoft/sarif-azuredevops-extension#4
- task: PublishBuildArtifacts@1
displayName: Publish SARIF files to CodeAnalysisLogs container
inputs:
pathToPublish: $(Build.SourcesDirectory)/CodeAnalysisLogs
artifactName: CodeAnalysisLogs
condition: succeededOrFailed()
6 changes: 6 additions & 0 deletions eng/common/templates/steps/source-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ steps:
targetRidArgs='/p:TargetRid=${{ parameters.platform.targetRID }}'
fi

runtimeOsArgs=
if [ '${{ parameters.platform.runtimeOS }}' != '' ]; then
runtimeOsArgs='/p:RuntimeOS=${{ parameters.platform.runtimeOS }}'
fi

publishArgs=
if [ '${{ parameters.platform.skipPublishValidation }}' != 'true' ]; then
publishArgs='--publish'
Expand All @@ -75,6 +80,7 @@ steps:
$internalRuntimeDownloadArgs \
$internalRestoreArgs \
$targetRidArgs \
$runtimeOsArgs \
/p:SourceBuildNonPortable=${{ parameters.platform.nonPortable }} \
/p:ArcadeBuildFromSource=true
displayName: Build
Expand Down
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
}
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.22517.1",
"Microsoft.DotNet.Helix.Sdk": "6.0.0-beta.22517.1"
"Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.22564.9",
"Microsoft.DotNet.Helix.Sdk": "6.0.0-beta.22564.9"
}
}