Skip to content

Commit

Permalink
Merge pull request #14497 from dotnet-maestro-bot/merge/release/6.0.1…
Browse files Browse the repository at this point in the history
…xx-to-release/6.0.3xx

[automated] Merge branch 'release/6.0.1xx' => 'release/6.0.3xx'
  • Loading branch information
mmitche authored Sep 14, 2022
2 parents a5a36d4 + c50431e commit ed966db
Show file tree
Hide file tree
Showing 14 changed files with 145 additions and 71 deletions.
6 changes: 0 additions & 6 deletions NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,17 @@
<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-6a01dd1" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-aspnetcore-6a01dd1e/nuget/v3/index.json" />
<!-- End: Package sources from dotnet-aspnetcore -->
<!-- Begin: Package sources from dotnet-emsdk -->
<!-- End: Package sources from dotnet-emsdk -->
<!-- Begin: Package sources from DotNet-msbuild-Trusted -->
<!-- End: Package sources from DotNet-msbuild-Trusted -->
<!-- Begin: Package sources from dotnet-runtime -->
<add key="darc-int-dotnet-runtime-55fb7ef" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-runtime-55fb7ef9/nuget/v3/index.json" />
<!-- End: Package sources from dotnet-runtime -->
<!-- Begin: Package sources from dotnet-templating -->
<add key="darc-int-dotnet-templating-d251862" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-templating-d251862f/nuget/v3/index.json" />
<!-- End: Package sources from dotnet-templating -->
<!-- Begin: Package sources from dotnet-windowsdesktop -->
<add key="darc-int-dotnet-windowsdesktop-9195621" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-windowsdesktop-91956213/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="dotnet-tools" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" />
Expand All @@ -39,15 +36,12 @@
<disabledPackageSources>
<!--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-6a01dd1" value="true" />
<!-- End: Package sources from dotnet-aspnetcore -->
<!-- Begin: Package sources from dotnet-runtime -->
<add key="darc-int-dotnet-runtime-55fb7ef" value="true" />
<!-- Begin: Package sources from dotnet-templating -->
<add key="darc-int-dotnet-templating-d251862" value="true" />
<!-- End: Package sources from dotnet-templating -->
<!-- Begin: Package sources from dotnet-windowsdesktop -->
<add key="darc-int-dotnet-windowsdesktop-9195621" value="true" />
<!-- End: Package sources from dotnet-windowsdesktop -->
<!-- End: Package sources from dotnet-runtime -->
<!-- Begin: Package sources from dotnet-windowsdesktop -->
Expand Down
16 changes: 8 additions & 8 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@
<Sha>4be14ee6b6587a02f05337505bd840fbcbe898f6</Sha>
<SourceBuildTarball RepoName="nuget-client" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.ApplicationInsights" Version="2.0.0">
<Dependency Name="Microsoft.ApplicationInsights" Version="2.19.0">
<Uri>https://github.com/Microsoft/ApplicationInsights-dotnet</Uri>
<Sha>53b80940842204f78708a538628288ff5d741a1d</Sha>
<Sha>93f745cfef8541f09862aae9bc8c04554bca38c7</Sha>
</Dependency>
<!-- Temporarily pinning Microsoft.Web.Xdt until strict coherency is enabled by default -->
<Dependency Name="Microsoft.Web.Xdt" Version="5.0.0-preview.21431.1" CoherentParentDependency="Microsoft.NET.Sdk" Pinned="true">
Expand Down Expand Up @@ -197,19 +197,19 @@
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.22314.7">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.22412.2">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>fdd3a242bc813f371023adff4e4c05c0be705d2a</Sha>
<Sha>41323ecb0b2312980381bfdbb75afd2dae2b266b</Sha>
<SourceBuild RepoName="arcade" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.DotNet.CMake.Sdk" Version="6.0.0-beta.22314.7">
<Dependency Name="Microsoft.DotNet.CMake.Sdk" Version="6.0.0-beta.22412.2">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>fdd3a242bc813f371023adff4e4c05c0be705d2a</Sha>
<Sha>41323ecb0b2312980381bfdbb75afd2dae2b266b</Sha>
<SourceBuild RepoName="arcade" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="6.0.0-beta.22314.7">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="6.0.0-beta.22412.2">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>fdd3a242bc813f371023adff4e4c05c0be705d2a</Sha>
<Sha>41323ecb0b2312980381bfdbb75afd2dae2b266b</Sha>
</Dependency>
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-reference-packages" Version="6.0.0-servicing.22363.1">
<Uri>https://github.com/dotnet/source-build-reference-packages</Uri>
Expand Down
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</PropertyGroup>
<PropertyGroup>
<!-- Dependency from https://github.com/dotnet/arcade -->
<MicrosoftDotNetBuildTasksInstallersPackageVersion>6.0.0-beta.22314.7</MicrosoftDotNetBuildTasksInstallersPackageVersion>
<MicrosoftDotNetBuildTasksInstallersPackageVersion>6.0.0-beta.22412.2</MicrosoftDotNetBuildTasksInstallersPackageVersion>
</PropertyGroup>
<PropertyGroup>
<!-- Dependency from https://github.com/dotnet/winforms -->
Expand Down
2 changes: 2 additions & 0 deletions eng/common/generate-sbom-prep.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ Param(
[Parameter(Mandatory=$true)][string] $ManifestDirPath # Manifest directory where sbom will be placed
)

