Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/linker.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com>2019-11-15 01:51:24 +0300
committerGitHub <noreply@github.com>2019-11-15 01:51:24 +0300
commitd5e90f5814c48cbae141e93f13194934e73c1265 (patch)
treed4255d59ffc8e657a3a13301b044f30c4f2f96d1 /eng/common
parent742b71402b3f6c88fc22956a819d7ea00408f42c (diff)
[master] Update dependencies from dotnet/arcade (#779)
* Update dependencies from https://github.com/dotnet/arcade build 20191004.2 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19504.2 * Update dependencies from https://github.com/dotnet/arcade build 20191005.1 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19505.1 * Update dependencies from https://github.com/dotnet/arcade build 20191006.1 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19506.1 * Update dependencies from https://github.com/dotnet/arcade build 20191009.5 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19509.5 * Update dependencies from https://github.com/dotnet/arcade build 20191010.4 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19510.4 * Update dependencies from https://github.com/dotnet/arcade build 20191011.1 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19511.1 * Update dependencies from https://github.com/dotnet/arcade build 20191015.1 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19515.1 * Update dependencies from https://github.com/dotnet/arcade build 20191015.2 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19515.2 * Update dependencies from https://github.com/dotnet/arcade build 20191017.8 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19517.8 * Update dependencies from https://github.com/dotnet/arcade build 20191018.2 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19518.2 * Update dependencies from https://github.com/dotnet/arcade build 20191021.4 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19521.4 * Update dependencies from https://github.com/dotnet/arcade build 20191022.8 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19522.8 * Update dependencies from https://github.com/dotnet/arcade build 20191023.3 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19523.3 * Update dependencies from https://github.com/dotnet/arcade build 20191024.2 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19524.2 * Update dependencies from https://github.com/dotnet/arcade build 20191025.2 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19525.2 * Update dependencies from https://github.com/dotnet/arcade build 20191026.1 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19526.1 * Update dependencies from https://github.com/dotnet/arcade build 20191027.3 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19527.3 * Update dependencies from https://github.com/dotnet/arcade build 20191028.5 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19528.5 * Update dependencies from https://github.com/dotnet/arcade build 20191029.9 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19529.9 * Update dependencies from https://github.com/dotnet/arcade build 20191030.15 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19530.15 * Update dependencies from https://github.com/dotnet/arcade build 20191031.14 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19531.14 * Update dependencies from https://github.com/dotnet/arcade build 20191101.3 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19551.3 * Update dependencies from https://github.com/dotnet/arcade build 20191102.1 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19552.1 * Update dependencies from https://github.com/dotnet/arcade build 20191104.3 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19554.3 * Update dependencies from https://github.com/dotnet/arcade build 20191105.7 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19555.7 * Update dependencies from https://github.com/dotnet/arcade build 20191106.10 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19556.10 * Update dependencies from https://github.com/dotnet/arcade build 20191107.20 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19557.20 * Update dependencies from https://github.com/dotnet/arcade build 20191108.11 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19558.11 * Update dependencies from https://github.com/dotnet/arcade build 20191111.8 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19561.8 * Update dependencies from https://github.com/dotnet/arcade build 20191112.5 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19562.5 * Update dependencies from https://github.com/dotnet/arcade build 20191113.9 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19563.9 * Update dependencies from https://github.com/dotnet/arcade build 20191114.2 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19564.2
Diffstat (limited to 'eng/common')
-rw-r--r--eng/common/PublishToSymbolServers.proj6
-rw-r--r--eng/common/SetupNugetSources.ps1127
-rw-r--r--eng/common/SetupNugetSources.sh117
-rw-r--r--eng/common/build.ps119
-rwxr-xr-xeng/common/build.sh24
-rw-r--r--eng/common/cross/toolchain.cmake49
-rw-r--r--eng/common/darc-init.ps19
-rwxr-xr-xeng/common/darc-init.sh24
-rw-r--r--eng/common/dotnet-install.ps16
-rwxr-xr-xeng/common/dotnet-install.sh43
-rw-r--r--eng/common/post-build/post-build-utils.ps11
-rw-r--r--eng/common/post-build/setup-maestro-vars.ps126
-rw-r--r--eng/common/sdl/extract-artifact-packages.ps11
-rw-r--r--eng/common/templates/job/execute-sdl.yml28
-rw-r--r--eng/common/templates/job/job.yml2
-rw-r--r--eng/common/templates/post-build/channels/generic-internal-channel.yml (renamed from eng/common/templates/post-build/channels/netcore-internal-30.yml)42
-rw-r--r--eng/common/templates/post-build/channels/generic-public-channel.yml (renamed from eng/common/templates/post-build/channels/netcore-release-31.yml)52
-rw-r--r--eng/common/templates/post-build/channels/netcore-dev-31.yml132
-rw-r--r--eng/common/templates/post-build/channels/netcore-dev-5.yml132
-rw-r--r--eng/common/templates/post-build/channels/netcore-release-30.yml132
-rw-r--r--eng/common/templates/post-build/channels/netcore-tools-latest.yml132
-rw-r--r--eng/common/templates/post-build/channels/public-validation-release.yml97
-rw-r--r--eng/common/templates/post-build/common-variables.yml22
-rw-r--r--eng/common/templates/post-build/post-build.yml146
-rw-r--r--eng/common/templates/post-build/setup-maestro-vars.yml26
-rw-r--r--eng/common/templates/steps/publish-logs.yml23
-rw-r--r--eng/common/templates/steps/send-to-helix.yml3
-rw-r--r--eng/common/tools.ps149
-rwxr-xr-xeng/common/tools.sh43
29 files changed, 741 insertions, 772 deletions
diff --git a/eng/common/PublishToSymbolServers.proj b/eng/common/PublishToSymbolServers.proj
index 5d55e312b..311e2bbe0 100644
--- a/eng/common/PublishToSymbolServers.proj
+++ b/eng/common/PublishToSymbolServers.proj
@@ -37,6 +37,8 @@
<PropertyGroup>
<DotNetSymbolExpirationInDays Condition="'$(DotNetSymbolExpirationInDays)' == ''">3650</DotNetSymbolExpirationInDays>
<PublishToSymbolServer>true</PublishToSymbolServer>
+ <PublishToSymWeb Condition="'$(PublishToSymWeb)' == ''">true</PublishToSymWeb>
+ <PublishToMSDL Condition="'$(PublishToMSDL)' == ''">true</PublishToMSDL>
<PublishToSymbolServer Condition="'@(FilesToPublishToSymbolServer)' == '' and '@(PackagesToPublishToSymbolServer)' == ''">false</PublishToSymbolServer>
</PropertyGroup>
@@ -56,7 +58,7 @@
DryRun="false"
ConvertPortablePdbsToWindowsPdbs="false"
PdbConversionTreatAsWarning=""
- Condition="$(PublishToSymbolServer)"/>
+ Condition="$(PublishToSymbolServer) and $(PublishToMSDL)"/>
<!--
Symbol Uploader: SymWeb
@@ -73,7 +75,7 @@
DryRun="false"
ConvertPortablePdbsToWindowsPdbs="false"
PdbConversionTreatAsWarning=""
- Condition="$(PublishToSymbolServer)"/>
+ Condition="$(PublishToSymbolServer) and $(PublishToSymWeb)"/>
</Target>
<ItemGroup>
diff --git a/eng/common/SetupNugetSources.ps1 b/eng/common/SetupNugetSources.ps1
new file mode 100644
index 000000000..2cb40c294
--- /dev/null
+++ b/eng/common/SetupNugetSources.ps1
@@ -0,0 +1,127 @@
+# This file is a temporary workaround for internal builds to be able to restore from private AzDO feeds.
+# This file should be removed as part of this issue: https://github.com/dotnet/arcade/issues/4080
+#
+# What the script does is iterate over all package sources in the pointed NuGet.config and add a credential entry
+# under <packageSourceCredentials> for each Maestro managed private feed. Two additional credential
+# entries are also added for the two private static internal feeds: dotnet3-internal and dotnet3-internal-transport.
+#
+# This script needs to be called in every job that will restore packages and which the base repo has
+# private AzDO feeds in the NuGet.config.
+#
+# See example YAML call for this script below. Note the use of the variable `$(dn-bot-dnceng-artifact-feeds-rw)`
+# from the AzureDevOps-Artifact-Feeds-Pats variable group.
+#
+# - task: PowerShell@2
+# displayName: Setup Private Feeds Credentials
+# condition: eq(variables['Agent.OS'], 'Windows_NT')
+# inputs:
+# filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1
+# arguments: -ConfigFile ${Env:BUILD_SOURCESDIRECTORY}/NuGet.config -Password $Env:Token
+# env:
+# Token: $(dn-bot-dnceng-artifact-feeds-rw)
+
+[CmdletBinding()]
+param (
+ [Parameter(Mandatory = $true)][string]$ConfigFile,
+ [Parameter(Mandatory = $true)][string]$Password
+)
+
+$ErrorActionPreference = "Stop"
+Set-StrictMode -Version 2.0
+[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
+
+. $PSScriptRoot\tools.ps1
+
+# Add source entry to PackageSources
+function AddPackageSource($sources, $SourceName, $SourceEndPoint, $creds, $Username, $Password) {
+ $packageSource = $sources.SelectSingleNode("add[@key='$SourceName']")
+
+ if ($packageSource -eq $null)
+ {
+ $packageSource = $doc.CreateElement("add")
+ $packageSource.SetAttribute("key", $SourceName)
+ $packageSource.SetAttribute("value", $SourceEndPoint)
+ $sources.AppendChild($packageSource) | Out-Null
+ }
+ else {
+ Write-Host "Package source $SourceName already present."
+ }
+
+ AddCredential -Creds $creds -Source $SourceName -Username $Username -Password $Password
+}
+
+# Add a credential node for the specified source
+function AddCredential($creds, $source, $username, $password) {
+ # Looks for credential configuration for the given SourceName. Create it if none is found.
+ $sourceElement = $creds.SelectSingleNode($Source)
+ if ($sourceElement -eq $null)
+ {
+ $sourceElement = $doc.CreateElement($Source)
+ $creds.AppendChild($sourceElement) | Out-Null
+ }
+
+ # Add the <Username> node to the credential if none is found.
+ $usernameElement = $sourceElement.SelectSingleNode("add[@key='Username']")
+ if ($usernameElement -eq $null)
+ {
+ $usernameElement = $doc.CreateElement("add")
+ $usernameElement.SetAttribute("key", "Username")
+ $sourceElement.AppendChild($usernameElement) | Out-Null
+ }
+ $usernameElement.SetAttribute("value", $Username)
+
+ # Add the <ClearTextPassword> to the credential if none is found.
+ # Add it as a clear text because there is no support for encrypted ones in non-windows .Net SDKs.
+ # -> https://github.com/NuGet/Home/issues/5526
+ $passwordElement = $sourceElement.SelectSingleNode("add[@key='ClearTextPassword']")
+ if ($passwordElement -eq $null)
+ {
+ $passwordElement = $doc.CreateElement("add")
+ $passwordElement.SetAttribute("key", "ClearTextPassword")
+ $sourceElement.AppendChild($passwordElement) | Out-Null
+ }
+ $passwordElement.SetAttribute("value", $Password)
+}
+
+function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Password) {
+ $maestroPrivateSources = $Sources.SelectNodes("add[contains(@key,'darc-int')]")
+
+ Write-Host "Inserting credentials for $($maestroPrivateSources.Count) Maestro's private feeds."
+
+ ForEach ($PackageSource in $maestroPrivateSources) {
+ Write-Host "`tInserting credential for Maestro's feed:" $PackageSource.Key
+ AddCredential -Creds $creds -Source $PackageSource.Key -Username $Username -Password $Password
+ }
+}
+
+if (!(Test-Path $ConfigFile -PathType Leaf)) {
+ Write-Host "Couldn't find the file NuGet config file: $ConfigFile"
+ ExitWithExitCode 1
+}
+
+# Load NuGet.config
+$doc = New-Object System.Xml.XmlDocument
+$filename = (Get-Item $ConfigFile).FullName
+$doc.Load($filename)
+
+# Get reference to <PackageSources> or create one if none exist already
+$sources = $doc.DocumentElement.SelectSingleNode("packageSources")
+if ($sources -eq $null) {
+ $sources = $doc.CreateElement("packageSources")
+ $doc.DocumentElement.AppendChild($sources) | Out-Null
+}
+
+# Looks for a <PackageSourceCredentials> node. Create it if none is found.
+$creds = $doc.DocumentElement.SelectSingleNode("packageSourceCredentials")
+if ($creds -eq $null) {
+ $creds = $doc.CreateElement("packageSourceCredentials")
+ $doc.DocumentElement.AppendChild($creds) | Out-Null
+}
+
+# Insert credential nodes for Maestro's private feeds
+InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Password $Password
+
+AddPackageSource -Sources $sources -SourceName "dotnet3-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password
+AddPackageSource -Sources $sources -SourceName "dotnet3-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password
+
+$doc.Save($filename)
diff --git a/eng/common/SetupNugetSources.sh b/eng/common/SetupNugetSources.sh
new file mode 100644
index 000000000..126452131
--- /dev/null
+++ b/eng/common/SetupNugetSources.sh
@@ -0,0 +1,117 @@
+#!/usr/bin/env bash
+
+# This file is a temporary workaround for internal builds to be able to restore from private AzDO feeds.
+# This file should be removed as part of this issue: https://github.com/dotnet/arcade/issues/4080
+#
+# What the script does is iterate over all package sources in the pointed NuGet.config and add a credential entry
+# under <packageSourceCredentials> for each Maestro's managed private feed. Two additional credential
+# entries are also added for the two private static internal feeds: dotnet3-internal and dotnet3-internal-transport.
+#
+# This script needs to be called in every job that will restore packages and which the base repo has
+# private AzDO feeds in the NuGet.config.
+#
+# See example YAML call for this script below. Note the use of the variable `$(dn-bot-dnceng-artifact-feeds-rw)`
+# from the AzureDevOps-Artifact-Feeds-Pats variable group.
+#
+# - task: Bash@3
+# displayName: Setup Private Feeds Credentials
+# inputs:
+# filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh
+# arguments: $BUILD_SOURCESDIRECTORY/NuGet.config $Token
+# condition: ne(variables['Agent.OS'], 'Windows_NT')
+# env:
+# Token: $(dn-bot-dnceng-artifact-feeds-rw)
+
+ConfigFile=$1
+CredToken=$2
+NL='\n'
+TB=' '
+
+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/tools.sh"
+
+if [ ! -f "$ConfigFile" ]; then
+ echo "Couldn't find the file NuGet config file: $ConfigFile"
+ ExitWithExitCode 1
+fi
+
+if [[ `uname -s` == "Darwin" ]]; then
+ NL=$'\\\n'
+ TB=''
+fi
+
+# Ensure there is a <packageSources>...</packageSources> section.
+grep -i "<packageSources>" $ConfigFile
+if [ "$?" != "0" ]; then
+ echo "Adding <packageSources>...</packageSources> section."
+ ConfigNodeHeader="<configuration>"
+ PackageSourcesTemplate="${TB}<packageSources>${NL}${TB}</packageSources>"
+
+ sed -i.bak "s|$ConfigNodeHeader|$ConfigNodeHeader${NL}$PackageSourcesTemplate|" NuGet.config
+fi
+
+# Ensure there is a <packageSourceCredentials>...</packageSourceCredentials> section.
+grep -i "<packageSourceCredentials>" $ConfigFile
+if [ "$?" != "0" ]; then
+ echo "Adding <packageSourceCredentials>...</packageSourceCredentials> section."
+
+ PackageSourcesNodeFooter="</packageSources>"
+ PackageSourceCredentialsTemplate="${TB}<packageSourceCredentials>${NL}${TB}</packageSourceCredentials>"
+
+ sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourcesNodeFooter${NL}$PackageSourceCredentialsTemplate|" NuGet.config
+fi
+
+# Ensure dotnet3-internal and dotnet3-internal-transport is in the packageSources
+grep -i "<add key=\"dotnet3-internal\">" $ConfigFile
+if [ "$?" != "0" ]; then
+ echo "Adding dotnet3-internal to the packageSources."
+
+ PackageSourcesNodeFooter="</packageSources>"
+ PackageSourceTemplate="${TB}<add key=\"dotnet3-internal\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v2\" />"
+
+ sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" NuGet.config
+fi
+
+# Ensure dotnet3-internal and dotnet3-internal-transport is in the packageSources
+grep -i "<add key=\"dotnet3-internal-transport\">" $ConfigFile
+if [ "$?" != "0" ]; then
+ echo "Adding dotnet3-internal-transport to the packageSources."
+
+ PackageSourcesNodeFooter="</packageSources>"
+ PackageSourceTemplate="${TB}<add key=\"dotnet3-internal-transport\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v2\" />"
+
+ sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" NuGet.config
+fi
+
+# I want things split line by line
+PrevIFS=$IFS
+IFS=$'\n'
+PackageSources=$(grep -oh '"darc-int-[^"]*"' $ConfigFile | tr -d '"')
+IFS=$PrevIFS
+
+PackageSources+=('dotnet3-internal')
+PackageSources+=('dotnet3-internal-transport')
+
+for FeedName in ${PackageSources[@]} ; do
+ # Check if there is no existing credential for this FeedName
+ grep -i "<$FeedName>" $ConfigFile
+ if [ "$?" != "0" ]; then
+ echo "Adding credentials for $FeedName."
+
+ PackageSourceCredentialsNodeFooter="</packageSourceCredentials>"
+ NewCredential="${TB}${TB}<$FeedName>${NL}<add key=\"Username\" value=\"dn-bot\" />${NL}<add key=\"ClearTextPassword\" value=\"$CredToken\" />${NL}</$FeedName>"
+
+ sed -i.bak "s|$PackageSourceCredentialsNodeFooter|$NewCredential${NL}$PackageSourceCredentialsNodeFooter|" NuGet.config
+ fi
+done
diff --git a/eng/common/build.ps1 b/eng/common/build.ps1
index e001ccb48..55dff3320 100644
--- a/eng/common/build.ps1
+++ b/eng/common/build.ps1
@@ -18,6 +18,7 @@ Param(
[switch] $sign,
[switch] $pack,
[switch] $publish,
+ [switch] $clean,
[switch][Alias('bl')]$binaryLog,
[switch] $ci,
[switch] $prepareMachine,
@@ -48,6 +49,7 @@ function Print-Usage() {
Write-Host " -pack Package build outputs into NuGet packages and Willow components"
Write-Host " -sign Sign build outputs"
Write-Host " -publish Publish artifacts (e.g. symbols)"
+ Write-Host " -clean Clean the solution"
Write-Host ""
Write-Host "Advanced settings:"
@@ -112,6 +114,14 @@ function Build {
@properties
}
+if ($clean) {
+ if(Test-Path $ArtifactsDir) {
+ Remove-Item -Recurse -Force $ArtifactsDir
+ Write-Host "Artifacts directory deleted."
+ }
+ exit 0
+}
+
try {
if ($help -or (($null -ne $properties) -and ($properties.Contains("/help") -or $properties.Contains("/?")))) {
Print-Usage
@@ -123,14 +133,7 @@ try {
$nodeReuse = $false
}
- # Import custom tools configuration, if present in the repo.
- # Note: Import in global scope so that the script set top-level variables without qualification.
- $configureToolsetScript = Join-Path $EngRoot "configure-toolset.ps1"
- if (Test-Path $configureToolsetScript) {
- . $configureToolsetScript
- }
-
- if (($restore) -and ($null -eq $env:DisableNativeToolsetInstalls)) {
+ if ($restore) {
InitializeNativeTools
}
diff --git a/eng/common/build.sh b/eng/common/build.sh
index 6236fc4d3..36f9aa046 100755
--- a/eng/common/build.sh
+++ b/eng/common/build.sh
@@ -26,6 +26,7 @@ usage()
echo " --pack Package build outputs into NuGet packages and Willow components"
echo " --sign Sign build outputs"
echo " --publish Publish artifacts (e.g. symbols)"
+ echo " --clean Clean the solution"
echo ""
echo "Advanced settings:"
@@ -62,6 +63,7 @@ publish=false
sign=false
public=false
ci=false
+clean=false
warn_as_error=true
node_reuse=true
@@ -82,6 +84,9 @@ while [[ $# > 0 ]]; do
usage
exit 0
;;
+ -clean)
+ clean=true
+ ;;
-configuration|-c)
configuration=$2
shift
@@ -196,20 +201,15 @@ function Build {
ExitWithExitCode 0
}
-# Import custom tools configuration, if present in the repo.
-configure_toolset_script="$eng_root/configure-toolset.sh"
-if [[ -a "$configure_toolset_script" ]]; then
- . "$configure_toolset_script"
-fi
-
-# TODO: https://github.com/dotnet/arcade/issues/1468
-# Temporary workaround to avoid breaking change.
-# Remove once repos are updated.
-if [[ -n "${useInstalledDotNetCli:-}" ]]; then
- use_installed_dotnet_cli="$useInstalledDotNetCli"
+if [[ "$clean" == true ]]; then
+ if [ -d "$artifacts_dir" ]; then
+ rm -rf $artifacts_dir
+ echo "Artifacts directory deleted."
+ fi
+ exit 0
fi
-if [[ "$restore" == true && -z ${DisableNativeToolsetInstalls:-} ]]; then
+if [[ "$restore" == true ]]; then
InitializeNativeTools
fi
diff --git a/eng/common/cross/toolchain.cmake b/eng/common/cross/toolchain.cmake
index 071d41124..0eea7d1df 100644
--- a/eng/common/cross/toolchain.cmake
+++ b/eng/common/cross/toolchain.cmake
@@ -31,6 +31,10 @@ else()
message(FATAL_ERROR "Arch is ${TARGET_ARCH_NAME}. Only armel, arm, arm64 and x86 are supported!")
endif()
+if(DEFINED ENV{TOOLCHAIN})
+ set(TOOLCHAIN $ENV{TOOLCHAIN})
+endif()
+
# Specify include paths
if(TARGET_ARCH_NAME STREQUAL "armel")
if(DEFINED TIZEN_TOOLCHAIN)
@@ -39,48 +43,25 @@ if(TARGET_ARCH_NAME STREQUAL "armel")
endif()
endif()
-# add_compile_param - adds only new options without duplicates.
-# arg0 - list with result options, arg1 - list with new options.
-# arg2 - optional argument, quick summary string for optional using CACHE FORCE mode.
-macro(add_compile_param)
- if(NOT ${ARGC} MATCHES "^(2|3)$")
- message(FATAL_ERROR "Wrong using add_compile_param! Two or three parameters must be given! See add_compile_param description.")
- endif()
- foreach(OPTION ${ARGV1})
- if(NOT ${ARGV0} MATCHES "${OPTION}($| )")
- set(${ARGV0} "${${ARGV0}} ${OPTION}")
- if(${ARGC} EQUAL "3") # CACHE FORCE mode
- set(${ARGV0} "${${ARGV0}}" CACHE STRING "${ARGV2}" FORCE)
- endif()
- endif()
- endforeach()
-endmacro()
+set(CMAKE_SYSROOT "${CROSS_ROOTFS}")
+set(CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN "${CROSS_ROOTFS}/usr")
+set(CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN "${CROSS_ROOTFS}/usr")
+set(CMAKE_ASM_COMPILER_EXTERNAL_TOOLCHAIN "${CROSS_ROOTFS}/usr")
# Specify link flags
-add_compile_param(CROSS_LINK_FLAGS "--sysroot=${CROSS_ROOTFS}")
-add_compile_param(CROSS_LINK_FLAGS "--gcc-toolchain=${CROSS_ROOTFS}/usr")
-add_compile_param(CROSS_LINK_FLAGS "--target=${TOOLCHAIN}")
-add_compile_param(CROSS_LINK_FLAGS "-fuse-ld=gold")
if(TARGET_ARCH_NAME STREQUAL "armel")
if(DEFINED TIZEN_TOOLCHAIN) # For Tizen only
- add_compile_param(CROSS_LINK_FLAGS "-B${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}")
- add_compile_param(CROSS_LINK_FLAGS "-L${CROSS_ROOTFS}/lib")
- add_compile_param(CROSS_LINK_FLAGS "-L${CROSS_ROOTFS}/usr/lib")
- add_compile_param(CROSS_LINK_FLAGS "-L${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}")
+ add_link_options("-B${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}")
+ add_link_options("-L${CROSS_ROOTFS}/lib")
+ add_link_options("-L${CROSS_ROOTFS}/usr/lib")
+ add_link_options("-L${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}")
endif()
elseif(TARGET_ARCH_NAME STREQUAL "x86")
- add_compile_param(CROSS_LINK_FLAGS "-m32")
+ add_link_options(-m32)
endif()
-add_compile_param(CMAKE_EXE_LINKER_FLAGS "${CROSS_LINK_FLAGS}" "TOOLCHAIN_EXE_LINKER_FLAGS")
-add_compile_param(CMAKE_SHARED_LINKER_FLAGS "${CROSS_LINK_FLAGS}" "TOOLCHAIN_EXE_LINKER_FLAGS")
-add_compile_param(CMAKE_MODULE_LINKER_FLAGS "${CROSS_LINK_FLAGS}" "TOOLCHAIN_EXE_LINKER_FLAGS")
-
# Specify compile options
-add_compile_options("--sysroot=${CROSS_ROOTFS}")
-add_compile_options("--target=${TOOLCHAIN}")
-add_compile_options("--gcc-toolchain=${CROSS_ROOTFS}/usr")
if(TARGET_ARCH_NAME MATCHES "^(arm|armel|arm64)$")
set(CMAKE_C_COMPILER_TARGET ${TOOLCHAIN})
@@ -103,7 +84,7 @@ elseif(TARGET_ARCH_NAME STREQUAL "x86")
add_compile_options(-Wno-error=unused-command-line-argument)
endif()
-# Set LLDB include and library paths
+# Set LLDB include and library paths for builds that need lldb.
if(TARGET_ARCH_NAME MATCHES "^(arm|armel|x86)$")
if(TARGET_ARCH_NAME STREQUAL "x86")
set(LLVM_CROSS_DIR "$ENV{LLVM_CROSS_HOME}")
@@ -131,7 +112,7 @@ if(TARGET_ARCH_NAME MATCHES "^(arm|armel|x86)$")
endif()
endif()
-set(CMAKE_FIND_ROOT_PATH "${CROSS_ROOTFS}")
+
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
diff --git a/eng/common/darc-init.ps1 b/eng/common/darc-init.ps1
index 1bf15f435..5d7eaa5f9 100644
--- a/eng/common/darc-init.ps1
+++ b/eng/common/darc-init.ps1
@@ -1,7 +1,8 @@
param (
$darcVersion = $null,
$versionEndpoint = "https://maestro-prod.westus2.cloudapp.azure.com/api/assets/darc-version?api-version=2019-01-16",
- $verbosity = "m"
+ $verbosity = "m",
+ $toolpath = $null
)
. $PSScriptRoot\tools.ps1
@@ -27,7 +28,11 @@ function InstallDarcCli ($darcVersion) {
Write-Host "Installing Darc CLI version $darcVersion..."
Write-Host "You may need to restart your command window if this is the first dotnet tool you have installed."
- & "$dotnet" tool install $darcCliPackageName --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity -g
+ if (-not $toolpath) {
+ & "$dotnet" tool install $darcCliPackageName --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity -g
+ }else {
+ & "$dotnet" tool install $darcCliPackageName --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity --tool-path "$toolpath"
+ }
}
InstallDarcCli $darcVersion
diff --git a/eng/common/darc-init.sh b/eng/common/darc-init.sh
index 6c37281b8..82b2b5767 100755
--- a/eng/common/darc-init.sh
+++ b/eng/common/darc-init.sh
@@ -20,6 +20,10 @@ while [[ $# > 0 ]]; do
verbosity=$2
shift
;;
+ --toolpath)
+ toolpath=$2
+ shift
+ ;;
*)
echo "Invalid argument: $1"
usage
@@ -52,17 +56,27 @@ function InstallDarcCli {
InitializeDotNetCli
local dotnet_root=$_InitializeDotNetCli
- local uninstall_command=`$dotnet_root/dotnet tool uninstall $darc_cli_package_name -g`
- local tool_list=$($dotnet_root/dotnet tool list -g)
- if [[ $tool_list = *$darc_cli_package_name* ]]; then
- echo $($dotnet_root/dotnet tool uninstall $darc_cli_package_name -g)
+ if [ -z "$toolpath" ]; then
+ local tool_list=$($dotnet_root/dotnet tool list -g)
+ if [[ $tool_list = *$darc_cli_package_name* ]]; then
+ echo $($dotnet_root/dotnet tool uninstall $darc_cli_package_name -g)
+ fi
+ else
+ local tool_list=$($dotnet_root/dotnet tool list --tool-path "$toolpath")
+ if [[ $tool_list = *$darc_cli_package_name* ]]; then
+ echo $($dotnet_root/dotnet tool uninstall $darc_cli_package_name --tool-path "$toolpath")
+ fi
fi
local arcadeServicesSource="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json"
echo "Installing Darc CLI version $darcVersion..."
echo "You may need to restart your command shell if this is the first dotnet tool you have installed."
- echo $($dotnet_root/dotnet tool install $darc_cli_package_name --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity -g)
+ if [ -z "$toolpath" ]; then
+ echo $($dotnet_root/dotnet tool install $darc_cli_package_name --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity -g)
+ else
+ echo $($dotnet_root/dotnet tool install $darc_cli_package_name --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity --tool-path "$toolpath")
+ fi
}
InstallDarcCli
diff --git a/eng/common/dotnet-install.ps1 b/eng/common/dotnet-install.ps1
index 0b629b830..ec3e739fe 100644
--- a/eng/common/dotnet-install.ps1
+++ b/eng/common/dotnet-install.ps1
@@ -3,7 +3,9 @@ Param(
[string] $verbosity = "minimal",
[string] $architecture = "",
[string] $version = "Latest",
- [string] $runtime = "dotnet"
+ [string] $runtime = "dotnet",
+ [string] $RuntimeSourceFeed = "",
+ [string] $RuntimeSourceFeedKey = ""
)
. $PSScriptRoot\tools.ps1
@@ -15,7 +17,7 @@ try {
if ($architecture -and $architecture.Trim() -eq "x86") {
$installdir = Join-Path $installdir "x86"
}
- InstallDotNet $installdir $version $architecture $runtime $true
+ InstallDotNet $installdir $version $architecture $runtime $true -RuntimeSourceFeed $RuntimeSourceFeed -RuntimeSourceFeedKey $RuntimeSourceFeedKey
}
catch {
Write-Host $_
diff --git a/eng/common/dotnet-install.sh b/eng/common/dotnet-install.sh
index c3072c958..94ea34388 100755
--- a/eng/common/dotnet-install.sh
+++ b/eng/common/dotnet-install.sh
@@ -14,6 +14,8 @@ scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
version='Latest'
architecture=''
runtime='dotnet'
+runtimeSourceFeed=''
+runtimeSourceFeedKey=''
while [[ $# > 0 ]]; do
opt="$(echo "$1" | awk '{print tolower($0)}')"
case "$opt" in
@@ -29,18 +31,55 @@ while [[ $# > 0 ]]; do
shift
runtime="$1"
;;
+ -runtimesourcefeed)
+ shift
+ runtimeSourceFeed="$1"
+ ;;
+ -runtimesourcefeedkey)
+ shift
+ runtimeSourceFeedKey="$1"
+ ;;
*)
echo "Invalid argument: $1"
- usage
exit 1
;;
esac
shift
done
+# Use uname to determine what the CPU is.
+cpuname=$(uname -p)
+# Some Linux platforms report unknown for platform, but the arch for machine.
+if [[ "$cpuname" == "unknown" ]]; then
+ cpuname=$(uname -m)
+fi
+
+case $cpuname in
+ aarch64)
+ buildarch=arm64
+ ;;
+ amd64|x86_64)
+ buildarch=x64
+ ;;
+ armv7l)
+ buildarch=arm
+ ;;
+ i686)
+ buildarch=x86
+ ;;
+ *)
+ echo "Unknown CPU $cpuname detected, treating it as x64"
+ buildarch=x64
+ ;;
+esac
+
. "$scriptroot/tools.sh"
dotnetRoot="$repo_root/.dotnet"
-InstallDotNet $dotnetRoot $version "$architecture" $runtime true || {
+if [[ $architecture != "" ]] && [[ $architecture != $buildarch ]]; then
+ dotnetRoot="$dotnetRoot/$architecture"
+fi
+
+InstallDotNet $dotnetRoot $version "$architecture" $runtime true $runtimeSourceFeed $runtimeSourceFeedKey || {
local exit_code=$?
echo "dotnet-install.sh failed (exit code '$exit_code')." >&2
ExitWithExitCode $exit_code
diff --git a/eng/common/post-build/post-build-utils.ps1 b/eng/common/post-build/post-build-utils.ps1
index 551ae113f..aa9a025c0 100644
--- a/eng/common/post-build/post-build-utils.ps1
+++ b/eng/common/post-build/post-build-utils.ps1
@@ -8,6 +8,7 @@ Set-StrictMode -Version 2.0
# scripts don't necessarily execute in the same agent that run the
# build.ps1/sh script this variable isn't automatically set.
$ci = $true
+$disableConfigureToolsetImport = "true"
. $PSScriptRoot\..\tools.ps1
function Create-MaestroApiRequestHeaders([string]$ContentType = "application/json") {
diff --git a/eng/common/post-build/setup-maestro-vars.ps1 b/eng/common/post-build/setup-maestro-vars.ps1
deleted file mode 100644
index d7f64dc63..000000000
--- a/eng/common/post-build/setup-maestro-vars.ps1
+++ /dev/null
@@ -1,26 +0,0 @@
-param(
- [Parameter(Mandatory=$true)][string] $ReleaseConfigsPath # Full path to ReleaseConfigs.txt asset
-)
-
-. $PSScriptRoot\post-build-utils.ps1
-
-try {
- $Content = Get-Content $ReleaseConfigsPath
-
- $BarId = $Content | Select -Index 0
-
- $Channels = ""
- $Content | Select -Index 1 | ForEach-Object { $Channels += "$_ ," }
-
- $IsStableBuild = $Content | Select -Index 2
-
- Write-PipelineSetVariable -Name 'BARBuildId' -Value $BarId
- Write-PipelineSetVariable -Name 'InitialChannels' -Value "$Channels"
- Write-PipelineSetVariable -Name 'IsStableBuild' -Value $IsStableBuild
-}
-catch {
- Write-Host $_
- Write-Host $_.Exception
- Write-Host $_.ScriptStackTrace
- ExitWithExitCode 1
-}
diff --git a/eng/common/sdl/extract-artifact-packages.ps1 b/eng/common/sdl/extract-artifact-packages.ps1
index 6e6825013..d857ae219 100644
--- a/eng/common/sdl/extract-artifact-packages.ps1
+++ b/eng/common/sdl/extract-artifact-packages.ps1
@@ -10,6 +10,7 @@ Set-StrictMode -Version 2.0
# scripts don't necessarily execute in the same agent that run the
# build.ps1/sh script this variable isn't automatically set.
$ci = $true
+$disableConfigureToolsetImport = "true"
. $PSScriptRoot\..\tools.ps1
$ExtractPackage = {
diff --git a/eng/common/templates/job/execute-sdl.yml b/eng/common/templates/job/execute-sdl.yml
index 9a00430d6..2973bcaf3 100644
--- a/eng/common/templates/job/execute-sdl.yml
+++ b/eng/common/templates/job/execute-sdl.yml
@@ -6,6 +6,11 @@ parameters:
# This can also be remedied by the caller (post-build.yml) if it does not use a nested parameter
sdlContinueOnError: false # optional: determines whether to continue the build if the step errors;
dependsOn: '' # Optional: dependencies of the job
+ artifactNames: '' # Optional: patterns supplied to DownloadBuildArtifacts
+ # Usage:
+ # artifactNames:
+ # - 'BlobArtifacts'
+ # - 'Artifacts_Windows_NT_Release'
jobs:
- job: Run_SDL
@@ -18,13 +23,22 @@ jobs:
steps:
- checkout: self
clean: true
- - task: DownloadBuildArtifacts@0
- displayName: Download Build Artifacts
- inputs:
- buildType: current
- downloadType: specific files
- matchingPattern: "**"
- downloadPath: $(Build.ArtifactStagingDirectory)\artifacts
+ - ${{ if ne(parameters.artifactNames, '') }}:
+ - ${{ each artifactName in parameters.artifactNames }}:
+ - task: DownloadBuildArtifacts@0
+ displayName: Download Build Artifacts
+ inputs:
+ buildType: current
+ artifactName: ${{ artifactName }}
+ downloadPath: $(Build.ArtifactStagingDirectory)\artifacts
+ - ${{ if eq(parameters.artifactNames, '') }}:
+ - task: DownloadBuildArtifacts@0
+ displayName: Download Build Artifacts
+ inputs:
+ buildType: current
+ downloadType: specific files
+ itemPattern: "**"
+ downloadPath: $(Build.ArtifactStagingDirectory)\artifacts
- powershell: eng/common/sdl/extract-artifact-packages.ps1
-InputPath $(Build.ArtifactStagingDirectory)\artifacts\BlobArtifacts
-ExtractPath $(Build.ArtifactStagingDirectory)\artifacts\BlobArtifacts
diff --git a/eng/common/templates/job/job.yml b/eng/common/templates/job/job.yml
index 13dd40e26..ecebd0f03 100644
--- a/eng/common/templates/job/job.yml
+++ b/eng/common/templates/job/job.yml
@@ -17,7 +17,7 @@ parameters:
workspace: ''
# Job base template specific parameters
- # See schema documentation in /Documentation/AzureDevOps/TemplateSchema.md
+ # See schema documentation - https://github.com/dotnet/arcade/blob/master/Documentation/AzureDevOps/TemplateSchema.md
artifacts: ''
enableMicrobuild: false
enablePublishBuildArtifacts: false
diff --git a/eng/common/templates/post-build/channels/netcore-internal-30.yml b/eng/common/templates/post-build/channels/generic-internal-channel.yml
index 201ed570a..2ea807033 100644
--- a/eng/common/templates/post-build/channels/netcore-internal-30.yml
+++ b/eng/common/templates/post-build/channels/generic-internal-channel.yml
@@ -2,21 +2,28 @@ parameters:
artifactsPublishingAdditionalParameters: ''
dependsOn:
- Validate
+ publishInstallersAndChecksums: false
symbolPublishingAdditionalParameters: ''
+ stageName: ''
+ channelName: ''
+ channelId: ''
+ transportFeed: ''
+ shippingFeed: ''
+ symbolsFeed: ''
stages:
-- stage: NetCore_30_Internal_Servicing_Publishing
+- stage: ${{ parameters.stageName }}
dependsOn: ${{ parameters.dependsOn }}
variables:
- template: ../common-variables.yml
- displayName: .NET Core 3.0 Internal Servicing Publishing
+ displayName: ${{ parameters.channelName }} Publishing
jobs:
- template: ../setup-maestro-vars.yml
- - job:
+ - job: publish_symbols
displayName: Symbol Publishing
dependsOn: setupMaestroVars
- condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.InternalServicing_30_Channel_Id))
+ condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }} ))
variables:
- group: DotNet-Symbol-Server-Pats
pool:
@@ -57,19 +64,23 @@ stages:
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/'
/p:SymbolPublishingExclusionsFile='$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt'
/p:Configuration=Release
+ /p:PublishToMSDL=false
${{ parameters.symbolPublishingAdditionalParameters }}
+ - template: ../../steps/publish-logs.yml
+ parameters:
+ StageLabel: '${{ parameters.stageName }}'
+ JobLabel: 'SymbolPublishing'
+
- job: publish_assets
displayName: Publish Assets
dependsOn: setupMaestroVars
variables:
- - group: DotNet-Blob-Feed
- - group: AzureDevOps-Artifact-Feeds-Pats
- name: BARBuildId
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
- name: IsStableBuild
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ]
- condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.InternalServicing_30_Channel_Id))
+ condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }}))
pool:
vmImage: 'windows-2019'
steps:
@@ -78,12 +89,14 @@ stages:
inputs:
buildType: current
artifactName: PackageArtifacts
+ continueOnError: true
- task: DownloadBuildArtifacts@0
displayName: Download Blob Artifacts
inputs:
buildType: current
artifactName: BlobArtifacts
+ continueOnError: true
- task: DownloadBuildArtifacts@0
displayName: Download Asset Manifests
@@ -128,15 +141,20 @@ stages:
/p:ChecksumsAzureAccountKey=$(InternalChecksumsBlobFeedKey)
/p:InstallersTargetStaticFeed=$(InternalInstallersBlobFeedUrl)
/p:InstallersAzureAccountKey=$(InternalInstallersBlobFeedKey)
- /p:PublishToAzureDevOpsNuGetFeeds=true
- /p:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v3/index.json'
+ /p:AzureDevOpsStaticShippingFeed='${{ parameters.shippingFeed }}'
/p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
- /p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v3/index.json'
+ /p:AzureDevOpsStaticTransportFeed='${{ parameters.transportFeed }}'
/p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
- /p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-symbols/nuget/v3/index.json'
+ /p:AzureDevOpsStaticSymbolsFeed='${{ parameters.symbolsFeed }}'
/p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
+ /p:PublishToMSDL=false
${{ parameters.artifactsPublishingAdditionalParameters }}
+ - template: ../../steps/publish-logs.yml
+ parameters:
+ StageLabel: '${{ parameters.stageName }}'
+ JobLabel: 'AssetsPublishing'
+
- template: ../../steps/promote-build.yml
parameters:
- ChannelId: ${{ variables.InternalServicing_30_Channel_Id }}
+ ChannelId: ${{ parameters.channelId }}
diff --git a/eng/common/templates/post-build/channels/netcore-release-31.yml b/eng/common/templates/post-build/channels/generic-public-channel.yml
index 6270c8283..59b4765da 100644
--- a/eng/common/templates/post-build/channels/netcore-release-31.yml
+++ b/eng/common/templates/post-build/channels/generic-public-channel.yml
@@ -4,20 +4,26 @@ parameters:
- Validate
publishInstallersAndChecksums: false
symbolPublishingAdditionalParameters: ''
+ stageName: ''
+ channelName: ''
+ channelId: ''
+ transportFeed: ''
+ shippingFeed: ''
+ symbolsFeed: ''
stages:
-- stage: NetCore_Release31_Publish
+- stage: ${{ parameters.stageName }}
dependsOn: ${{ parameters.dependsOn }}
variables:
- template: ../common-variables.yml
- displayName: .NET Core 3.1 Release Publishing
+ displayName: ${{ parameters.channelName }} Publishing
jobs:
- template: ../setup-maestro-vars.yml
- - job:
+ - job: publish_symbols
displayName: Symbol Publishing
dependsOn: setupMaestroVars
- condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.PublicRelease_31_Channel_Id))
+ condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }} ))
variables:
- group: DotNet-Symbol-Server-Pats
pool:
@@ -35,6 +41,18 @@ stages:
artifactName: 'PDBArtifacts'
continueOnError: true
+ # This is necessary whenever we want to publish/restore to an AzDO private feed
+ # Since sdk-task.ps1 tries to restore packages we need to do this authentication here
+ # otherwise it'll complain about accessing a private feed.
+ - task: NuGetAuthenticate@0
+ displayName: 'Authenticate to AzDO Feeds'
+
+ - task: PowerShell@2
+ displayName: Enable cross-org publishing
+ inputs:
+ filePath: eng\common\enable-cross-org-publishing.ps1
+ arguments: -token $(dn-bot-dnceng-artifact-feeds-rw)
+
- task: PowerShell@2
displayName: Publish
inputs:
@@ -48,17 +66,21 @@ stages:
/p:Configuration=Release
${{ parameters.symbolPublishingAdditionalParameters }}
+ - template: ../../steps/publish-logs.yml
+ parameters:
+ StageLabel: '${{ parameters.stageName }}'
+ JobLabel: 'SymbolPublishing'
+
+
- job: publish_assets
displayName: Publish Assets
dependsOn: setupMaestroVars
variables:
- - group: DotNet-Blob-Feed
- - group: AzureDevOps-Artifact-Feeds-Pats
- name: BARBuildId
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
- name: IsStableBuild
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ]
- condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.PublicRelease_31_Channel_Id))
+ condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }}))
pool:
vmImage: 'windows-2019'
steps:
@@ -67,12 +89,14 @@ stages:
inputs:
buildType: current
artifactName: PackageArtifacts
+ continueOnError: true
- task: DownloadBuildArtifacts@0
displayName: Download Blob Artifacts
inputs:
buildType: current
artifactName: BlobArtifacts
+ continueOnError: true
- task: DownloadBuildArtifacts@0
displayName: Download Asset Manifests
@@ -118,15 +142,19 @@ stages:
/p:InstallersAzureAccountKey=$(dotnetcli-storage-key)
/p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl)
/p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key)
- /p:PublishToAzureDevOpsNuGetFeeds=true
- /p:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1/nuget/v3/index.json'
+ /p:AzureDevOpsStaticShippingFeed='${{ parameters.shippingFeed }}'
/p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
- /p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json'
+ /p:AzureDevOpsStaticTransportFeed='${{ parameters.transportFeed }}'
/p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
- /p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-symbols/nuget/v3/index.json'
+ /p:AzureDevOpsStaticSymbolsFeed='${{ parameters.symbolsFeed }}'
/p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
${{ parameters.artifactsPublishingAdditionalParameters }}
+ - template: ../../steps/publish-logs.yml
+ parameters:
+ StageLabel: '${{ parameters.stageName }}'
+ JobLabel: 'AssetsPublishing'
+
- template: ../../steps/promote-build.yml
parameters:
- ChannelId: ${{ variables.PublicRelease_31_Channel_Id }}
+ ChannelId: ${{ parameters.channelId }}
diff --git a/eng/common/templates/post-build/channels/netcore-dev-31.yml b/eng/common/templates/post-build/channels/netcore-dev-31.yml
deleted file mode 100644
index af64724f7..000000000
--- a/eng/common/templates/post-build/channels/netcore-dev-31.yml
+++ /dev/null
@@ -1,132 +0,0 @@
-parameters:
- artifactsPublishingAdditionalParameters: ''
- dependsOn:
- - Validate
- publishInstallersAndChecksums: false
- symbolPublishingAdditionalParameters: ''
-
-stages:
-- stage: NetCore_Dev31_Publish
- dependsOn: ${{ parameters.dependsOn }}
- variables:
- - template: ../common-variables.yml
- displayName: .NET Core 3.1 Dev Publishing
- jobs:
- - template: ../setup-maestro-vars.yml
-
- - job:
- displayName: Symbol Publishing
- dependsOn: setupMaestroVars
- condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.PublicDevRelease_31_Channel_Id))
- variables:
- - group: DotNet-Symbol-Server-Pats
- pool:
- vmImage: 'windows-2019'
- steps:
- - task: DownloadBuildArtifacts@0
- displayName: Download Blob Artifacts
- inputs:
- artifactName: 'BlobArtifacts'
- continueOnError: true
-
- - task: DownloadBuildArtifacts@0
- displayName: Download PDB Artifacts
- inputs:
- artifactName: 'PDBArtifacts'
- continueOnError: true
-
- - task: PowerShell@2
- displayName: Publish
- inputs:
- filePath: eng\common\sdk-task.ps1
- arguments: -task PublishToSymbolServers -restore -msbuildEngine dotnet
- /p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat)
- /p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat)
- /p:PDBArtifactsDirectory='$(Build.ArtifactStagingDirectory)/PDBArtifacts/'
- /p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/'
- /p:SymbolPublishingExclusionsFile='$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt'
- /p:Configuration=Release
- ${{ parameters.symbolPublishingAdditionalParameters }}
-
- - job: publish_assets
- displayName: Publish Assets
- dependsOn: setupMaestroVars
- variables:
- - group: DotNet-Blob-Feed
- - group: AzureDevOps-Artifact-Feeds-Pats
- - name: BARBuildId
- value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
- - name: IsStableBuild
- value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ]
- condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.PublicDevRelease_31_Channel_Id))
- pool:
- vmImage: 'windows-2019'
- steps:
- - task: DownloadBuildArtifacts@0
- displayName: Download Package Artifacts
- inputs:
- buildType: current
- artifactName: PackageArtifacts
-
- - task: DownloadBuildArtifacts@0
- displayName: Download Blob Artifacts
- inputs:
- buildType: current
- artifactName: BlobArtifacts
-
- - task: DownloadBuildArtifacts@0
- displayName: Download Asset Manifests
- inputs:
- buildType: current
- artifactName: AssetManifests
-
- - task: NuGetToolInstaller@1
- displayName: 'Install NuGet.exe'
-
- # This is necessary whenever we want to publish/restore to an AzDO private feed
- - task: NuGetAuthenticate@0
- displayName: 'Authenticate to AzDO Feeds'
-
- - task: PowerShell@2
- displayName: Enable cross-org publishing
- inputs:
- filePath: eng\common\enable-cross-org-publishing.ps1
- arguments: -token $(dn-bot-dnceng-artifact-feeds-rw)
-
- - task: PowerShell@2
- displayName: Publish Assets
- inputs:
- filePath: eng\common\sdk-task.ps1
- arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet
- /p:ArtifactsCategory=$(_DotNetArtifactsCategory)
- /p:IsStableBuild=$(IsStableBuild)
- /p:IsInternalBuild=$(IsInternalBuild)
- /p:RepositoryName=$(Build.Repository.Name)
- /p:CommitSha=$(Build.SourceVersion)
- /p:NugetPath=$(NuGetExeToolPath)
- /p:AzdoTargetFeedPAT='$(dn-bot-dnceng-universal-packages-rw)'
- /p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)'
- /p:BARBuildId=$(BARBuildId)
- /p:MaestroApiEndpoint='$(MaestroApiEndPoint)'
- /p:BuildAssetRegistryToken='$(MaestroApiAccessToken)'
- /p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/'
- /p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/'
- /p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/'
- /p:Configuration=Release
- /p:PublishInstallersAndChecksums=${{ parameters.publishInstallersAndChecksums }}
- /p:InstallersTargetStaticFeed=$(InstallersBlobFeedUrl)
- /p:InstallersAzureAccountKey=$(dotnetcli-storage-key)
- /p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl)
- /p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key)
- /p:PublishToAzureDevOpsNuGetFeeds=true
- /p:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1/nuget/v3/index.json'
- /p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
- /p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json'
- /p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
- /p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-symbols/nuget/v3/index.json'
- /p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
- ${{ parameters.artifactsPublishingAdditionalParameters }}
-
- - template: ../../steps/promote-build.yml
- parameters:
- ChannelId: ${{ variables.PublicDevRelease_31_Channel_Id }}
diff --git a/eng/common/templates/post-build/channels/netcore-dev-5.yml b/eng/common/templates/post-build/channels/netcore-dev-5.yml
deleted file mode 100644
index 6c8dff542..000000000
--- a/eng/common/templates/post-build/channels/netcore-dev-5.yml
+++ /dev/null
@@ -1,132 +0,0 @@
-parameters:
- artifactsPublishingAdditionalParameters: ''
- dependsOn:
- - Validate
- publishInstallersAndChecksums: false
- symbolPublishingAdditionalParameters: ''
-
-stages:
-- stage: NetCore_Dev5_Publish
- dependsOn: ${{ parameters.dependsOn }}
- variables:
- - template: ../common-variables.yml
- displayName: .NET Core 5 Dev Publishing
- jobs:
- - template: ../setup-maestro-vars.yml
-
- - job:
- displayName: Symbol Publishing
- dependsOn: setupMaestroVars
- condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.NetCore_5_Dev_Channel_Id))
- variables:
- - group: DotNet-Symbol-Server-Pats
- pool:
- vmImage: 'windows-2019'
- steps:
- - task: DownloadBuildArtifacts@0
- displayName: Download Blob Artifacts
- inputs:
- artifactName: 'BlobArtifacts'
- continueOnError: true
-
- - task: DownloadBuildArtifacts@0
- displayName: Download PDB Artifacts
- inputs:
- artifactName: 'PDBArtifacts'
- continueOnError: true
-
- - task: PowerShell@2
- displayName: Publish
- inputs:
- filePath: eng\common\sdk-task.ps1
- arguments: -task PublishToSymbolServers -restore -msbuildEngine dotnet
- /p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat)
- /p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat)
- /p:PDBArtifactsDirectory='$(Build.ArtifactStagingDirectory)/PDBArtifacts/'
- /p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/'
- /p:SymbolPublishingExclusionsFile='$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt'
- /p:Configuration=Release
- ${{ parameters.symbolPublishingAdditionalParameters }}
-
- - job: publish_assets
- displayName: Publish Assets
- dependsOn: setupMaestroVars
- variables:
- - group: DotNet-Blob-Feed
- - group: AzureDevOps-Artifact-Feeds-Pats
- - name: BARBuildId
- value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
- - name: IsStableBuild
- value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ]
- condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.NetCore_5_Dev_Channel_Id))
- pool:
- vmImage: 'windows-2019'
- steps:
- - task: DownloadBuildArtifacts@0
- displayName: Download Package Artifacts
- inputs:
- buildType: current
- artifactName: PackageArtifacts
-
- - task: DownloadBuildArtifacts@0
- displayName: Download Blob Artifacts
- inputs:
- buildType: current
- artifactName: BlobArtifacts
-
- - task: DownloadBuildArtifacts@0
- displayName: Download Asset Manifests
- inputs:
- buildType: current
- artifactName: AssetManifests
-
- - task: NuGetToolInstaller@1
- displayName: 'Install NuGet.exe'
-
- # This is necessary whenever we want to publish/restore to an AzDO private feed
- - task: NuGetAuthenticate@0
- displayName: 'Authenticate to AzDO Feeds'
-
- - task: PowerShell@2
- displayName: Enable cross-org publishing
- inputs:
- filePath: eng\common\enable-cross-org-publishing.ps1
- arguments: -token $(dn-bot-dnceng-artifact-feeds-rw)
-
- - task: PowerShell@2
- displayName: Publish Assets
- inputs:
- filePath: eng\common\sdk-task.ps1
- arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet
- /p:ArtifactsCategory=$(_DotNetArtifactsCategory)
- /p:IsStableBuild=$(IsStableBuild)
- /p:IsInternalBuild=$(IsInternalBuild)
- /p:RepositoryName=$(Build.Repository.Name)
- /p:CommitSha=$(Build.SourceVersion)
- /p:NugetPath=$(NuGetExeToolPath)
- /p:AzdoTargetFeedPAT='$(dn-bot-dnceng-universal-packages-rw)'
- /p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)'
- /p:BARBuildId=$(BARBuildId)
- /p:MaestroApiEndpoint='$(MaestroApiEndPoint)'
- /p:BuildAssetRegistryToken='$(MaestroApiAccessToken)'
- /p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/'
- /p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/'
- /p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/'
- /p:Configuration=Release
- /p:PublishInstallersAndChecksums=${{ parameters.publishInstallersAndChecksums }}
- /p:InstallersTargetStaticFeed=$(InstallersBlobFeedUrl)
- /p:InstallersAzureAccountKey=$(dotnetcli-storage-key)
- /p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl)
- /p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key)
- /p:PublishToAzureDevOpsNuGetFeeds=true
- /p:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json'
- /p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
- /p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-transport/nuget/v3/index.json'
- /p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
- /p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-symbols/nuget/v3/index.json'
- /p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
- ${{ parameters.artifactsPublishingAdditionalParameters }}
-
- - template: ../../steps/promote-build.yml
- parameters:
- ChannelId: ${{ variables.NetCore_5_Dev_Channel_Id }}
diff --git a/eng/common/templates/post-build/channels/netcore-release-30.yml b/eng/common/templates/post-build/channels/netcore-release-30.yml
deleted file mode 100644
index 206dd43e3..000000000
--- a/eng/common/templates/post-build/channels/netcore-release-30.yml
+++ /dev/null
@@ -1,132 +0,0 @@
-parameters:
- artifactsPublishingAdditionalParameters: ''
- dependsOn:
- - Validate
- publishInstallersAndChecksums: false
- symbolPublishingAdditionalParameters: ''
-
-stages:
-- stage: NetCore_Release30_Publish
- dependsOn: ${{ parameters.dependsOn }}
- variables:
- - template: ../common-variables.yml
- displayName: .NET Core 3.0 Release Publishing
- jobs:
- - template: ../setup-maestro-vars.yml
-
- - job:
- displayName: Symbol Publishing
- dependsOn: setupMaestroVars
- condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.PublicRelease_30_Channel_Id))
- variables:
- - group: DotNet-Symbol-Server-Pats
- pool:
- vmImage: 'windows-2019'
- steps:
- - task: DownloadBuildArtifacts@0
- displayName: Download Blob Artifacts
- inputs:
- artifactName: 'BlobArtifacts'
- continueOnError: true
-
- - task: DownloadBuildArtifacts@0
- displayName: Download PDB Artifacts
- inputs:
- artifactName: 'PDBArtifacts'
- continueOnError: true
-
- - task: PowerShell@2
- displayName: Publish
- inputs:
- filePath: eng\common\sdk-task.ps1
- arguments: -task PublishToSymbolServers -restore -msbuildEngine dotnet
- /p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat)
- /p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat)
- /p:PDBArtifactsDirectory='$(Build.ArtifactStagingDirectory)/PDBArtifacts/'
- /p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/'
- /p:SymbolPublishingExclusionsFile='$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt'
- /p:Configuration=Release
- ${{ parameters.symbolPublishingAdditionalParameters }}
-
- - job: publish_assets
- displayName: Publish Assets
- dependsOn: setupMaestroVars
- variables:
- - group: DotNet-Blob-Feed
- - group: AzureDevOps-Artifact-Feeds-Pats
- - name: BARBuildId
- value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
- - name: IsStableBuild
- value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ]
- condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.PublicRelease_30_Channel_Id))
- pool:
- vmImage: 'windows-2019'
- steps:
- - task: DownloadBuildArtifacts@0
- displayName: Download Package Artifacts
- inputs:
- buildType: current
- artifactName: PackageArtifacts
-
- - task: DownloadBuildArtifacts@0
- displayName: Download Blob Artifacts
- inputs:
- buildType: current
- artifactName: BlobArtifacts
-
- - task: DownloadBuildArtifacts@0
- displayName: Download Asset Manifests
- inputs:
- buildType: current
- artifactName: AssetManifests
-
- - task: NuGetToolInstaller@1
- displayName: 'Install NuGet.exe'
-
- # This is necessary whenever we want to publish/restore to an AzDO private feed
- - task: NuGetAuthenticate@0
- displayName: 'Authenticate to AzDO Feeds'
-
- - task: PowerShell@2
- displayName: Enable cross-org publishing
- inputs:
- filePath: eng\common\enable-cross-org-publishing.ps1
- arguments: -token $(dn-bot-dnceng-artifact-feeds-rw)
-
- - task: PowerShell@2
- displayName: Publish Assets
- inputs:
- filePath: eng\common\sdk-task.ps1
- arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet
- /p:ArtifactsCategory=$(_DotNetArtifactsCategory)
- /p:IsStableBuild=$(IsStableBuild)
- /p:IsInternalBuild=$(IsInternalBuild)
- /p:RepositoryName=$(Build.Repository.Name)
- /p:CommitSha=$(Build.SourceVersion)
- /p:NugetPath=$(NuGetExeToolPath)
- /p:AzdoTargetFeedPAT='$(dn-bot-dnceng-universal-packages-rw)'
- /p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)'
- /p:BARBuildId=$(BARBuildId)
- /p:MaestroApiEndpoint='$(MaestroApiEndPoint)'
- /p:BuildAssetRegistryToken='$(MaestroApiAccessToken)'
- /p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/'
- /p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/'
- /p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/'
- /p:Configuration=Release
- /p:PublishInstallersAndChecksums=${{ parameters.publishInstallersAndChecksums }}
- /p:InstallersTargetStaticFeed=$(InstallersBlobFeedUrl)
- /p:InstallersAzureAccountKey=$(dotnetcli-storage-key)
- /p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl)
- /p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key)
- /p:PublishToAzureDevOpsNuGetFeeds=true
- /p:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3/nuget/v3/index.json'
- /p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
- /p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3-transport/nuget/v3/index.json'
- /p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
- /p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3-symbols/nuget/v3/index.json'
- /p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
- ${{ parameters.artifactsPublishingAdditionalParameters }}
-
- - template: ../../steps/promote-build.yml
- parameters:
- ChannelId: ${{ variables.PublicRelease_30_Channel_Id }}
diff --git a/eng/common/templates/post-build/channels/netcore-tools-latest.yml b/eng/common/templates/post-build/channels/netcore-tools-latest.yml
deleted file mode 100644
index 9bf9626ca..000000000
--- a/eng/common/templates/post-build/channels/netcore-tools-latest.yml
+++ /dev/null
@@ -1,132 +0,0 @@
-parameters:
- artifactsPublishingAdditionalParameters: ''
- dependsOn:
- - Validate
- publishInstallersAndChecksums: false
- symbolPublishingAdditionalParameters: ''
-
-stages:
-- stage: NetCore_Tools_Latest_Publish
- dependsOn: ${{ parameters.dependsOn }}
- variables:
- - template: ../common-variables.yml
- displayName: .NET Tools - Latest Publishing
- jobs:
- - template: ../setup-maestro-vars.yml
-
- - job:
- displayName: Symbol Publishing
- dependsOn: setupMaestroVars
- condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.NetCore_Tools_Latest_Channel_Id))
- variables:
- - group: DotNet-Symbol-Server-Pats
- pool:
- vmImage: 'windows-2019'
- steps:
- - task: DownloadBuildArtifacts@0
- displayName: Download Blob Artifacts
- inputs:
- artifactName: 'BlobArtifacts'
- continueOnError: true
-
- - task: DownloadBuildArtifacts@0
- displayName: Download PDB Artifacts
- inputs:
- artifactName: 'PDBArtifacts'
- continueOnError: true
-
- - task: PowerShell@2
- displayName: Publish
- inputs:
- filePath: eng\common\sdk-task.ps1
- arguments: -task PublishToSymbolServers -restore -msbuildEngine dotnet
- /p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat)
- /p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat)
- /p:PDBArtifactsDirectory='$(Build.ArtifactStagingDirectory)/PDBArtifacts/'
- /p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/'
- /p:SymbolPublishingExclusionsFile='$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt'
- /p:Configuration=Release
- ${{ parameters.symbolPublishingAdditionalParameters }}
-
- - job: publish_assets
- displayName: Publish Assets
- dependsOn: setupMaestroVars
- variables:
- - group: DotNet-Blob-Feed
- - group: AzureDevOps-Artifact-Feeds-Pats
- - name: BARBuildId
- value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
- - name: IsStableBuild
- value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ]
- condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.NetCore_Tools_Latest_Channel_Id))
- pool:
- vmImage: 'windows-2019'
- steps:
- - task: DownloadBuildArtifacts@0
- displayName: Download Package Artifacts
- inputs:
- buildType: current
- artifactName: PackageArtifacts
-
- - task: DownloadBuildArtifacts@0
- displayName: Download Blob Artifacts
- inputs:
- buildType: current
- artifactName: BlobArtifacts
-
- - task: DownloadBuildArtifacts@0
- displayName: Download Asset Manifests
- inputs:
- buildType: current
- artifactName: AssetManifests
-
- - task: NuGetToolInstaller@1
- displayName: 'Install NuGet.exe'
-
- # This is necessary whenever we want to publish/restore to an AzDO private feed
- - task: NuGetAuthenticate@0
- displayName: 'Authenticate to AzDO Feeds'
-
- - task: PowerShell@2
- displayName: Enable cross-org publishing
- inputs:
- filePath: eng\common\enable-cross-org-publishing.ps1
- arguments: -token $(dn-bot-dnceng-artifact-feeds-rw)
-
- - task: PowerShell@2
- displayName: Publish Assets
- inputs:
- filePath: eng\common\sdk-task.ps1
- arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet
- /p:ArtifactsCategory=$(_DotNetArtifactsCategory)
- /p:IsStableBuild=$(IsStableBuild)
- /p:IsInternalBuild=$(IsInternalBuild)
- /p:RepositoryName=$(Build.Repository.Name)
- /p:CommitSha=$(Build.SourceVersion)
- /p:NugetPath=$(NuGetExeToolPath)
- /p:AzdoTargetFeedPAT='$(dn-bot-dnceng-universal-packages-rw)'
- /p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)'
- /p:BARBuildId=$(BARBuildId)
- /p:MaestroApiEndpoint='$(MaestroApiEndPoint)'
- /p:BuildAssetRegistryToken='$(MaestroApiAccessToken)'
- /p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/'
- /p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/'
- /p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/'
- /p:Configuration=Release
- /p:PublishInstallersAndChecksums=${{ parameters.publishInstallersAndChecksums }}
- /p:InstallersTargetStaticFeed=$(InstallersBlobFeedUrl)
- /p:InstallersAzureAccountKey=$(dotnetcli-storage-key)
- /p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl)
- /p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key)
- /p:PublishToAzureDevOpsNuGetFeeds=true
- /p:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json'
- /p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
- /p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json'
- /p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
- /p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-symbols/nuget/v3/index.json'
- /p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
- ${{ parameters.artifactsPublishingAdditionalParameters }}
-
- - template: ../../steps/promote-build.yml
- parameters:
- ChannelId: ${{ variables.NetCore_Tools_Latest_Channel_Id }} \ No newline at end of file
diff --git a/eng/common/templates/post-build/channels/public-validation-release.yml b/eng/common/templates/post-build/channels/public-validation-release.yml
deleted file mode 100644
index 5c8e91cce..000000000
--- a/eng/common/templates/post-build/channels/public-validation-release.yml
+++ /dev/null
@@ -1,97 +0,0 @@
-parameters:
- artifactsPublishingAdditionalParameters: ''
- dependsOn:
- - Validate
- publishInstallersAndChecksums: false
-
-stages:
-- stage: PVR_Publish
- dependsOn: ${{ parameters.dependsOn }}
- variables:
- - template: ../common-variables.yml
- displayName: .NET Tools - Validation Publishing
- jobs:
- - template: ../setup-maestro-vars.yml
-
- - job: publish_assets
- displayName: Publish Assets
- dependsOn: setupMaestroVars
- variables:
- - group: DotNet-Blob-Feed
- - group: AzureDevOps-Artifact-Feeds-Pats
- - name: BARBuildId
- value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
- - name: IsStableBuild
- value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ]
- condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.PublicValidationRelease_30_Channel_Id))
- pool:
- vmImage: 'windows-2019'
- steps:
- - task: DownloadBuildArtifacts@0
- displayName: Download Package Artifacts
- inputs:
- buildType: current
- artifactName: PackageArtifacts
-
- - task: DownloadBuildArtifacts@0
- displayName: Download Blob Artifacts
- inputs:
- buildType: current
- artifactName: BlobArtifacts
-
- - task: DownloadBuildArtifacts@0
- displayName: Download Asset Manifests
- inputs:
- buildType: current
- artifactName: AssetManifests
-
- - task: NuGetToolInstaller@1
- displayName: 'Install NuGet.exe'
-
- # This is necessary whenever we want to publish/restore to an AzDO private feed
- - task: NuGetAuthenticate@0
- displayName: 'Authenticate to AzDO Feeds'
-
- - task: PowerShell@2
- displayName: Enable cross-org publishing
- inputs:
- filePath: eng\common\enable-cross-org-publishing.ps1
- arguments: -token $(dn-bot-dnceng-artifact-feeds-rw)
-
- - task: PowerShell@2
- displayName: Publish Assets
- inputs:
- filePath: eng\common\sdk-task.ps1
- arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet
- /p:ArtifactsCategory=$(_DotNetValidationArtifactsCategory)
- /p:IsStableBuild=$(IsStableBuild)
- /p:IsInternalBuild=$(IsInternalBuild)
- /p:RepositoryName=$(Build.Repository.Name)
- /p:CommitSha=$(Build.SourceVersion)
- /p:NugetPath=$(NuGetExeToolPath)
- /p:AzdoTargetFeedPAT='$(dn-bot-dnceng-universal-packages-rw)'
- /p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)'
- /p:BARBuildId=$(BARBuildId)
- /p:MaestroApiEndpoint='$(MaestroApiEndPoint)'
- /p:BuildAssetRegistryToken='$(MaestroApiAccessToken)'
- /p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/'
- /p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/'
- /p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/'
- /p:Configuration=Release
- /p:PublishInstallersAndChecksums=${{ parameters.publishInstallersAndChecksums }}
- /p:InstallersTargetStaticFeed=$(InstallersBlobFeedUrl)
- /p:InstallersAzureAccountKey=$(dotnetcli-storage-key)
- /p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl)
- /p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key)
- /p:PublishToAzureDevOpsNuGetFeeds=true
- /p:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json'
- /p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
- /p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json'
- /p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
- /p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-symbols/nuget/v3/index.json'
- /p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
- ${{ parameters.artifactsPublishingAdditionalParameters }}
-
- - template: ../../steps/promote-build.yml
- parameters:
- ChannelId: ${{ variables.PublicValidationRelease_30_Channel_Id }}
diff --git a/eng/common/templates/post-build/common-variables.yml b/eng/common/templates/post-build/common-variables.yml
index 9ccc08b2c..0a2c40c10 100644
--- a/eng/common/templates/post-build/common-variables.yml
+++ b/eng/common/templates/post-build/common-variables.yml
@@ -1,7 +1,9 @@
variables:
- - group: Publish-Build-Assets
+ - group: AzureDevOps-Artifact-Feeds-Pats
+ - group: DotNet-Blob-Feed
- group: DotNet-DotNetCli-Storage
- group: DotNet-MSRC-Storage
+ - group: Publish-Build-Assets
# .NET Core 3.1 Dev
- name: PublicDevRelease_31_Channel_Id
@@ -12,13 +14,21 @@ variables:
value: 131
# .NET Tools - Validation
- - name: PublicValidationRelease_30_Channel_Id
+ - name: NetCore_Tools_Validation_Channel_Id
value: 9
# .NET Tools - Latest
- name: NetCore_Tools_Latest_Channel_Id
value: 2
+ # .NET 3 Tools - Validation
+ - name: NETCore_3_Tools_Validation_Channel_Id
+ value: 390
+
+ # .NET 3 Tools - Latest
+ - name: NetCore_3_Tools_Channel_Id
+ value: 344
+
# .NET Core 3.0 Internal Servicing
- name: InternalServicing_30_Channel_Id
value: 184
@@ -31,6 +41,14 @@ variables:
- name: PublicRelease_31_Channel_Id
value: 129
+ # General Testing
+ - name: GeneralTesting_Channel_Id
+ value: 529
+
+ # .NET Core 3.1 Blazor Features
+ - name: NetCore_31_Blazor_Features_Channel_Id
+ value: 531
+
# Whether the build is internal or not
- name: IsInternalBuild
value: ${{ and(ne(variables['System.TeamProject'], 'public'), contains(variables['Build.SourceBranch'], 'internal')) }}
diff --git a/eng/common/templates/post-build/post-build.yml b/eng/common/templates/post-build/post-build.yml
index 3f06b5d14..adedc70b8 100644
--- a/eng/common/templates/post-build/post-build.yml
+++ b/eng/common/templates/post-build/post-build.yml
@@ -8,6 +8,7 @@ parameters:
enable: false
continueOnError: false
params: ''
+ artifactNames: ''
# These parameters let the user customize the call to sdk-task.ps1 for publishing
# symbols & general artifacts as well as for signing validation
@@ -50,7 +51,6 @@ stages:
displayName: Signing Validation
variables:
- template: common-variables.yml
- - group: AzureDevOps-Artifact-Feeds-Pats
pool:
vmImage: 'windows-2019'
steps:
@@ -64,7 +64,6 @@ stages:
# Since sdk-task.ps1 tries to restore packages we need to do this authentication here
# otherwise it'll complain about accessing a private feed.
- task: NuGetAuthenticate@0
- condition: eq(variables['IsInternalBuild'], 'true')
displayName: 'Authenticate to AzDO Feeds'
- task: PowerShell@2
@@ -80,9 +79,13 @@ stages:
arguments: -task SigningValidation -restore -msbuildEngine dotnet
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts'
/p:SignCheckExclusionsFile='$(Build.SourcesDirectory)/eng/SignCheckExclusionsFile.txt'
- /p:Configuration=Release
${{ parameters.signingValidationAdditionalParameters }}
+ - template: ../steps/publish-logs.yml
+ parameters:
+ StageLabel: 'Validation'
+ JobLabel: 'Signing'
+
- ${{ if eq(parameters.enableSourceLinkValidation, 'true') }}:
- job:
displayName: SourceLink Validation
@@ -113,50 +116,173 @@ stages:
parameters:
additionalParameters: ${{ parameters.SDLValidationParameters.params }}
continueOnError: ${{ parameters.SDLValidationParameters.continueOnError }}
+ artifactNames: ${{ parameters.SDLValidationParameters.artifactNames }}
+
+- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
+ parameters:
+ artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
+ dependsOn: ${{ parameters.publishDependsOn }}
+ publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
+ symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
+ stageName: 'NetCore_Dev5_Publish'
+ channelName: '.NET Core 5 Dev'
+ channelId: 131
+ transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-transport/nuget/v3/index.json'
+ shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json'
+ symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-symbols/nuget/v3/index.json'
+
+- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
+ parameters:
+ artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
+ dependsOn: ${{ parameters.publishDependsOn }}
+ publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
+ symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
+ stageName: 'NetCore_Dev31_Publish'
+ channelName: '.NET Core 3.1 Dev'
+ channelId: 128
+ transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json'
+ shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1/nuget/v3/index.json'
+ symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-symbols/nuget/v3/index.json'
+
+- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
+ parameters:
+ artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
+ dependsOn: ${{ parameters.publishDependsOn }}
+ publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
+ symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
+ stageName: 'NetCore_Tools_Latest_Publish'
+ channelName: '.NET Tools - Latest'
+ channelId: 2
+ transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
+ shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
+ symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json'
-- template: \eng\common\templates\post-build\channels\netcore-dev-5.yml
+- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
parameters:
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
dependsOn: ${{ parameters.publishDependsOn }}
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
+ stageName: 'PVR_Publish'
+ channelName: '.NET Tools - Validation'
+ channelId: 9
+ transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
+ shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
+ symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json'
-- template: \eng\common\templates\post-build\channels\netcore-dev-31.yml
+- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
parameters:
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
dependsOn: ${{ parameters.publishDependsOn }}
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
+ stageName: 'NetCore_3_Tools_Validation_Publish'
+ channelName: '.NET 3 Tools - Validation'
+ channelId: 390
+ transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
+ shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
+ symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json'
-- template: \eng\common\templates\post-build\channels\netcore-tools-latest.yml
+- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
parameters:
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
dependsOn: ${{ parameters.publishDependsOn }}
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
+ stageName: 'NetCore_3_Tools_Publish'
+ channelName: '.NET 3 Tools'
+ channelId: 344
+ transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
+ shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
+ symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json'
-- template: \eng\common\templates\post-build\channels\public-validation-release.yml
+- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
parameters:
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
dependsOn: ${{ parameters.publishDependsOn }}
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
+ symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
+ stageName: 'NetCore_Release30_Publish'
+ channelName: '.NET Core 3.0 Release'
+ channelId: 19
+ transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3-transport/nuget/v3/index.json'
+ shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3/nuget/v3/index.json'
+ symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3-symbols/nuget/v3/index.json'
-- template: \eng\common\templates\post-build\channels\netcore-release-30.yml
+- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
parameters:
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
dependsOn: ${{ parameters.publishDependsOn }}
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
+ stageName: 'NetCore_Release31_Publish'
+ channelName: '.NET Core 3.1 Release'
+ channelId: 129
+ transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json'
+ shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1/nuget/v3/index.json'
+ symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-symbols/nuget/v3/index.json'
-- template: \eng\common\templates\post-build\channels\netcore-release-31.yml
+- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
parameters:
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
dependsOn: ${{ parameters.publishDependsOn }}
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
+ stageName: 'NetCore_Blazor31_Features_Publish'
+ channelName: '.NET Core 3.1 Blazor Features'
+ channelId: 531
+ transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-blazor/nuget/v3/index.json'
+ shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-blazor/nuget/v3/index.json'
+ symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-blazor-symbols/nuget/v3/index.json'
-- template: \eng\common\templates\post-build\channels\netcore-internal-30.yml
+- template: \eng\common\templates\post-build\channels\generic-internal-channel.yml
parameters:
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
dependsOn: ${{ parameters.publishDependsOn }}
+ publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
+ symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
+ stageName: 'NetCore_30_Internal_Servicing_Publishing'
+ channelName: '.NET Core 3.0 Internal Servicing'
+ channelId: 184
+ transportFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v3/index.json'
+ shippingFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v3/index.json'
+ symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-symbols/nuget/v3/index.json'
+
+- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
+ parameters:
+ artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
+ dependsOn: ${{ parameters.publishDependsOn }}
+ publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
+ symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
+ stageName: 'General_Testing_Publish'
+ channelName: 'General Testing'
+ channelId: 529
+ transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/general-testing/nuget/v3/index.json'
+ shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/general-testing/nuget/v3/index.json'
+ symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/general-testing-symbols/nuget/v3/index.json'
+
+- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
+ parameters:
+ artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
+ dependsOn: ${{ parameters.publishDependsOn }}
+ publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
+ symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
+ stageName: 'NETCore_Tooling_Dev_Publishing'
+ channelName: '.NET Core Tooling Dev'
+ channelId: 548
+ transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json'
+ shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json'
+ symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-symbols/nuget/v3/index.json'
+
+- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
+ parameters:
+ artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
+ dependsOn: ${{ parameters.publishDependsOn }}
+ publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
+ stageName: 'NETCore_Tooling_Release_Publishing'
+ channelName: '.NET Core Tooling Release'
+ channelId: 549
+ transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json'
+ shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json'
+ symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-symbols/nuget/v3/index.json'
diff --git a/eng/common/templates/post-build/setup-maestro-vars.yml b/eng/common/templates/post-build/setup-maestro-vars.yml
index 56242b068..716b53f74 100644
--- a/eng/common/templates/post-build/setup-maestro-vars.yml
+++ b/eng/common/templates/post-build/setup-maestro-vars.yml
@@ -4,6 +4,8 @@ jobs:
pool:
vmImage: 'windows-2019'
steps:
+ - checkout: none
+
- task: DownloadBuildArtifacts@0
displayName: Download Release Configs
inputs:
@@ -14,5 +16,25 @@ jobs:
name: setReleaseVars
displayName: Set Release Configs Vars
inputs:
- filePath: $(Build.SourcesDirectory)/eng/common/post-build/setup-maestro-vars.ps1
- arguments: -ReleaseConfigsPath '$(Build.StagingDirectory)/ReleaseConfigs/ReleaseConfigs.txt'
+ targetType: inline
+ script: |
+ try {
+ $Content = Get-Content $(Build.StagingDirectory)/ReleaseConfigs/ReleaseConfigs.txt
+
+ $BarId = $Content | Select -Index 0
+
+ $Channels = ""
+ $Content | Select -Index 1 | ForEach-Object { $Channels += "$_ ," }
+
+ $IsStableBuild = $Content | Select -Index 2
+
+ Write-Host "##vso[task.setvariable variable=BARBuildId;isOutput=true]$BarId"
+ Write-Host "##vso[task.setvariable variable=InitialChannels;isOutput=true]$Channels"
+ Write-Host "##vso[task.setvariable variable=IsStableBuild;isOutput=true]$IsStableBuild"
+ }
+ catch {
+ Write-Host $_
+ Write-Host $_.Exception
+ Write-Host $_.ScriptStackTrace
+ exit 1
+ }
diff --git a/eng/common/templates/steps/publish-logs.yml b/eng/common/templates/steps/publish-logs.yml
new file mode 100644
index 000000000..8903ba57c
--- /dev/null
+++ b/eng/common/templates/steps/publish-logs.yml
@@ -0,0 +1,23 @@
+parameters:
+ StageLabel: ''
+ JobLabel: ''
+
+steps:
+- task: Powershell@2
+ displayName: Prepare Binlogs to Upload
+ inputs:
+ targetType: inline
+ script: |
+ New-Item -ItemType Directory $(Build.SourcesDirectory)/PostBuildLogs/${{parameters.StageLabel}}/${{parameters.JobLabel}}/
+ Move-Item -Path $(Build.SourcesDirectory)/artifacts/log/Debug/* $(Build.SourcesDirectory)/PostBuildLogs/${{parameters.StageLabel}}/${{parameters.JobLabel}}/
+ continueOnError: true
+ condition: always()
+
+- task: PublishBuildArtifacts@1
+ displayName: Publish Logs
+ inputs:
+ PathtoPublish: '$(Build.SourcesDirectory)/PostBuildLogs'
+ PublishLocation: Container
+ ArtifactName: PostBuilLogs
+ continueOnError: true
+ condition: always()
diff --git a/eng/common/templates/steps/send-to-helix.yml b/eng/common/templates/steps/send-to-helix.yml
index 05df886f5..30becf01e 100644
--- a/eng/common/templates/steps/send-to-helix.yml
+++ b/eng/common/templates/steps/send-to-helix.yml
@@ -23,6 +23,7 @@ parameters:
EnableXUnitReporter: false # optional -- true enables XUnit result reporting to Mission Control
WaitForWorkItemCompletion: true # optional -- true will make the task wait until work items have been completed and fail the build if work items fail. False is "fire and forget."
IsExternal: false # [DEPRECATED] -- doesn't do anything, jobs are external if HelixAccessToken is empty and Creator is set
+ HelixBaseUri: 'https://helix.dot.net/' # optional -- sets the Helix API base URI (allows targeting int)
Creator: '' # optional -- if the build is external, use this to specify who is sending the job
DisplayNamePrefix: 'Run Tests' # optional -- rename the beginning of the displayName of the steps in AzDO
condition: succeeded() # optional -- condition for step to execute; defaults to succeeded()
@@ -55,6 +56,7 @@ steps:
DotNetCliVersion: ${{ parameters.DotNetCliVersion }}
EnableXUnitReporter: ${{ parameters.EnableXUnitReporter }}
WaitForWorkItemCompletion: ${{ parameters.WaitForWorkItemCompletion }}
+ HelixBaseUri: ${{ parameters.HelixBaseUri }}
Creator: ${{ parameters.Creator }}
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
condition: and(${{ parameters.condition }}, eq(variables['Agent.Os'], 'Windows_NT'))
@@ -85,6 +87,7 @@ steps:
DotNetCliVersion: ${{ parameters.DotNetCliVersion }}
EnableXUnitReporter: ${{ parameters.EnableXUnitReporter }}
WaitForWorkItemCompletion: ${{ parameters.WaitForWorkItemCompletion }}
+ HelixBaseUri: ${{ parameters.HelixBaseUri }}
Creator: ${{ parameters.Creator }}
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
condition: and(${{ parameters.condition }}, ne(variables['Agent.Os'], 'Windows_NT'))
diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1
index 5c94bd78d..42ca33ac3 100644
--- a/eng/common/tools.ps1
+++ b/eng/common/tools.ps1
@@ -49,6 +49,8 @@
# An array of names of processes to stop on script exit if prepareMachine is true.
$processesToStopOnExit = if (Test-Path variable:processesToStopOnExit) { $processesToStopOnExit } else { @("msbuild", "dotnet", "vbcscompiler") }
+$disableConfigureToolsetImport = if (Test-Path variable:disableConfigureToolsetImport) { $disableConfigureToolsetImport } else { $null }
+
set-strictmode -version 2.0
$ErrorActionPreference = "Stop"
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
@@ -175,7 +177,14 @@ function InstallDotNetSdk([string] $dotnetRoot, [string] $version, [string] $arc
InstallDotNet $dotnetRoot $version $architecture
}
-function InstallDotNet([string] $dotnetRoot, [string] $version, [string] $architecture = "", [string] $runtime = "", [bool] $skipNonVersionedFiles = $false) {
+function InstallDotNet([string] $dotnetRoot,
+ [string] $version,
+ [string] $architecture = "",
+ [string] $runtime = "",
+ [bool] $skipNonVersionedFiles = $false,
+ [string] $runtimeSourceFeed = "",
+ [string] $runtimeSourceFeedKey = "") {
+
$installScript = GetDotNetInstallScript $dotnetRoot
$installParameters = @{
Version = $version
@@ -186,10 +195,29 @@ function InstallDotNet([string] $dotnetRoot, [string] $version, [string] $archit
if ($runtime) { $installParameters.Runtime = $runtime }
if ($skipNonVersionedFiles) { $installParameters.SkipNonVersionedFiles = $skipNonVersionedFiles }
- & $installScript @installParameters
- if ($lastExitCode -ne 0) {
- Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Failed to install dotnet cli (exit code '$lastExitCode')."
- ExitWithExitCode $lastExitCode
+ try {
+ & $installScript @installParameters
+ }
+ catch {
+ Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Failed to install dotnet runtime '$runtime' from public location."
+
+ # Only the runtime can be installed from a custom [private] location.
+ if ($runtime -and ($runtimeSourceFeed -or $runtimeSourceFeedKey)) {
+ if ($runtimeSourceFeed) { $installParameters.AzureFeed = $runtimeSourceFeed }
+
+ if ($runtimeSourceFeedKey) {
+ $decodedBytes = [System.Convert]::FromBase64String($runtimeSourceFeedKey)
+ $decodedString = [System.Text.Encoding]::UTF8.GetString($decodedBytes)
+ $installParameters.FeedCredential = $decodedString
+ }
+
+ try {
+ & $installScript @installParameters
+ }
+ catch {
+ Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Failed to install dotnet runtime '$runtime' from custom location '$runtimeSourceFeed'."
+ }
+ }
}
}
@@ -418,7 +446,7 @@ function GetSdkTaskProject([string]$taskName) {
}
function InitializeNativeTools() {
- if (Get-Member -InputObject $GlobalJson -Name "native-tools") {
+ if (-Not (Test-Path variable:DisableNativeToolsetInstalls) -And (Get-Member -InputObject $GlobalJson -Name "native-tools")) {
$nativeArgs= @{}
if ($ci) {
$nativeArgs = @{
@@ -599,3 +627,12 @@ Write-PipelineSetVariable -Name 'Artifacts.Toolset' -Value $ToolsetDir
Write-PipelineSetVariable -Name 'Artifacts.Log' -Value $LogDir
Write-PipelineSetVariable -Name 'TEMP' -Value $TempDir
Write-PipelineSetVariable -Name 'TMP' -Value $TempDir
+
+# Import custom tools configuration, if present in the repo.
+# Note: Import in global scope so that the script set top-level variables without qualification.
+if (!$disableConfigureToolsetImport) {
+ $configureToolsetScript = Join-Path $EngRoot "configure-toolset.ps1"
+ if (Test-Path $configureToolsetScript) {
+ . $configureToolsetScript
+ }
+}
diff --git a/eng/common/tools.sh b/eng/common/tools.sh
index 895ad2442..6a23ac0a3 100755
--- a/eng/common/tools.sh
+++ b/eng/common/tools.sh
@@ -4,6 +4,7 @@
# CI mode - set to true on CI server for PR validation build or official build.
ci=${ci:-false}
+disable_configure_toolset_import=${disable_configure_toolset_import:-}
# Set to true to use the pipelines logger which will enable Azure logging output.
# https://github.com/Microsoft/azure-pipelines-tasks/blob/master/docs/authoring/commands.md
@@ -191,8 +192,28 @@ function InstallDotNet {
fi
bash "$install_script" --version $version --install-dir "$root" $archArg $runtimeArg $skipNonVersionedFilesArg || {
local exit_code=$?
- Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to install dotnet SDK (exit code '$exit_code')."
- ExitWithExitCode $exit_code
+ Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to install dotnet SDK from public location (exit code '$exit_code')."
+
+ if [[ -n "$runtimeArg" ]]; then
+ local runtimeSourceFeed=''
+ if [[ -n "${6:-}" ]]; then
+ runtimeSourceFeed="--azure-feed $6"
+ fi
+
+ local runtimeSourceFeedKey=''
+ if [[ -n "${7:-}" ]]; then
+ decodedFeedKey=`echo $7 | base64 --decode`
+ runtimeSourceFeedKey="--feed-credential $decodedFeedKey"
+ fi
+
+ if [[ -n "$runtimeSourceFeed" || -n "$runtimeSourceFeedKey" ]]; then
+ bash "$install_script" --version $version --install-dir "$root" $archArg $runtimeArg $skipNonVersionedFilesArg $runtimeSourceFeed $runtimeSourceFeedKey || {
+ local exit_code=$?
+ Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to install dotnet SDK from custom location '$runtimeSourceFeed' (exit code '$exit_code')."
+ ExitWithExitCode $exit_code
+ }
+ fi
+ fi
}
}
@@ -252,6 +273,9 @@ function GetNuGetPackageCachePath {
}
function InitializeNativeTools() {
+ if [[ -n "${DisableNativeToolsetInstalls:-}" ]]; then
+ return
+ fi
if grep -Fq "native-tools" $global_json_file
then
local nativeArgs=""
@@ -411,3 +435,18 @@ Write-PipelineSetVariable -name "Artifacts.Toolset" -value "$toolset_dir"
Write-PipelineSetVariable -name "Artifacts.Log" -value "$log_dir"
Write-PipelineSetVariable -name "Temp" -value "$temp_dir"
Write-PipelineSetVariable -name "TMP" -value "$temp_dir"
+
+# Import custom tools configuration, if present in the repo.
+if [[ -z "$disable_configure_toolset_import" ]]; then
+ configure_toolset_script="$eng_root/configure-toolset.sh"
+ if [[ -a "$configure_toolset_script" ]]; then
+ . "$configure_toolset_script"
+ fi
+fi
+
+# TODO: https://github.com/dotnet/arcade/issues/1468
+# Temporary workaround to avoid breaking change.
+# Remove once repos are updated.
+if [[ -n "${useInstalledDotNetCli:-}" ]]; then
+ use_installed_dotnet_cli="$useInstalledDotNetCli"
+fi