. $PSScriptRoot\pipeline-logging-functions.ps1

Write-Host "Creating dir $ManifestDirPath"
# create directory for sbom manifest to be placed
if (!(Test-Path -path $ManifestDirPath))
Expand Down
12 changes: 12 additions & 0 deletions eng/common/generate-sbom-prep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

source="${BASH_SOURCE[0]}"

# resolve $SOURCE until the file is no longer a symlink
while [[ -h $source ]]; do
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
source="$(readlink "$source")"

# if $source was a relative symlink, we need to resolve it relative to the path where the
# symlink file was located
[[ $source != /* ]] && source="$scriptroot/$source"
done
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
. $scriptroot/pipeline-logging-functions.sh

manifest_dir=$1

if [ ! -d "$manifest_dir" ] ; then
Expand Down
144 changes: 98 additions & 46 deletions eng/common/init-tools-native.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ Wait time between retry attempts in seconds
.PARAMETER GlobalJsonFile
File path to global.json file
.PARAMETER PathPromotion
Optional switch to enable either promote native tools specified in the global.json to the path (in Azure Pipelines)
or break the build if a native tool is not found on the path (on a local dev machine)
.NOTES
#>
[CmdletBinding(PositionalBinding=$false)]
Expand All @@ -41,7 +45,8 @@ Param (
[switch] $Force = $False,
[int] $DownloadRetries = 5,
[int] $RetryWaitTimeInSeconds = 30,
[string] $GlobalJsonFile
[string] $GlobalJsonFile,
[switch] $PathPromotion
)

if (!$GlobalJsonFile) {
Expand Down Expand Up @@ -77,53 +82,100 @@ try {
ConvertFrom-Json |
Select-Object -Expand 'native-tools' -ErrorAction SilentlyContinue
if ($NativeTools) {
$NativeTools.PSObject.Properties | ForEach-Object {
$ToolName = $_.Name
$ToolVersion = $_.Value
$LocalInstallerArguments = @{ ToolName = "$ToolName" }
$LocalInstallerArguments += @{ InstallPath = "$InstallBin" }
$LocalInstallerArguments += @{ BaseUri = "$BaseUri" }
$LocalInstallerArguments += @{ CommonLibraryDirectory = "$EngCommonBaseDir" }
$LocalInstallerArguments += @{ Version = "$ToolVersion" }

if ($Verbose) {
$LocalInstallerArguments += @{ Verbose = $True }
}
if (Get-Variable 'Force' -ErrorAction 'SilentlyContinue') {
if($Force) {
$LocalInstallerArguments += @{ Force = $True }
}
}
if ($Clean) {
$LocalInstallerArguments += @{ Clean = $True }
}

Write-Verbose "Installing $ToolName version $ToolVersion"
Write-Verbose "Executing '$InstallerPath $($LocalInstallerArguments.Keys.ForEach({"-$_ '$($LocalInstallerArguments.$_)'"}) -join ' ')'"
& $InstallerPath @LocalInstallerArguments
if ($LASTEXITCODE -Ne "0") {
$errMsg = "$ToolName installation failed"
if ((Get-Variable 'DoNotAbortNativeToolsInstallationOnFailure' -ErrorAction 'SilentlyContinue') -and $DoNotAbortNativeToolsInstallationOnFailure) {
$showNativeToolsWarning = $true
if ((Get-Variable 'DoNotDisplayNativeToolsInstallationWarnings' -ErrorAction 'SilentlyContinue') -and $DoNotDisplayNativeToolsInstallationWarnings) {
$showNativeToolsWarning = $false
if ($PathPromotion -eq $True) {
if ($env:SYSTEM_TEAMPROJECT) { # check to see if we're in an Azure pipelines build
$NativeTools.PSObject.Properties | ForEach-Object {
$ToolName = $_.Name
$ToolVersion = $_.Value
$InstalledTools = @{}

if ((Get-Command "$ToolName" -ErrorAction SilentlyContinue) -eq $null) {
if ($ToolVersion -eq "latest") {
$ToolVersion = ""
}
$ArcadeToolsDirectory = "C:\arcade-tools"
if (-not (Test-Path $ArcadeToolsDirectory)) {
Write-Error "Arcade tools directory '$ArcadeToolsDirectory' was not found; artifacts were not properly installed."
exit 1
}
$ToolDirectory = (Get-ChildItem -Path "$ArcadeToolsDirectory" -Filter "$ToolName-$ToolVersion*" | Sort-Object -Descending)[0]
if ([string]::IsNullOrWhiteSpace($ToolDirectory)) {
Write-Error "Unable to find directory for $ToolName $ToolVersion; please make sure the tool is installed on this image."
exit 1
}
if ($showNativeToolsWarning) {
Write-Warning $errMsg
$BinPathFile = "$($ToolDirectory.FullName)\binpath.txt"
if (-not (Test-Path -Path "$BinPathFile")) {
Write-Error "Unable to find binpath.txt in '$($ToolDirectory.FullName)' ($ToolName $ToolVersion); artifact is either installed incorrectly or is not a bootstrappable tool."
exit 1
}
$toolInstallationFailure = $true
} else {
# We cannot change this to Write-PipelineTelemetryError because of https://github.com/dotnet/arcade/issues/4482
Write-Host $errMsg
exit 1
$BinPath = Get-Content "$BinPathFile"
$ToolPath = Convert-Path -Path $BinPath
Write-Host "Adding $ToolName to the path ($ToolPath)..."
Write-Host "##vso[task.prependpath]$ToolPath"
$InstalledTools += @{ $ToolName = $ToolDirectory.FullName }
}
}
return $InstalledTools
} else {
$NativeTools.PSObject.Properties | ForEach-Object {
$ToolName = $_.Name
$ToolVersion = $_.Value

if ((Get-Command "$ToolName" -ErrorAction SilentlyContinue) -eq $null) {
Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message "$ToolName not found on path. Please install $ToolName $ToolVersion before proceeding."
}
}
exit 0
}
} else {
$NativeTools.PSObject.Properties | ForEach-Object {
$ToolName = $_.Name
$ToolVersion = $_.Value
$LocalInstallerArguments = @{ ToolName = "$ToolName" }
$LocalInstallerArguments += @{ InstallPath = "$InstallBin" }
$LocalInstallerArguments += @{ BaseUri = "$BaseUri" }
$LocalInstallerArguments += @{ CommonLibraryDirectory = "$EngCommonBaseDir" }
$LocalInstallerArguments += @{ Version = "$ToolVersion" }

if ($Verbose) {
$LocalInstallerArguments += @{ Verbose = $True }
}
if (Get-Variable 'Force' -ErrorAction 'SilentlyContinue') {
if($Force) {
$LocalInstallerArguments += @{ Force = $True }
}
}
if ($Clean) {
$LocalInstallerArguments += @{ Clean = $True }
}

Write-Verbose "Installing $ToolName version $ToolVersion"
Write-Verbose "Executing '$InstallerPath $($LocalInstallerArguments.Keys.ForEach({"-$_ '$($LocalInstallerArguments.$_)'"}) -join ' ')'"
& $InstallerPath @LocalInstallerArguments
if ($LASTEXITCODE -Ne "0") {
$errMsg = "$ToolName installation failed"
if ((Get-Variable 'DoNotAbortNativeToolsInstallationOnFailure' -ErrorAction 'SilentlyContinue') -and $DoNotAbortNativeToolsInstallationOnFailure) {
$showNativeToolsWarning = $true
if ((Get-Variable 'DoNotDisplayNativeToolsInstallationWarnings' -ErrorAction 'SilentlyContinue') -and $DoNotDisplayNativeToolsInstallationWarnings) {
$showNativeToolsWarning = $false
}
if ($showNativeToolsWarning) {
Write-Warning $errMsg
}
$toolInstallationFailure = $true
} else {
# We cannot change this to Write-PipelineTelemetryError because of https://github.com/dotnet/arcade/issues/4482
Write-Host $errMsg
exit 1
}
}
}

if ((Get-Variable 'toolInstallationFailure' -ErrorAction 'SilentlyContinue') -and $toolInstallationFailure) {
# We cannot change this to Write-PipelineTelemetryError because of https://github.com/dotnet/arcade/issues/4482
Write-Host 'Native tools bootstrap failed'
exit 1
}
}

if ((Get-Variable 'toolInstallationFailure' -ErrorAction 'SilentlyContinue') -and $toolInstallationFailure) {
# We cannot change this to Write-PipelineTelemetryError because of https://github.com/dotnet/arcade/issues/4482
Write-Host 'Native tools bootstrap failed'
exit 1
}
}
else {
Expand All @@ -139,7 +191,7 @@ try {
Write-Host "##vso[task.prependpath]$(Convert-Path -Path $InstallBin)"
return $InstallBin
}
else {
elseif (-not ($PathPromotion)) {
Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message 'Native tools install directory does not exist, installation failed'
exit 1
}
Expand All @@ -149,4 +201,4 @@ catch {
Write-Host $_.ScriptStackTrace
Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message $_
ExitWithExitCode 1
}
}
7 changes: 7 additions & 0 deletions eng/common/internal/NuGet.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="dotnet-core-internal-tooling" value="https://pkgs.dev.azure.com/devdiv/_packaging/dotnet-core-internal-tooling/nuget/v3/index.json" />
</packageSources>
</configuration>
3 changes: 3 additions & 0 deletions eng/common/internal/Tools.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
<ItemGroup>
<!-- Clear references, the SDK may add some depending on UsuingToolXxx settings, but we only want to restore the following -->
<PackageReference Remove="@(PackageReference)"/>
<PackageReference Include="Microsoft.ManifestTool.CrossPlatform" Version="$(MicrosoftManifestToolCrossPlatformVersion)" />
<PackageReference Include="Microsoft.VisualStudioEng.MicroBuild.Core" Version="$(MicrosoftVisualStudioEngMicroBuildCoreVersion)" />
<PackageReference Include="Microsoft.VisualStudioEng.MicroBuild.Plugins.SwixBuild" Version="$(MicrosoftVisualStudioEngMicroBuildPluginsSwixBuildVersion)" />
<PackageReference Include="Microsoft.DotNet.IBCMerge" Version="$(MicrosoftDotNetIBCMergeVersion)" Condition="'$(UsingToolIbcOptimization)' == 'true'" />
<PackageReference Include="Drop.App" Version="$(DropAppVersion)" ExcludeAssets="all" Condition="'$(UsingToolVisualStudioIbcTraining)' == 'true'"/>
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion eng/common/templates/job/execute-sdl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
# If it's not devdiv, it's dnceng
${{ if ne(variables['System.TeamProject'], 'DevDiv') }}:
name: NetCore1ESPool-Internal
demands: ImageOverride -equals Build.Server.Amd64.VS2019
demands: ImageOverride -equals windows.vs2019.amd64
steps:
- checkout: self
clean: true
Expand Down
2 changes: 1 addition & 1 deletion eng/common/templates/job/onelocbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
# If it's not devdiv, it's dnceng
${{ if ne(variables['System.TeamProject'], 'DevDiv') }}:
name: NetCore1ESPool-Internal
demands: ImageOverride -equals Build.Server.Amd64.VS2019
demands: ImageOverride -equals windows.vs2019.amd64

variables:
- group: OneLocBuildVariables # Contains the CeapexPat and GithubPat
Expand Down
2 changes: 1 addition & 1 deletion eng/common/templates/jobs/jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
# If it's not devdiv, it's dnceng
${{ if ne(variables['System.TeamProject'], 'DevDiv') }}:
name: NetCore1ESPool-Internal
demands: ImageOverride -equals Build.Server.Amd64.VS2019
demands: ImageOverride -equals windows.vs2019.amd64

runAsPublic: ${{ parameters.runAsPublic }}
publishUsingPipelines: ${{ parameters.enablePublishUsingPipelines }}
Expand Down
8 changes: 4 additions & 4 deletions eng/common/templates/post-build/post-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ stages:
# If it's not devdiv, it's dnceng
${{ if ne(variables['System.TeamProject'], 'DevDiv') }}:
name: NetCore1ESPool-Internal
demands: ImageOverride -equals Build.Server.Amd64.VS2019
demands: ImageOverride -equals windows.vs2019.amd64

steps:
- template: setup-maestro-vars.yml
Expand Down Expand Up @@ -138,7 +138,7 @@ stages:
# If it's not devdiv, it's dnceng
${{ if ne(variables['System.TeamProject'], 'DevDiv') }}:
name: NetCore1ESPool-Internal
demands: ImageOverride -equals Build.Server.Amd64.VS2019
demands: ImageOverride -equals windows.vs2019.amd64
steps:
- template: setup-maestro-vars.yml
parameters:
Expand Down Expand Up @@ -198,7 +198,7 @@ stages:
# If it's not devdiv, it's dnceng
${{ if ne(variables['System.TeamProject'], 'DevDiv') }}:
name: NetCore1ESPool-Internal
demands: ImageOverride -equals Build.Server.Amd64.VS2019
demands: ImageOverride -equals windows.vs2019.amd64
steps:
- template: setup-maestro-vars.yml
parameters:
Expand Down Expand Up @@ -255,7 +255,7 @@ stages:
# If it's not devdiv, it's dnceng
${{ if ne(variables['System.TeamProject'], 'DevDiv') }}:
name: NetCore1ESPool-Internal
demands: ImageOverride -equals Build.Server.Amd64.VS2019
demands: ImageOverride -equals windows.vs2019.amd64
steps:
- template: setup-maestro-vars.yml
parameters:
Expand Down
4 changes: 4 additions & 0 deletions eng/common/tools.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,10 @@ function InitializeNativeTools() {
InstallDirectory = "$ToolsDir"
}
}
if ($env:NativeToolsOnMachine) {
Write-Host "Variable NativeToolsOnMachine detected, enabling native tool path promotion..."
$nativeArgs += @{ PathPromotion = $true }
}
& "$PSScriptRoot/init-tools-native.ps1" @nativeArgs
}
}
Expand Down
Loading

0 comments on commit ed966db

Please sign in to comment.