diff --git a/.vsts-ci.yml b/.vsts-ci.yml
index 06e7588923..b82d120b0f 100644
--- a/.vsts-ci.yml
+++ b/.vsts-ci.yml
@@ -10,6 +10,7 @@ trigger:
branches:
include:
- main
+ - release/*
pr:
autoCancel: false
@@ -94,6 +95,7 @@ stages:
- script: eng\common\cibuild.cmd
-configuration $(_BuildConfig)
-prepareMachine
+ -msbuildEngine dotnet
$(_BuildArgs)
displayName: Build and Publish
- task: PublishBuildArtifacts@1
diff --git a/build.cmd b/build.cmd
index 5dca62a2a5..f0bb763d1b 100644
--- a/build.cmd
+++ b/build.cmd
@@ -1,3 +1,3 @@
@echo off
-powershell -NoLogo -NoProfile -ExecutionPolicy ByPass %~dp0eng\common\build.ps1 -build -restore %*
+powershell -NoLogo -NoProfile -ExecutionPolicy ByPass %~dp0eng\common\build.ps1 -build -restore -msbuildEngine dotnet %*
exit /b %ErrorLevel%
diff --git a/docs/src/Binding/Binding.csproj b/docs/src/Binding/Binding.csproj
index e0f271acf4..b24eeb3877 100644
--- a/docs/src/Binding/Binding.csproj
+++ b/docs/src/Binding/Binding.csproj
@@ -2,7 +2,7 @@
Exe
- net5.0
+ net6.0
9
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 6ca4714942..5fbcea9c03 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -3,9 +3,9 @@
-
+
https://github.com/dotnet/arcade
- 0ca849f0b71866b007fedaaa938cee63f8d056a6
+ e6abc186425e675e0f201acc1c33e183a0e51c86
diff --git a/eng/common/build.sh b/eng/common/build.sh
index 55b298f16c..252b63604e 100755
--- a/eng/common/build.sh
+++ b/eng/common/build.sh
@@ -81,7 +81,7 @@ runtime_source_feed_key=''
properties=''
while [[ $# > 0 ]]; do
- opt="$(echo "${1/#--/-}" | tr "[:upper:]" "[:lower:]")"
+ opt="$(echo "${1/#--/-}" | awk '{print tolower($0)}')"
case "$opt" in
-help|-h)
usage
diff --git a/eng/common/cross/armel/tizen-fetch.sh b/eng/common/cross/armel/tizen-fetch.sh
index 64f0187e5a..2776cbba4e 100644
--- a/eng/common/cross/armel/tizen-fetch.sh
+++ b/eng/common/cross/armel/tizen-fetch.sh
@@ -157,7 +157,7 @@ fetch_tizen_pkgs()
Inform "Initialize arm base"
fetch_tizen_pkgs_init standard base
Inform "fetch common packages"
-fetch_tizen_pkgs armv7l gcc gcc-devel-static glibc glibc-devel libicu libicu-devel libatomic linux-glibc-devel keyutils keyutils-devel libkeyutils
+fetch_tizen_pkgs armv7l gcc glibc glibc-devel libicu libicu-devel libatomic linux-glibc-devel
Inform "fetch coreclr packages"
fetch_tizen_pkgs armv7l lldb lldb-devel libgcc libstdc++ libstdc++-devel libunwind libunwind-devel lttng-ust-devel lttng-ust userspace-rcu-devel userspace-rcu
Inform "fetch corefx packages"
diff --git a/eng/common/cross/build-android-rootfs.sh b/eng/common/cross/build-android-rootfs.sh
index 42516bbeeb..e7f12edb56 100644
--- a/eng/common/cross/build-android-rootfs.sh
+++ b/eng/common/cross/build-android-rootfs.sh
@@ -27,7 +27,7 @@ __AndroidToolchain=aarch64-linux-android
for i in "$@"
do
- lowerI="$(echo $i | tr "[:upper:]" "[:lower:]")"
+ lowerI="$(echo $i | awk '{print tolower($0)}')"
case $lowerI in
-?|-h|--help)
usage
diff --git a/eng/common/cross/build-rootfs.sh b/eng/common/cross/build-rootfs.sh
index b26622444f..6d59e181c8 100644
--- a/eng/common/cross/build-rootfs.sh
+++ b/eng/common/cross/build-rootfs.sh
@@ -6,7 +6,7 @@ usage()
{
echo "Usage: $0 [BuildArch] [CodeName] [lldbx.y] [--skipunmount] --rootfsdir ]"
echo "BuildArch can be: arm(default), armel, arm64, x86"
- echo "CodeName - optional, Code name for Linux, can be: trusty, xenial(default), zesty, bionic, alpine, alpine3.9 or alpine3.13. If BuildArch is armel, LinuxCodeName is jessie(default) or tizen."
+ echo "CodeName - optional, Code name for Linux, can be: trusty, xenial(default), zesty, bionic, alpine. If BuildArch is armel, LinuxCodeName is jessie(default) or tizen."
echo " for FreeBSD can be: freebsd11 or freebsd12."
echo " for illumos can be: illumos."
echo "lldbx.y - optional, LLDB version, can be: lldb3.9(default), lldb4.0, lldb5.0, lldb6.0 no-lldb. Ignored for alpine and FReeBSD"
@@ -82,7 +82,7 @@ while :; do
break
fi
- lowerI="$(echo $1 | tr "[:upper:]" "[:lower:]")"
+ lowerI="$(echo $1 | awk '{print tolower($0)}')"
case $lowerI in
-?|-h|--help)
usage
@@ -183,20 +183,9 @@ while :; do
__UbuntuRepo=
__Tizen=tizen
;;
- alpine|alpine3.9)
+ alpine)
__CodeName=alpine
__UbuntuRepo=
- __AlpineVersion=3.9
- ;;
- alpine3.13)
- __CodeName=alpine
- __UbuntuRepo=
- __AlpineVersion=3.13
- # Alpine 3.13 has all the packages we need in the 3.13 repository
- __AlpinePackages+=$__AlpinePackagesEdgeCommunity
- __AlpinePackagesEdgeCommunity=
- __AlpinePackages+=$__AlpinePackagesEdgeMain
- __AlpinePackagesEdgeMain=
;;
freebsd11)
__FreeBSDBase="11.3-RELEASE"
@@ -254,6 +243,7 @@ __RootfsDir="$( cd "$__RootfsDir" && pwd )"
if [[ "$__CodeName" == "alpine" ]]; then
__ApkToolsVersion=2.9.1
+ __AlpineVersion=3.9
__ApkToolsDir=$(mktemp -d)
wget https://github.com/alpinelinux/apk-tools/releases/download/v$__ApkToolsVersion/apk-tools-$__ApkToolsVersion-x86_64-linux.tar.gz -P $__ApkToolsDir
tar -xf $__ApkToolsDir/apk-tools-$__ApkToolsVersion-x86_64-linux.tar.gz -C $__ApkToolsDir
@@ -266,19 +256,15 @@ if [[ "$__CodeName" == "alpine" ]]; then
-U --allow-untrusted --root $__RootfsDir --arch $__AlpineArch --initdb \
add $__AlpinePackages
- if [[ -n "$__AlpinePackagesEdgeMain" ]]; then
- $__ApkToolsDir/apk-tools-$__ApkToolsVersion/apk \
- -X http://dl-cdn.alpinelinux.org/alpine/edge/main \
- -U --allow-untrusted --root $__RootfsDir --arch $__AlpineArch --initdb \
- add $__AlpinePackagesEdgeMain
- fi
+ $__ApkToolsDir/apk-tools-$__ApkToolsVersion/apk \
+ -X http://dl-cdn.alpinelinux.org/alpine/edge/main \
+ -U --allow-untrusted --root $__RootfsDir --arch $__AlpineArch --initdb \
+ add $__AlpinePackagesEdgeMain
- if [[ -n "$__AlpinePackagesEdgeCommunity" ]]; then
- $__ApkToolsDir/apk-tools-$__ApkToolsVersion/apk \
- -X http://dl-cdn.alpinelinux.org/alpine/edge/community \
- -U --allow-untrusted --root $__RootfsDir --arch $__AlpineArch --initdb \
- add $__AlpinePackagesEdgeCommunity
- fi
+ $__ApkToolsDir/apk-tools-$__ApkToolsVersion/apk \
+ -X http://dl-cdn.alpinelinux.org/alpine/edge/community \
+ -U --allow-untrusted --root $__RootfsDir --arch $__AlpineArch --initdb \
+ add $__AlpinePackagesEdgeCommunity
rm -r $__ApkToolsDir
elif [[ "$__CodeName" == "freebsd" ]]; then
diff --git a/eng/common/darc-init.sh b/eng/common/darc-init.sh
index 39abdbecdc..d981d7bbf3 100755
--- a/eng/common/darc-init.sh
+++ b/eng/common/darc-init.sh
@@ -6,7 +6,7 @@ versionEndpoint='https://maestro-prod.westus2.cloudapp.azure.com/api/assets/darc
verbosity='minimal'
while [[ $# > 0 ]]; do
- opt="$(echo "$1" | tr "[:upper:]" "[:lower:]")"
+ opt="$(echo "$1" | awk '{print tolower($0)}')"
case "$opt" in
--darcversion)
darcVersion=$2
diff --git a/eng/common/dotnet-install.sh b/eng/common/dotnet-install.sh
index d6efeb4434..ead6a1d9a2 100755
--- a/eng/common/dotnet-install.sh
+++ b/eng/common/dotnet-install.sh
@@ -19,7 +19,7 @@ runtime='dotnet'
runtimeSourceFeed=''
runtimeSourceFeedKey=''
while [[ $# > 0 ]]; do
- opt="$(echo "$1" | tr "[:upper:]" "[:lower:]")"
+ opt="$(echo "$1" | awk '{print tolower($0)}')"
case "$opt" in
-version|-v)
shift
@@ -49,8 +49,13 @@ while [[ $# > 0 ]]; do
shift
done
-# Use uname to determine what the CPU is, see https://en.wikipedia.org/wiki/Uname#Examples
-cpuname=$(uname -m)
+# 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
diff --git a/eng/common/generate-locproject.ps1 b/eng/common/generate-locproject.ps1
deleted file mode 100644
index 9e2f7ad98b..0000000000
--- a/eng/common/generate-locproject.ps1
+++ /dev/null
@@ -1,101 +0,0 @@
-Param(
- [Parameter(Mandatory=$true)][string] $SourcesDirectory, # Directory where source files live; if using a Localize directory it should live in here
- [string] $LanguageSet = 'VS_Main_Languages', # Language set to be used in the LocProject.json
- [switch] $UseCheckedInLocProjectJson, # When set, generates a LocProject.json and compares it to one that already exists in the repo; otherwise just generates one
- [switch] $CreateNeutralXlfs # Creates neutral xlf files. Only set to false when running locally
-)
-
-# Generates LocProject.json files for the OneLocBuild task. OneLocBuildTask is described here:
-# https://ceapex.visualstudio.com/CEINTL/_wiki/wikis/CEINTL.wiki/107/Localization-with-OneLocBuild-Task
-
-Set-StrictMode -Version 2.0
-$ErrorActionPreference = "Stop"
-. $PSScriptRoot\tools.ps1
-
-Import-Module -Name (Join-Path $PSScriptRoot 'native\CommonLibrary.psm1')
-
-$exclusionsFilePath = "$SourcesDirectory\Localize\LocExclusions.json"
-$exclusions = @{ Exclusions = @() }
-if (Test-Path -Path $exclusionsFilePath)
-{
- $exclusions = Get-Content "$exclusionsFilePath" | ConvertFrom-Json
-}
-
-Push-Location "$SourcesDirectory" # push location for Resolve-Path -Relative to work
-
-# Template files
-$jsonFiles = @()
-$jsonFiles += Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "\.template\.config\\localize\\en\..+\.json" } # .NET templating pattern
-$jsonFiles += Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "en\\strings\.json" } # current winforms pattern
-
-$xlfFiles = @()
-
-$allXlfFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory\*\*.xlf"
-$langXlfFiles = @()
-if ($allXlfFiles) {
- $null = $allXlfFiles[0].FullName -Match "\.([\w-]+)\.xlf" # matches '[langcode].xlf'
- $firstLangCode = $Matches.1
- $langXlfFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory\*\*.$firstLangCode.xlf"
-}
-$langXlfFiles | ForEach-Object {
- $null = $_.Name -Match "([^.]+)\.[\w-]+\.xlf" # matches '[filename].[langcode].xlf'
-
- $destinationFile = "$($_.Directory.FullName)\$($Matches.1).xlf"
- $xlfFiles += Copy-Item "$($_.FullName)" -Destination $destinationFile -PassThru
-}
-
-$locFiles = $jsonFiles + $xlfFiles
-
-$locJson = @{
- Projects = @(
- @{
- LanguageSet = $LanguageSet
- LocItems = @(
- $locFiles | ForEach-Object {
- $outputPath = "Localize\$(($_.DirectoryName | Resolve-Path -Relative) + "\")"
- $continue = $true
- foreach ($exclusion in $exclusions.Exclusions) {
- if ($outputPath.Contains($exclusion))
- {
- $continue = $false
- }
- }
- $sourceFile = ($_.FullName | Resolve-Path -Relative)
- if (!$CreateNeutralXlfs -and $_.Extension -eq '.xlf') {
- Remove-Item -Path $sourceFile
- }
- if ($continue)
- {
- return @{
- SourceFile = $sourceFile
- CopyOption = "LangIDOnName"
- OutputPath = $outputPath
- }
- }
- }
- )
- }
- )
-}
-
-$json = ConvertTo-Json $locJson -Depth 5
-Write-Host "(NETCORE_ENGINEERING_TELEMETRY=Build) LocProject.json generated:`n`n$json`n`n"
-Pop-Location
-
-if (!$UseCheckedInLocProjectJson) {
- New-Item "$SourcesDirectory\Localize\LocProject.json" -Force # Need this to make sure the Localize directory is created
- Set-Content "$SourcesDirectory\Localize\LocProject.json" $json
-}
-else {
- New-Item "$SourcesDirectory\Localize\LocProject-generated.json" -Force # Need this to make sure the Localize directory is created
- Set-Content "$SourcesDirectory\Localize\LocProject-generated.json" $json
-
- if ((Get-FileHash "$SourcesDirectory\Localize\LocProject-generated.json").Hash -ne (Get-FileHash "$SourcesDirectory\Localize\LocProject.json").Hash) {
- Write-PipelineTaskError -Type "warning" -Message "Existing LocProject.json differs from generated LocProject.json. Download LocProject-generated.json and compare them."
-
- exit 1
- }
- else {
- Write-Host "Generated LocProject.json and current LocProject.json are identical."
- }
-}
\ No newline at end of file
diff --git a/eng/common/init-tools-native.sh b/eng/common/init-tools-native.sh
index 5bd205b5da..29fc5db8ae 100644
--- a/eng/common/init-tools-native.sh
+++ b/eng/common/init-tools-native.sh
@@ -16,7 +16,7 @@ declare -A native_assets
. $scriptroot/native/common-library.sh
while (($# > 0)); do
- lowerI="$(echo $1 | tr "[:upper:]" "[:lower:]")"
+ lowerI="$(echo $1 | awk '{print tolower($0)}')"
case $lowerI in
--baseuri)
base_uri=$2
@@ -76,89 +76,24 @@ while (($# > 0)); do
done
function ReadGlobalJsonNativeTools {
- # happy path: we have a proper JSON parsing tool `jq(1)` in PATH!
- if command -v jq &> /dev/null; then
-
- # jq: read each key/value pair under "native-tools" entry and emit:
- # KEY="" VALUE=""
- # followed by a null byte.
- #
- # bash: read line with null byte delimeter and push to array (for later `eval`uation).
-
- while IFS= read -rd '' line; do
- native_assets+=("$line")
- done < <(jq -r '. |
- select(has("native-tools")) |
- ."native-tools" |
- keys[] as $k |
- @sh "KEY=\($k) VALUE=\(.[$k])\u0000"' "$global_json_file")
-
- return
- fi
-
- # Warning: falling back to manually parsing JSON, which is not recommended.
-
- # Following routine matches the output and escaping logic of jq(1)'s @sh formatter used above.
- # It has been tested with several weird strings with escaped characters in entries (key and value)
- # and results were compared with the output of jq(1) in binary representation using xxd(1);
- # just before the assignment to 'native_assets' array (above and below).
-
- # try to capture the section under "native-tools".
- if [[ ! "$(cat "$global_json_file")" =~ \"native-tools\"[[:space:]\:\{]*([^\}]+) ]]; then
- return
- fi
-
- section="${BASH_REMATCH[1]}"
-
- parseStarted=0
- possibleEnd=0
- escaping=0
- escaped=0
- isKey=1
-
- for (( i=0; i<${#section}; i++ )); do
- char="${section:$i:1}"
- if ! ((parseStarted)) && [[ "$char" =~ [[:space:],:] ]]; then continue; fi
-
- if ! ((escaping)) && [[ "$char" == "\\" ]]; then
- escaping=1
- elif ((escaping)) && ! ((escaped)); then
- escaped=1
- fi
-
- if ! ((parseStarted)) && [[ "$char" == "\"" ]]; then
- parseStarted=1
- possibleEnd=0
- elif [[ "$char" == "'" ]]; then
- token="$token'\\\''"
- possibleEnd=0
- elif ((escaping)) || [[ "$char" != "\"" ]]; then
- token="$token$char"
- possibleEnd=1
- fi
-
- if ((possibleEnd)) && ! ((escaping)) && [[ "$char" == "\"" ]]; then
- # Use printf to unescape token to match jq(1)'s @sh formatting rules.
- # do not use 'token="$(printf "$token")"' syntax, as $() eats the trailing linefeed.
- printf -v token "'$token'"
-
- if ((isKey)); then
- KEY="$token"
- isKey=0
- else
- line="KEY=$KEY VALUE=$token"
- native_assets+=("$line")
- isKey=1
- fi
-
- # reset for next token
- parseStarted=0
- token=
- elif ((escaping)) && ((escaped)); then
- escaping=0
- escaped=0
- fi
- done
+ # Get the native-tools section from the global.json.
+ local native_tools_section=$(cat $global_json_file | awk '/"native-tools"/,/}/')
+ # Only extract the contents of the object.
+ local native_tools_list=$(echo $native_tools_section | awk -F"[{}]" '{print $2}')
+ native_tools_list=${native_tools_list//[\" ]/}
+ native_tools_list=$( echo "$native_tools_list" | sed 's/\s//g' | sed 's/,/\n/g' )
+
+ local old_IFS=$IFS
+ while read -r line; do
+ # Lines are of the form: 'tool:version'
+ IFS=:
+ while read -r key value; do
+ native_assets[$key]=$value
+ done <<< "$line"
+ done <<< "$native_tools_list"
+ IFS=$old_IFS
+
+ return 0;
}
native_base_dir=$install_directory
@@ -176,14 +111,14 @@ if [[ ${#native_assets[@]} -eq 0 ]]; then
exit 0;
else
native_installer_dir="$scriptroot/native"
- for index in "${!native_assets[@]}"; do
- eval "${native_assets["$index"]}"
-
- installer_path="$native_installer_dir/install-$KEY.sh"
+ for tool in "${!native_assets[@]}"
+ do
+ tool_version=${native_assets[$tool]}
+ installer_path="$native_installer_dir/install-$tool.sh"
installer_command="$installer_path"
installer_command+=" --baseuri $base_uri"
installer_command+=" --installpath $install_bin"
- installer_command+=" --version $VALUE"
+ installer_command+=" --version $tool_version"
echo $installer_command
if [[ $force = true ]]; then
diff --git a/eng/common/internal-feed-operations.ps1 b/eng/common/internal-feed-operations.ps1
index 418c09930c..b8f6529fdc 100644
--- a/eng/common/internal-feed-operations.ps1
+++ b/eng/common/internal-feed-operations.ps1
@@ -63,6 +63,8 @@ function SetupCredProvider {
}
if (($endpoints | Measure-Object).Count -gt 0) {
+ # [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Endpoint code example with no real credentials.")]
+ # Create the JSON object. It should look like '{"endpointCredentials": [{"endpoint":"http://example.index.json", "username":"optional", "password":"accesstoken"}]}'
$endpointCredentials = @{endpointCredentials=$endpoints} | ConvertTo-Json -Compress
# Create the environment variables the AzDo way
diff --git a/eng/common/internal-feed-operations.sh b/eng/common/internal-feed-operations.sh
index e2233e7812..9ed225e7e5 100644
--- a/eng/common/internal-feed-operations.sh
+++ b/eng/common/internal-feed-operations.sh
@@ -62,6 +62,8 @@ function SetupCredProvider {
endpoints+=']'
if [ ${#endpoints} -gt 2 ]; then
+ # [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Endpoint code example with no real credentials.")]
+ # Create the JSON object. It should look like '{"endpointCredentials": [{"endpoint":"http://example.index.json", "username":"optional", "password":"accesstoken"}]}'
local endpointCredentials="{\"endpointCredentials\": "$endpoints"}"
echo "##vso[task.setvariable variable=VSS_NUGET_EXTERNAL_FEED_ENDPOINTS]$endpointCredentials"
@@ -101,7 +103,7 @@ authToken=''
repoName=''
while [[ $# > 0 ]]; do
- opt="$(echo "$1" | tr "[:upper:]" "[:lower:]")"
+ opt="$(echo "$1" | awk '{print tolower($0)}')"
case "$opt" in
--operation)
operation=$2
diff --git a/eng/common/msbuild.sh b/eng/common/msbuild.sh
index 20d3dad543..8160cd5a59 100755
--- a/eng/common/msbuild.sh
+++ b/eng/common/msbuild.sh
@@ -19,7 +19,7 @@ prepare_machine=false
extra_args=''
while (($# > 0)); do
- lowerI="$(echo $1 | tr "[:upper:]" "[:lower:]")"
+ lowerI="$(echo $1 | awk '{print tolower($0)}')"
case $lowerI in
--verbosity)
verbosity=$2
diff --git a/eng/common/native/install-cmake-test.sh b/eng/common/native/install-cmake-test.sh
index 8a5e7cf0db..12339a4076 100644
--- a/eng/common/native/install-cmake-test.sh
+++ b/eng/common/native/install-cmake-test.sh
@@ -14,7 +14,7 @@ download_retries=5
retry_wait_time_seconds=30
while (($# > 0)); do
- lowerI="$(echo $1 | tr "[:upper:]" "[:lower:]")"
+ lowerI="$(echo $1 | awk '{print tolower($0)}')"
case $lowerI in
--baseuri)
base_uri=$2
@@ -63,7 +63,7 @@ done
tool_name="cmake-test"
tool_os=$(GetCurrentOS)
-tool_folder="$(echo $tool_os | tr "[:upper:]" "[:lower:]")"
+tool_folder=$(echo $tool_os | awk '{print tolower($0)}')
tool_arch="x86_64"
tool_name_moniker="$tool_name-$version-$tool_os-$tool_arch"
tool_install_directory="$install_path/$tool_name/$version"
@@ -114,4 +114,4 @@ if [[ $? != 0 ]]; then
exit 1
fi
-exit 0
+exit 0
\ No newline at end of file
diff --git a/eng/common/native/install-cmake.sh b/eng/common/native/install-cmake.sh
index de496beebc..18041be876 100644
--- a/eng/common/native/install-cmake.sh
+++ b/eng/common/native/install-cmake.sh
@@ -14,7 +14,7 @@ download_retries=5
retry_wait_time_seconds=30
while (($# > 0)); do
- lowerI="$(echo $1 | tr "[:upper:]" "[:lower:]")"
+ lowerI="$(echo $1 | awk '{print tolower($0)}')"
case $lowerI in
--baseuri)
base_uri=$2
@@ -63,7 +63,7 @@ done
tool_name="cmake"
tool_os=$(GetCurrentOS)
-tool_folder="$(echo $tool_os | tr "[:upper:]" "[:lower:]")"
+tool_folder=$(echo $tool_os | awk '{print tolower($0)}')
tool_arch="x86_64"
tool_name_moniker="$tool_name-$version-$tool_os-$tool_arch"
tool_install_directory="$install_path/$tool_name/$version"
@@ -114,4 +114,4 @@ if [[ $? != 0 ]]; then
exit 1
fi
-exit 0
+exit 0
\ No newline at end of file
diff --git a/eng/common/native/install-tool.ps1 b/eng/common/native/install-tool.ps1
index 78f2d84a4e..f397e1c75d 100644
--- a/eng/common/native/install-tool.ps1
+++ b/eng/common/native/install-tool.ps1
@@ -105,7 +105,7 @@ try {
Write-Error "There are multiple copies of $ToolName in $($ToolInstallDirectory): `n$(@($ToolFilePath | out-string))"
exit 1
} elseif (@($ToolFilePath).Length -Lt 1) {
- Write-Host "$ToolName was not found in $ToolInstallDirectory."
+ Write-Host "$ToolName was not found in $ToolFilePath."
exit 1
}
diff --git a/eng/common/performance/performance-setup.ps1 b/eng/common/performance/performance-setup.ps1
index 9a64b07e69..0edb2ae276 100644
--- a/eng/common/performance/performance-setup.ps1
+++ b/eng/common/performance/performance-setup.ps1
@@ -18,8 +18,7 @@ Param(
[switch] $Internal,
[switch] $Compare,
[string] $MonoDotnet="",
- [string] $Configurations="CompilationMode=$CompilationMode RunKind=$Kind",
- [string] $LogicalMachine=""
+ [string] $Configurations="CompilationMode=$CompilationMode RunKind=$Kind"
)
$RunFromPerformanceRepo = ($Repository -eq "dotnet/performance") -or ($Repository -eq "dotnet-performance")
@@ -34,23 +33,26 @@ $Creator = $env:BUILD_DEFINITIONNAME
$PerfLabArguments = ""
$HelixSourcePrefix = "pr"
-$Queue = ""
+$Queue = "Windows.10.Amd64.ClientRS4.DevEx.15.8.Open"
+
+# TODO: Implement a better logic to determine if Framework is .NET Core or >= .NET 5.
+if ($Framework.StartsWith("netcoreapp") -or ($Framework -eq "net5.0")) {
+ $Queue = "Windows.10.Amd64.ClientRS5.Open"
+}
+
+if ($Compare) {
+ $Queue = "Windows.10.Amd64.19H1.Tiger.Perf.Open"
+ $PerfLabArguments = ""
+ $ExtraBenchmarkDotNetArguments = ""
+}
if ($Internal) {
- switch ($LogicalMachine) {
- "perftiger" { $Queue = "Windows.10.Amd64.19H1.Tiger.Perf" }
- "perfowl" { $Queue = "Windows.10.Amd64.20H2.Owl.Perf" }
- "perfsurf" { $Queue = "Windows.10.Arm64.Perf.Surf" }
- Default { $Queue = "Windows.10.Amd64.19H1.Tiger.Perf" }
- }
+ $Queue = "Windows.10.Amd64.19H1.Tiger.Perf"
$PerfLabArguments = "--upload-to-perflab-container"
$ExtraBenchmarkDotNetArguments = ""
$Creator = ""
$HelixSourcePrefix = "official"
}
-else {
- $Queue = "Windows.10.Amd64.ClientRS4.DevEx.15.8.Open"
-}
if($MonoInterpreter)
{
@@ -77,6 +79,14 @@ $CommonSetupArguments="--channel master --queue $Queue --build-number $BuildNumb
$SetupArguments = "--repository https://github.com/$Repository --branch $Branch --get-perf-hash --commit-sha $CommitSha $CommonSetupArguments"
+#This grabs the LKG version number of dotnet and passes it to our scripts
+$VersionJSON = Get-Content global.json | ConvertFrom-Json
+$DotNetVersion = $VersionJSON.tools.dotnet
+# TODO: Change this back to parsing when we have a good story for dealing with TFM changes or when the LKG in runtime gets updated to include net6.0
+# $SetupArguments = "--dotnet-versions $DotNetVersion $SetupArguments"
+$SetupArguments = "--dotnet-versions 6.0.100-alpha.1.20553.6 $SetupArguments"
+
+
if ($RunFromPerformanceRepo) {
$SetupArguments = "--perf-hash $CommitSha $CommonSetupArguments"
diff --git a/eng/common/performance/performance-setup.sh b/eng/common/performance/performance-setup.sh
index 33b60b5033..c8e211bcb1 100644
--- a/eng/common/performance/performance-setup.sh
+++ b/eng/common/performance/performance-setup.sh
@@ -27,10 +27,9 @@ using_mono=false
wasm_runtime_loc=
using_wasm=false
use_latest_dotnet=false
-logical_machine=
while (($# > 0)); do
- lowerI="$(echo $1 | tr "[:upper:]" "[:lower:]")"
+ lowerI="$(echo $1 | awk '{print tolower($0)}')"
case $lowerI in
--sourcedirectory)
source_directory=$2
@@ -56,10 +55,6 @@ while (($# > 0)); do
compilation_mode=$2
shift 2
;;
- --logicalmachine)
- logical_machine=$2
- shift 2
- ;;
--repository)
repository=$2
shift 2
@@ -93,10 +88,6 @@ while (($# > 0)); do
internal=true
shift 1
;;
- --alpine)
- alpine=true
- shift 1
- ;;
--llvm)
llvm=true
shift 1
@@ -152,7 +143,6 @@ while (($# > 0)); do
echo " --monodotnet Pass the path to the mono dotnet for mono performance testing."
echo " --wasm Path to the unpacked wasm runtime pack."
echo " --latestdotnet --dotnet-versions will not be specified. --dotnet-versions defaults to LKG version in global.json "
- echo " --alpine Set for runs on Alpine"
echo ""
exit 0
;;
@@ -184,6 +174,19 @@ queue=Ubuntu.1804.Amd64.Open
creator=$BUILD_DEFINITIONNAME
helix_source_prefix="pr"
+if [[ "$compare" == true ]]; then
+ extra_benchmark_dotnet_arguments=
+ perflab_arguments=
+
+ # No open queues for arm64
+ if [[ "$architecture" = "arm64" ]]; then
+ echo "Compare not available for arm64"
+ exit 1
+ fi
+
+ queue=Ubuntu.1804.Amd64.Tiger.Perf.Open
+fi
+
if [[ "$internal" == true ]]; then
perflab_arguments="--upload-to-perflab-container"
helix_source_prefix="official"
@@ -193,15 +196,7 @@ if [[ "$internal" == true ]]; then
if [[ "$architecture" = "arm64" ]]; then
queue=Ubuntu.1804.Arm64.Perf
else
- if [[ "$logical_machine" = "perfowl" ]]; then
- queue=Ubuntu.1804.Amd64.Owl.Perf
- else
- queue=Ubuntu.1804.Amd64.Tiger.Perf
- fi
- fi
-
- if [[ "$alpine" = "true" ]]; then
- queue=alpine.amd64.tiger.perf
+ queue=Ubuntu.1804.Amd64.Tiger.Perf
fi
else
if [[ "$architecture" = "arm64" ]]; then
@@ -209,10 +204,6 @@ else
else
queue=Ubuntu.1804.Amd64.Open
fi
-
- if [[ "$alpine" = "true" ]]; then
- queue=alpine.amd64.tiger.perf
- fi
fi
if [[ "$mono_dotnet" != "" ]] && [[ "$monointerpreter" == "false" ]]; then
@@ -233,6 +224,16 @@ fi
common_setup_arguments="--channel master --queue $queue --build-number $build_number --build-configs $configurations --architecture $architecture"
setup_arguments="--repository https://github.com/$repository --branch $branch --get-perf-hash --commit-sha $commit_sha $common_setup_arguments"
+
+if [[ "$use_latest_dotnet" = false ]]; then
+ # Get the tools section from the global.json.
+ # This grabs the LKG version number of dotnet and passes it to our scripts
+ dotnet_version=`cat global.json | python3 -c 'import json,sys;obj=json.load(sys.stdin);print(obj["tools"]["dotnet"])'`
+ # TODO: Change this back to parsing when we have a good story for dealing with TFM changes or when the LKG in runtime gets updated to include net6.0
+ # setup_arguments="--dotnet-versions $dotnet_version $setup_arguments"
+ setup_arguments="--dotnet-versions 6.0.100-alpha.1.20553.6 $setup_arguments"
+fi
+
if [[ "$run_from_perf_repo" = true ]]; then
payload_directory=
workitem_directory=$source_directory
diff --git a/eng/common/pipeline-logging-functions.sh b/eng/common/pipeline-logging-functions.sh
index 6a0b2255e9..da5a7e6129 100644
--- a/eng/common/pipeline-logging-functions.sh
+++ b/eng/common/pipeline-logging-functions.sh
@@ -6,7 +6,7 @@ function Write-PipelineTelemetryError {
local function_args=()
local message=''
while [[ $# -gt 0 ]]; do
- opt="$(echo "${1/#--/-}" | tr "[:upper:]" "[:lower:]")"
+ opt="$(echo "${1/#--/-}" | awk '{print tolower($0)}')"
case "$opt" in
-category|-c)
telemetry_category=$2
@@ -48,7 +48,7 @@ function Write-PipelineTaskError {
local force=false
while [[ $# -gt 0 ]]; do
- opt="$(echo "${1/#--/-}" | tr "[:upper:]" "[:lower:]")"
+ opt="$(echo "${1/#--/-}" | awk '{print tolower($0)}')"
case "$opt" in
-type|-t)
message_type=$2
@@ -122,7 +122,7 @@ function Write-PipelineSetVariable {
local is_multi_job_variable=true
while [[ $# -gt 0 ]]; do
- opt="$(echo "${1/#--/-}" | tr "[:upper:]" "[:lower:]")"
+ opt="$(echo "${1/#--/-}" | awk '{print tolower($0)}')"
case "$opt" in
-name|-n)
name=$2
@@ -164,7 +164,7 @@ function Write-PipelinePrependPath {
local prepend_path=''
while [[ $# -gt 0 ]]; do
- opt="$(echo "${1/#--/-}" | tr "[:upper:]" "[:lower:]")"
+ opt="$(echo "${1/#--/-}" | awk '{print tolower($0)}')"
case "$opt" in
-path|-p)
prepend_path=$2
@@ -186,7 +186,7 @@ function Write-PipelineSetResult {
local message=''
while [[ $# -gt 0 ]]; do
- opt="$(echo "${1/#--/-}" | tr "[:upper:]" "[:lower:]")"
+ opt="$(echo "${1/#--/-}" | awk '{print tolower($0)}')"
case "$opt" in
-result|-r)
result=$2
diff --git a/eng/common/post-build/publish-using-darc.ps1 b/eng/common/post-build/publish-using-darc.ps1
index 2427ca6b6a..6b68ee8472 100644
--- a/eng/common/post-build/publish-using-darc.ps1
+++ b/eng/common/post-build/publish-using-darc.ps1
@@ -16,8 +16,8 @@ param(
try {
. $PSScriptRoot\post-build-utils.ps1
-
- $darc = Get-Darc
+ # Hard coding darc version till the next arcade-services roll out, cos this version has required API changes for darc add-build-to-channel
+ $darc = Get-Darc "1.1.0-beta.20418.1"
$optionalParams = [System.Collections.ArrayList]::new()
@@ -60,7 +60,7 @@ try {
--id $buildId `
--publishing-infra-version $PublishingInfraVersion `
--default-channels `
- --source-branch main `
+ --source-branch master `
--azdev-pat $AzdoToken `
--bar-uri $MaestroApiEndPoint `
--password $MaestroToken `
diff --git a/eng/common/sdl/execute-all-sdl-tools.ps1 b/eng/common/sdl/execute-all-sdl-tools.ps1
index 81b729f74a..b681d797cd 100644
--- a/eng/common/sdl/execute-all-sdl-tools.ps1
+++ b/eng/common/sdl/execute-all-sdl-tools.ps1
@@ -87,6 +87,10 @@ try {
& $(Join-Path $PSScriptRoot 'run-sdl.ps1') -GuardianCliLocation $guardianCliLocation -WorkingDirectory $workingDirectory -TargetDirectory $SourceDirectory -GdnFolder $gdnFolder -ToolsList $SourceToolsList -AzureDevOpsAccessToken $AzureDevOpsAccessToken -UpdateBaseline $UpdateBaseline -GuardianLoggerLevel $GuardianLoggerLevel -CrScanAdditionalRunConfigParams $CrScanAdditionalRunConfigParams -PoliCheckAdditionalRunConfigParams $PoliCheckAdditionalRunConfigParams
}
+ if ($UpdateBaseline) {
+ & (Join-Path $PSScriptRoot 'push-gdn.ps1') -Repository $RepoName -BranchName $BranchName -GdnFolder $GdnFolder -AzureDevOpsAccessToken $AzureDevOpsAccessToken -PushReason 'Update baseline'
+ }
+
if ($TsaPublish) {
if ($TsaBranchName -and $BuildNumber) {
if (-not $TsaRepositoryName) {
diff --git a/eng/common/sdl/init-sdl.ps1 b/eng/common/sdl/init-sdl.ps1
index 1fe9271193..a68bf0b88e 100644
--- a/eng/common/sdl/init-sdl.ps1
+++ b/eng/common/sdl/init-sdl.ps1
@@ -29,7 +29,18 @@ $zipFile = "$WorkingDirectory/gdn.zip"
Add-Type -AssemblyName System.IO.Compression.FileSystem
$gdnFolder = (Join-Path $WorkingDirectory '.gdn')
-
+try {
+ # We try to download the zip; if the request fails (e.g. the file doesn't exist), we catch it and init guardian instead
+ Write-Host 'Downloading gdn folder from internal config repostiory...'
+ Invoke-WebRequest -Headers @{ "Accept"="application/zip"; "Authorization"="Basic $encodedPat" } -Uri $uri -OutFile $zipFile
+ if (Test-Path $gdnFolder) {
+ # Remove the gdn folder if it exists (it shouldn't unless there's too much caching; this is just in case)
+ Remove-Item -Force -Recurse $gdnFolder
+ }
+ [System.IO.Compression.ZipFile]::ExtractToDirectory($zipFile, $WorkingDirectory)
+ Write-Host $gdnFolder
+ ExitWithExitCode 0
+} catch [System.Net.WebException] { } # Catch and ignore webexception
try {
# if the folder does not exist, we'll do a guardian init and push it to the remote repository
Write-Host 'Initializing Guardian...'
@@ -46,6 +57,7 @@ try {
Write-PipelineTelemetryError -Force -Category 'Build' -Message "Guardian baseline failed with exit code $LASTEXITCODE."
ExitWithExitCode $LASTEXITCODE
}
+ & $(Join-Path $PSScriptRoot 'push-gdn.ps1') -Repository $Repository -BranchName $BranchName -GdnFolder $gdnFolder -AzureDevOpsAccessToken $AzureDevOpsAccessToken -PushReason 'Initialize gdn folder'
ExitWithExitCode 0
}
catch {
diff --git a/eng/common/sdl/packages.config b/eng/common/sdl/packages.config
index 3bd8b29ebd..968b39bef5 100644
--- a/eng/common/sdl/packages.config
+++ b/eng/common/sdl/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/eng/common/sdl/push-gdn.ps1 b/eng/common/sdl/push-gdn.ps1
new file mode 100644
index 0000000000..d8fd2d82a6
--- /dev/null
+++ b/eng/common/sdl/push-gdn.ps1
@@ -0,0 +1,69 @@
+Param(
+ [string] $Repository,
+ [string] $BranchName='master',
+ [string] $GdnFolder,
+ [string] $AzureDevOpsAccessToken,
+ [string] $PushReason
+)
+
+$ErrorActionPreference = 'Stop'
+Set-StrictMode -Version 2.0
+$disableConfigureToolsetImport = $true
+$LASTEXITCODE = 0
+
+try {
+ # `tools.ps1` checks $ci to perform some actions. Since the SDL
+ # scripts don't necessarily execute in the same agent that run the
+ # build.ps1/sh script this variable isn't automatically set.
+ $ci = $true
+ . $PSScriptRoot\..\tools.ps1
+
+ # We create the temp directory where we'll store the sdl-config repository
+ $sdlDir = Join-Path $env:TEMP 'sdl'
+ if (Test-Path $sdlDir) {
+ Remove-Item -Force -Recurse $sdlDir
+ }
+
+ Write-Host "git clone https://dnceng:`$AzureDevOpsAccessToken@dev.azure.com/dnceng/internal/_git/sdl-tool-cfg $sdlDir"
+ git clone https://dnceng:$AzureDevOpsAccessToken@dev.azure.com/dnceng/internal/_git/sdl-tool-cfg $sdlDir
+ if ($LASTEXITCODE -ne 0) {
+ Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Git clone failed with exit code $LASTEXITCODE."
+ ExitWithExitCode $LASTEXITCODE
+ }
+ # We copy the .gdn folder from our local run into the git repository so it can be committed
+ $sdlRepositoryFolder = Join-Path (Join-Path (Join-Path $sdlDir $Repository) $BranchName) '.gdn'
+ if (Get-Command Robocopy) {
+ Robocopy /S $GdnFolder $sdlRepositoryFolder
+ } else {
+ rsync -r $GdnFolder $sdlRepositoryFolder
+ }
+ # cd to the sdl-config directory so we can run git there
+ Push-Location $sdlDir
+ # git add . --> git commit --> git push
+ Write-Host 'git add .'
+ git add .
+ if ($LASTEXITCODE -ne 0) {
+ Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Git add failed with exit code $LASTEXITCODE."
+ ExitWithExitCode $LASTEXITCODE
+ }
+ Write-Host "git -c user.email=`"dn-bot@microsoft.com`" -c user.name=`"Dotnet Bot`" commit -m `"$PushReason for $Repository/$BranchName`""
+ git -c user.email="dn-bot@microsoft.com" -c user.name="Dotnet Bot" commit -m "$PushReason for $Repository/$BranchName"
+ if ($LASTEXITCODE -ne 0) {
+ Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Git commit failed with exit code $LASTEXITCODE."
+ ExitWithExitCode $LASTEXITCODE
+ }
+ Write-Host 'git push'
+ git push
+ if ($LASTEXITCODE -ne 0) {
+ Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Git push failed with exit code $LASTEXITCODE."
+ ExitWithExitCode $LASTEXITCODE
+ }
+
+ # Return to the original directory
+ Pop-Location
+}
+catch {
+ Write-Host $_.ScriptStackTrace
+ Write-PipelineTelemetryError -Category 'Sdl' -Message $_
+ ExitWithExitCode 1
+}
diff --git a/eng/common/templates/job/execute-sdl.yml b/eng/common/templates/job/execute-sdl.yml
index 4a32181fd8..c64c4f5686 100644
--- a/eng/common/templates/job/execute-sdl.yml
+++ b/eng/common/templates/job/execute-sdl.yml
@@ -45,7 +45,6 @@ jobs:
buildId: $(AzDOBuildId)
artifactName: ${{ artifactName }}
downloadPath: $(Build.ArtifactStagingDirectory)\artifacts
- checkDownloadedFiles: true
- ${{ if eq(parameters.artifactNames, '') }}:
- task: DownloadBuildArtifacts@0
displayName: Download Build Artifacts
@@ -58,7 +57,6 @@ jobs:
downloadType: specific files
itemPattern: "**"
downloadPath: $(Build.ArtifactStagingDirectory)\artifacts
- checkDownloadedFiles: true
- powershell: eng/common/sdl/extract-artifact-packages.ps1
-InputPath $(Build.ArtifactStagingDirectory)\artifacts\BlobArtifacts
-ExtractPath $(Build.ArtifactStagingDirectory)\artifacts\BlobArtifacts
@@ -85,7 +83,7 @@ jobs:
continueOnError: ${{ parameters.sdlContinueOnError }}
- ${{ if eq(parameters.overrideParameters, '') }}:
- powershell: eng/common/sdl/execute-all-sdl-tools.ps1
- -GuardianPackageName Microsoft.Guardian.Cli.0.53.3
+ -GuardianPackageName Microsoft.Guardian.Cli.win10-x64.0.20.1
-NugetPackageDirectory $(Build.SourcesDirectory)\.packages
-AzureDevOpsAccessToken $(dn-bot-dotnet-build-rw-code-rw)
${{ parameters.additionalParameters }}
diff --git a/eng/common/templates/job/onelocbuild.yml b/eng/common/templates/job/onelocbuild.yml
deleted file mode 100644
index 6abc041cd1..0000000000
--- a/eng/common/templates/job/onelocbuild.yml
+++ /dev/null
@@ -1,75 +0,0 @@
-parameters:
- # Optional: dependencies of the job
- dependsOn: ''
-
- # Optional: A defined YAML pool - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#pool
- pool:
- vmImage: vs2017-win2016
-
- CeapexPat: $(dn-bot-ceapex-package-r) # PAT for the loc AzDO instance https://dev.azure.com/ceapex
- GithubPat: $(BotAccount-dotnet-bot-repo-PAT)
-
- SourcesDirectory: $(Build.SourcesDirectory)
- CreatePr: true
- UseCheckedInLocProjectJson: false
- LanguageSet: VS_Main_Languages
- LclSource: lclFilesInRepo
- LclPackageId: ''
- RepoType: gitHub
-
-jobs:
-- job: OneLocBuild
-
- dependsOn: ${{ parameters.dependsOn }}
-
- displayName: OneLocBuild
-
- pool: ${{ parameters.pool }}
-
- variables:
- - group: OneLocBuildVariables # Contains the CeapexPat and GithubPat
- - name: _GenerateLocProjectArguments
- value: -SourcesDirectory ${{ parameters.SourcesDirectory }}
- -LanguageSet "${{ parameters.LanguageSet }}"
- -CreateNeutralXlfs
- - ${{ if eq(parameters.UseCheckedInLocProjectJson, 'true') }}:
- - name: _GenerateLocProjectArguments
- value: ${{ variables._GenerateLocProjectArguments }} -UseCheckedInLocProjectJson
-
-
- steps:
- - task: Powershell@2
- inputs:
- filePath: $(Build.SourcesDirectory)/eng/common/generate-locproject.ps1
- arguments: $(_GenerateLocProjectArguments)
- displayName: Generate LocProject.json
-
- - task: OneLocBuild@2
- displayName: OneLocBuild
- inputs:
- locProj: Localize/LocProject.json
- outDir: $(Build.ArtifactStagingDirectory)
- lclSource: ${{ parameters.LclSource }}
- lclPackageId: ${{ parameters.LclPackageId }}
- isCreatePrSelected: ${{ parameters.CreatePr }}
- repoType: ${{ parameters.RepoType }}
- gitHubPatVariable: "${{ parameters.GithubPat }}"
- packageSourceAuth: patAuth
- patVariable: ${{ parameters.CeapexPat }}
- condition: always()
-
- - task: PublishBuildArtifacts@1
- displayName: Publish Localization Files
- inputs:
- PathtoPublish: '$(Build.ArtifactStagingDirectory)/loc'
- PublishLocation: Container
- ArtifactName: Loc
- condition: always()
-
- - task: PublishBuildArtifacts@1
- displayName: Publish LocProject.json
- inputs:
- PathtoPublish: '$(Build.SourcesDirectory)/Localize/'
- PublishLocation: Container
- ArtifactName: Loc
- condition: always()
\ No newline at end of file
diff --git a/eng/common/templates/job/publish-build-assets.yml b/eng/common/templates/job/publish-build-assets.yml
index 3b9e2524ff..d0c3cc2b3b 100644
--- a/eng/common/templates/job/publish-build-assets.yml
+++ b/eng/common/templates/job/publish-build-assets.yml
@@ -37,7 +37,6 @@ jobs:
- name: _BuildConfig
value: ${{ parameters.configuration }}
- group: Publish-Build-Assets
- - group: AzureDevOps-Artifact-Feeds-Pats
# Skip component governance and codesign validation for SDL. These jobs
# create no content.
- name: skipComponentGovernanceDetection
@@ -52,19 +51,12 @@ jobs:
inputs:
artifactName: AssetManifests
downloadPath: '$(Build.StagingDirectory)/Download'
- checkDownloadedFiles: true
condition: ${{ parameters.condition }}
continueOnError: ${{ parameters.continueOnError }}
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- task: NuGetAuthenticate@0
- - task: PowerShell@2
- displayName: Enable cross-org NuGet feed authentication
- inputs:
- filePath: $(Build.SourcesDirectory)/eng/common/enable-cross-org-publishing.ps1
- arguments: -token $(dn-bot-all-orgs-artifact-feeds-rw)
-
- task: PowerShell@2
displayName: Publish Build Assets
inputs:
diff --git a/eng/common/templates/job/source-build.yml b/eng/common/templates/job/source-build.yml
index aad4146492..9332f5ecc3 100644
--- a/eng/common/templates/job/source-build.yml
+++ b/eng/common/templates/job/source-build.yml
@@ -28,11 +28,6 @@ parameters:
# container and pool.
platform: {}
- # The default VM host AzDO pool. This should be capable of running Docker containers: almost all
- # source-build builds run in Docker, including the default managed platform.
- defaultContainerHostPool:
- vmImage: ubuntu-20.04
-
jobs:
- job: ${{ parameters.jobNamePrefix }}_${{ parameters.platform.name }}
displayName: Source-Build (${{ parameters.platform.name }})
@@ -42,9 +37,6 @@ jobs:
${{ if ne(parameters.platform.container, '') }}:
container: ${{ parameters.platform.container }}
-
- ${{ if eq(parameters.platform.pool, '') }}:
- pool: ${{ parameters.defaultContainerHostPool }}
${{ if ne(parameters.platform.pool, '') }}:
pool: ${{ parameters.platform.pool }}
diff --git a/eng/common/templates/job/source-index-stage1.yml b/eng/common/templates/job/source-index-stage1.yml
deleted file mode 100644
index c002a2b1b0..0000000000
--- a/eng/common/templates/job/source-index-stage1.yml
+++ /dev/null
@@ -1,58 +0,0 @@
-parameters:
- runAsPublic: false
- sourceIndexPackageVersion: 1.0.1-20210225.1
- sourceIndexPackageSource: https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json
- sourceIndexBuildCommand: powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command "eng/common/build.ps1 -restore -build -binarylog -ci"
- preSteps: []
- binlogPath: artifacts/log/Debug/Build.binlog
- pool:
- vmImage: vs2017-win2016
-
-jobs:
-- job: SourceIndexStage1
- variables:
- - name: SourceIndexPackageVersion
- value: ${{ parameters.sourceIndexPackageVersion }}
- - name: SourceIndexPackageSource
- value: ${{ parameters.sourceIndexPackageSource }}
- - name: BinlogPath
- value: ${{ parameters.binlogPath }}
- - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- - group: source-dot-net stage1 variables
-
- pool: ${{ parameters.pool }}
- steps:
- - ${{ each preStep in parameters.preSteps }}:
- - ${{ preStep }}
-
- - task: UseDotNet@2
- displayName: Use .NET Core sdk 3.1
- inputs:
- packageType: sdk
- version: 3.1.x
-
- - task: UseDotNet@2
- displayName: Use .NET Core sdk
- inputs:
- useGlobalJson: true
-
- - script: |
- dotnet tool install BinLogToSln --version $(SourceIndexPackageVersion) --add-source $(SourceIndexPackageSource) --tool-path .source-index/tools
- dotnet tool install UploadIndexStage1 --version $(SourceIndexPackageVersion) --add-source $(SourceIndexPackageSource) --tool-path .source-index/tools
- echo ##vso[task.prependpath]$(Build.SourcesDirectory)/.source-index/tools
- displayName: Download Tools
-
- - script: ${{ parameters.sourceIndexBuildCommand }}
- displayName: Build Repository
-
- - script: BinLogToSln -i $(BinlogPath) -r $(Build.SourcesDirectory) -n $(Build.Repository.Name) -o .source-index/stage1output
- displayName: Process Binlog into indexable sln
- env:
- DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX: 2
-
- - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- - script: UploadIndexStage1 -i .source-index/stage1output -n $(Build.Repository.Name)
- displayName: Upload stage1 artifacts to source index
- env:
- BLOB_CONTAINER_URL: $(source-dot-net-stage1-blob-container-url)
- DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX: 2
diff --git a/eng/common/templates/jobs/jobs.yml b/eng/common/templates/jobs/jobs.yml
index a1f8fce96c..08845950f4 100644
--- a/eng/common/templates/jobs/jobs.yml
+++ b/eng/common/templates/jobs/jobs.yml
@@ -7,14 +7,7 @@ parameters:
# Optional: Enable publishing using release pipelines
enablePublishUsingPipelines: false
-
- # Optional: Enable running the source-build jobs to build repo from source
- enableSourceBuild: false
-
- # Optional: Parameters for source-build template.
- # See /eng/common/templates/jobs/source-build.yml for options
- sourceBuildParameters: []
-
+
graphFileGeneration:
# Optional: Enable generating the graph files at the end of the build
enabled: false
@@ -31,8 +24,12 @@ parameters:
# if 'true', the build won't run any of the internal only steps, even if it is running in non-public projects.
runAsPublic: false
- enableSourceIndex: false
- sourceIndexParams: {}
+ # Optional: Enable running the source-build jobs to build repo from source
+ runSourceBuild: false
+
+ # Optional: Parameters for source-build template.
+ # See /eng/common/templates/jobs/source-build.yml for options
+ sourceBuildParameters: []
# Internal resources (telemetry, microbuild) can only be accessed from non-public projects,
# and some (Microbuild) should only be applied to non-PR cases for internal builds.
@@ -53,22 +50,14 @@ jobs:
name: ${{ job.job }}
-- ${{ if eq(parameters.enableSourceBuild, true) }}:
+- ${{ if eq(parameters.runSourceBuild, true) }}:
- template: /eng/common/templates/jobs/source-build.yml
parameters:
allCompletedJobId: Source_Build_Complete
${{ each parameter in parameters.sourceBuildParameters }}:
${{ parameter.key }}: ${{ parameter.value }}
-- ${{ if eq(parameters.enableSourceIndex, 'true') }}:
- - template: ../job/source-index-stage1.yml
- parameters:
- runAsPublic: ${{ parameters.runAsPublic }}
- ${{ each parameter in parameters.sourceIndexParams }}:
- ${{ parameter.key }}: ${{ parameter.value }}
-
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
-
- ${{ if or(eq(parameters.enablePublishBuildAssets, true), eq(parameters.artifacts.publish.manifests, 'true'), ne(parameters.artifacts.publish.manifests, '')) }}:
- template: ../job/publish-build-assets.yml
parameters:
@@ -80,7 +69,7 @@ jobs:
- ${{ if eq(parameters.publishBuildAssetsDependsOn, '') }}:
- ${{ each job in parameters.jobs }}:
- ${{ job.job }}
- - ${{ if eq(parameters.enableSourceBuild, true) }}:
+ - ${{ if eq(parameters.runSourceBuild, true) }}:
- Source_Build_Complete
pool:
vmImage: vs2017-win2016
diff --git a/eng/common/templates/jobs/source-build.yml b/eng/common/templates/jobs/source-build.yml
index 00aa98eb3b..f463011e79 100644
--- a/eng/common/templates/jobs/source-build.yml
+++ b/eng/common/templates/jobs/source-build.yml
@@ -11,14 +11,16 @@ parameters:
# See /eng/common/templates/job/source-build.yml
jobNamePrefix: 'Source_Build'
- # This is the default platform provided by Arcade, intended for use by a managed-only repo.
+ # If changed to true, causes this template to include the default platform for a managed-only
+ # repo. The exact Docker image used for this build will be provided by Arcade. This has some risk,
+ # but since the repo is supposed to be managed-only, the risk should be very low.
+ includeDefaultManagedPlatform: false
defaultManagedPlatform:
name: 'Managed'
container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-3e800f1-20190501005343'
# Defines the platforms on which to run build jobs. One job is created for each platform, and the
- # object in this array is sent to the job template as 'platform'. If no platforms are specified,
- # one job runs on 'defaultManagedPlatform'.
+ # object in this array is sent to the job template as 'platform'.
platforms: []
jobs:
@@ -30,7 +32,7 @@ jobs:
dependsOn:
- ${{ each platform in parameters.platforms }}:
- ${{ parameters.jobNamePrefix }}_${{ platform.name }}
- - ${{ if eq(length(parameters.platforms), 0) }}:
+ - ${{ if eq(parameters.includeDefaultManagedPlatform, true) }}:
- ${{ parameters.jobNamePrefix }}_${{ parameters.defaultManagedPlatform.name }}
- ${{ each platform in parameters.platforms }}:
@@ -39,7 +41,7 @@ jobs:
jobNamePrefix: ${{ parameters.jobNamePrefix }}
platform: ${{ platform }}
-- ${{ if eq(length(parameters.platforms), 0) }}:
+- ${{ if eq(parameters.includeDefaultManagedPlatform, true) }}:
- template: /eng/common/templates/job/source-build.yml
parameters:
jobNamePrefix: ${{ parameters.jobNamePrefix }}
diff --git a/eng/common/templates/phases/publish-build-assets.yml b/eng/common/templates/phases/publish-build-assets.yml
index 4e51e472e2..a0a8074282 100644
--- a/eng/common/templates/phases/publish-build-assets.yml
+++ b/eng/common/templates/phases/publish-build-assets.yml
@@ -20,7 +20,6 @@ phases:
inputs:
artifactName: AssetManifests
downloadPath: '$(Build.StagingDirectory)/Download'
- checkDownloadedFiles: true
condition: ${{ parameters.condition }}
continueOnError: ${{ parameters.continueOnError }}
- task: AzureKeyVault@1
diff --git a/eng/common/templates/post-build/channels/generic-internal-channel.yml b/eng/common/templates/post-build/channels/generic-internal-channel.yml
index 58fa9a35b8..7ae5255921 100644
--- a/eng/common/templates/post-build/channels/generic-internal-channel.yml
+++ b/eng/common/templates/post-build/channels/generic-internal-channel.yml
@@ -58,7 +58,6 @@ stages:
PdbArtifacts/**
BlobArtifacts/**
downloadPath: '$(Build.ArtifactStagingDirectory)'
- checkDownloadedFiles: 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
@@ -125,7 +124,6 @@ stages:
BlobArtifacts/**
AssetManifests/**
downloadPath: '$(Build.ArtifactStagingDirectory)'
- checkDownloadedFiles: true
- task: NuGetToolInstaller@1
displayName: 'Install NuGet.exe'
diff --git a/eng/common/templates/post-build/channels/generic-public-channel.yml b/eng/common/templates/post-build/channels/generic-public-channel.yml
index b50c0b3bdb..6cf39dbb29 100644
--- a/eng/common/templates/post-build/channels/generic-public-channel.yml
+++ b/eng/common/templates/post-build/channels/generic-public-channel.yml
@@ -56,7 +56,6 @@ stages:
PdbArtifacts/**
BlobArtifacts/**
downloadPath: '$(Build.ArtifactStagingDirectory)'
- checkDownloadedFiles: 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
@@ -124,7 +123,6 @@ stages:
BlobArtifacts/**
AssetManifests/**
downloadPath: '$(Build.ArtifactStagingDirectory)'
- checkDownloadedFiles: true
- task: NuGetToolInstaller@1
displayName: 'Install NuGet.exe'
diff --git a/eng/common/templates/post-build/post-build.yml b/eng/common/templates/post-build/post-build.yml
index 4f79cf0f33..41f2d96a60 100644
--- a/eng/common/templates/post-build/post-build.yml
+++ b/eng/common/templates/post-build/post-build.yml
@@ -61,9 +61,7 @@ parameters:
VS167ChannelId: 1011
VS168ChannelId: 1154
VSMasterChannelId: 1012
- VS169ChannelId: 1473
- VS1610ChannelId: 1692
-
+
stages:
- ${{ if or(and(le(parameters.publishingInfraVersion, 2), eq(parameters.inline, 'true')), eq( parameters.enableNugetValidation, 'true'), eq(parameters.enableSigningValidation, 'true'), eq(parameters.enableSourceLinkValidation, 'true'), eq(parameters.SDLValidationParameters.enable, 'true')) }}:
- stage: Validate
@@ -92,7 +90,7 @@ stages:
inputs:
filePath: $(Build.SourcesDirectory)/eng/common/post-build/check-channel-consistency.ps1
arguments: -PromoteToChannels "$(TargetChannels)"
- -AvailableChannelIds ${{parameters.NetEngLatestChannelId}},${{parameters.NetEngValidationChannelId}},${{parameters.NetDev5ChannelId}},${{parameters.NetDev6ChannelId}},${{parameters.GeneralTestingChannelId}},${{parameters.NETCoreToolingDevChannelId}},${{parameters.NETCoreToolingReleaseChannelId}},${{parameters.NETInternalToolingChannelId}},${{parameters.NETCoreExperimentalChannelId}},${{parameters.NetEngServicesIntChannelId}},${{parameters.NetEngServicesProdChannelId}},${{parameters.NetCoreSDK313xxChannelId}},${{parameters.NetCoreSDK313xxInternalChannelId}},${{parameters.NetCoreSDK314xxChannelId}},${{parameters.NetCoreSDK314xxInternalChannelId}},${{parameters.VS166ChannelId}},${{parameters.VS167ChannelId}},${{parameters.VS168ChannelId}},${{parameters.VSMasterChannelId}},${{parameters.VS169ChannelId}},${{parameters.VS1610ChannelId}}
+ -AvailableChannelIds ${{parameters.NetEngLatestChannelId}},${{parameters.NetEngValidationChannelId}},${{parameters.NetDev5ChannelId}},${{parameters.NetDev6ChannelId}},${{parameters.GeneralTestingChannelId}},${{parameters.NETCoreToolingDevChannelId}},${{parameters.NETCoreToolingReleaseChannelId}},${{parameters.NETInternalToolingChannelId}},${{parameters.NETCoreExperimentalChannelId}},${{parameters.NetEngServicesIntChannelId}},${{parameters.NetEngServicesProdChannelId}},${{parameters.NetCoreSDK313xxChannelId}},${{parameters.NetCoreSDK313xxInternalChannelId}},${{parameters.NetCoreSDK314xxChannelId}},${{parameters.NetCoreSDK314xxInternalChannelId}},${{parameters.VS166ChannelId}},${{parameters.VS167ChannelId}},${{parameters.VS168ChannelId}},${{parameters.VSMasterChannelId}}
- job:
displayName: NuGet Validation
@@ -117,7 +115,6 @@ stages:
pipeline: $(AzDOPipelineId)
buildId: $(AzDOBuildId)
artifactName: PackageArtifacts
- checkDownloadedFiles: true
- task: PowerShell@2
displayName: Validate
@@ -129,7 +126,7 @@ stages:
- job:
displayName: Signing Validation
dependsOn: setupMaestroVars
- condition: and( eq( ${{ parameters.enableSigningValidation }}, 'true'), ne( variables['PostBuildSign'], 'true'))
+ condition: eq( ${{ parameters.enableSigningValidation }}, 'true')
variables:
- template: common-variables.yml
- name: AzDOProjectName
@@ -150,10 +147,6 @@ stages:
pipeline: $(AzDOPipelineId)
buildId: $(AzDOBuildId)
artifactName: PackageArtifacts
- checkDownloadedFiles: true
- itemPattern: |
- **
- !**/Microsoft.SourceBuild.Intermediate.*.nupkg
# 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
@@ -207,7 +200,6 @@ stages:
pipeline: $(AzDOPipelineId)
buildId: $(AzDOBuildId)
artifactName: BlobArtifacts
- checkDownloadedFiles: true
- task: PowerShell@2
displayName: Validate
@@ -232,7 +224,7 @@ stages:
- ${{ if or(ge(parameters.publishingInfraVersion, 3), eq(parameters.inline, 'false')) }}:
- stage: publish_using_darc
${{ if or(eq(parameters.enableNugetValidation, 'true'), eq(parameters.enableSigningValidation, 'true'), eq(parameters.enableSourceLinkValidation, 'true'), eq(parameters.SDLValidationParameters.enable, 'true')) }}:
- dependsOn: ${{ parameters.publishDependsOn }}
+ dependsOn: Validate
${{ if and(ne(parameters.enableNugetValidation, 'true'), ne(parameters.enableSigningValidation, 'true'), ne(parameters.enableSourceLinkValidation, 'true'), ne(parameters.SDLValidationParameters.enable, 'true')) }}:
dependsOn: ${{ parameters.validateDependsOn }}
displayName: Publish using Darc
@@ -557,33 +549,3 @@ stages:
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-transport/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:
- BARBuildId: ${{ parameters.BARBuildId }}
- PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }}
- artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
- dependsOn: ${{ parameters.publishDependsOn }}
- publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
- symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
- stageName: 'VS_16_9_Publishing'
- channelName: 'VS 16.9'
- channelId: ${{ parameters.VS169ChannelId }}
- transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-transport/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:
- BARBuildId: ${{ parameters.BARBuildId }}
- PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }}
- artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
- dependsOn: ${{ parameters.publishDependsOn }}
- publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
- symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
- stageName: 'VS_16_10_Publishing'
- channelName: 'VS 16.10'
- channelId: ${{ parameters.VS1610ChannelId }}
- transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-transport/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 4a22b2e6f6..d0cbfb6c6f 100644
--- a/eng/common/templates/post-build/setup-maestro-vars.yml
+++ b/eng/common/templates/post-build/setup-maestro-vars.yml
@@ -18,7 +18,6 @@ jobs:
inputs:
buildType: current
artifactName: ReleaseConfigs
- checkDownloadedFiles: true
- task: PowerShell@2
name: setReleaseVars
diff --git a/eng/common/templates/steps/perf-send-to-helix.yml b/eng/common/templates/steps/perf-send-to-helix.yml
index 0fb786fabf..a468e92ce4 100644
--- a/eng/common/templates/steps/perf-send-to-helix.yml
+++ b/eng/common/templates/steps/perf-send-to-helix.yml
@@ -11,8 +11,8 @@ parameters:
WorkItemDirectory: '' # optional -- a payload directory to zip up and send to Helix; requires WorkItemCommand; incompatible with XUnitProjects
CorrelationPayloadDirectory: '' # optional -- a directory to zip up and send to Helix as a correlation payload
IncludeDotNetCli: false # optional -- true will download a version of the .NET CLI onto the Helix machine as a correlation payload; requires DotNetCliPackageType and DotNetCliVersion
- DotNetCliPackageType: '' # optional -- either 'sdk', 'runtime' or 'aspnetcore-runtime'; determines whether the sdk or runtime will be sent to Helix; see https://raw.githubusercontent.com/dotnet/core/main/release-notes/releases.json
- DotNetCliVersion: '' # optional -- version of the CLI to send to Helix; based on this: https://raw.githubusercontent.com/dotnet/core/main/release-notes/releases.json
+ DotNetCliPackageType: '' # optional -- either 'sdk', 'runtime' or 'aspnetcore-runtime'; determines whether the sdk or runtime will be sent to Helix; see https://raw.githubusercontent.com/dotnet/core/master/release-notes/releases.json
+ DotNetCliVersion: '' # optional -- version of the CLI to send to Helix; based on this: https://raw.githubusercontent.com/dotnet/core/master/release-notes/releases.json
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."
Creator: '' # optional -- if the build is external, use this to specify who is sending the job
@@ -29,7 +29,7 @@ steps:
sendParams: $(Build.SourcesDirectory)/eng/common/performance/${{ parameters.ProjectFile }} /restore /t:Test /bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/SendToHelix.binlog
displayName: ${{ parameters.DisplayNamePrefix }}
condition: ${{ parameters.condition }}
- shouldContinueOnError: ${{ parameters.continueOnError }}
+ continueOnError: ${{ parameters.continueOnError }}
environment:
BuildConfig: $(_BuildConfig)
HelixSource: ${{ parameters.HelixSource }}
diff --git a/eng/common/templates/steps/send-to-helix.yml b/eng/common/templates/steps/send-to-helix.yml
index cd02ae1607..bb5f1a9293 100644
--- a/eng/common/templates/steps/send-to-helix.yml
+++ b/eng/common/templates/steps/send-to-helix.yml
@@ -18,8 +18,8 @@ parameters:
XUnitRuntimeTargetFramework: '' # optional -- framework to use for the xUnit console runner
XUnitRunnerVersion: '' # optional -- version of the xUnit nuget package you wish to use on Helix; required for XUnitProjects
IncludeDotNetCli: false # optional -- true will download a version of the .NET CLI onto the Helix machine as a correlation payload; requires DotNetCliPackageType and DotNetCliVersion
- DotNetCliPackageType: '' # optional -- either 'sdk', 'runtime' or 'aspnetcore-runtime'; determines whether the sdk or runtime will be sent to Helix; see https://raw.githubusercontent.com/dotnet/core/main/release-notes/releases-index.json
- DotNetCliVersion: '' # optional -- version of the CLI to send to Helix; based on this: https://raw.githubusercontent.com/dotnet/core/main/release-notes/releases-index.json
+ DotNetCliPackageType: '' # optional -- either 'sdk', 'runtime' or 'aspnetcore-runtime'; determines whether the sdk or runtime will be sent to Helix; see https://raw.githubusercontent.com/dotnet/core/master/release-notes/releases-index.json
+ DotNetCliVersion: '' # optional -- version of the CLI to send to Helix; based on this: https://raw.githubusercontent.com/dotnet/core/master/release-notes/releases-index.json
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
diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1
index d52467eea1..484b67d9c2 100644
--- a/eng/common/tools.ps1
+++ b/eng/common/tools.ps1
@@ -141,7 +141,7 @@ function InitializeDotNetCli([bool]$install, [bool]$createSdkLocationFile) {
# Use dotnet installation specified in DOTNET_INSTALL_DIR if it contains the required SDK version,
# otherwise install the dotnet CLI and SDK to repo local .dotnet directory to avoid potential permission issues.
- if ((-not $globalJsonHasRuntimes) -and (-not [string]::IsNullOrEmpty($env:DOTNET_INSTALL_DIR)) -and (Test-Path(Join-Path $env:DOTNET_INSTALL_DIR "sdk\$dotnetSdkVersion"))) {
+ if ((-not $globalJsonHasRuntimes) -and ($env:DOTNET_INSTALL_DIR -ne $null) -and (Test-Path(Join-Path $env:DOTNET_INSTALL_DIR "sdk\$dotnetSdkVersion"))) {
$dotnetRoot = $env:DOTNET_INSTALL_DIR
} else {
$dotnetRoot = Join-Path $RepoRoot '.dotnet'
@@ -169,7 +169,7 @@ function InitializeDotNetCli([bool]$install, [bool]$createSdkLocationFile) {
Set-Content -Path $sdkCacheFileTemp -Value $dotnetRoot
try {
- Move-Item -Force $sdkCacheFileTemp (Join-Path $ToolsetDir 'sdk.txt')
+ Rename-Item -Force -Path $sdkCacheFileTemp 'sdk.txt'
} catch {
# Somebody beat us
Remove-Item -Path $sdkCacheFileTemp
@@ -508,7 +508,8 @@ function InitializeBuildTool() {
ExitWithExitCode 1
}
$dotnetPath = Join-Path $dotnetRoot (GetExecutableFileName 'dotnet')
- $buildTool = @{ Path = $dotnetPath; Command = 'msbuild'; Tool = 'dotnet'; Framework = 'netcoreapp3.1' }
+ Write-Host "BRETTFO ------------------------- dotnetpath = $dotnetPath"
+ $buildTool = @{ Path = $dotnetPath; Command = 'msbuild'; Tool = 'dotnet'; Framework = 'netcoreapp2.1' }
} elseif ($msbuildEngine -eq "vs") {
try {
$msbuildPath = InitializeVisualStudioMSBuild -install:$restore
@@ -644,26 +645,9 @@ function MSBuild() {
}
$toolsetBuildProject = InitializeToolset
- $basePath = Split-Path -parent $toolsetBuildProject
- $possiblePaths = @(
- # new scripts need to work with old packages, so we need to look for the old names/versions
- (Join-Path $basePath (Join-Path $buildTool.Framework 'Microsoft.DotNet.ArcadeLogging.dll')),
- (Join-Path $basePath (Join-Path $buildTool.Framework 'Microsoft.DotNet.Arcade.Sdk.dll')),
- (Join-Path $basePath (Join-Path netcoreapp2.1 'Microsoft.DotNet.ArcadeLogging.dll')),
- (Join-Path $basePath (Join-Path netcoreapp2.1 'Microsoft.DotNet.Arcade.Sdk.dll'))
- )
- $selectedPath = $null
- foreach ($path in $possiblePaths) {
- if (Test-Path $path -PathType Leaf) {
- $selectedPath = $path
- break
- }
- }
- if (-not $selectedPath) {
- Write-PipelineTelemetryError -Category 'Build' -Message 'Unable to find arcade sdk logger assembly.'
- ExitWithExitCode 1
- }
- $args += "/logger:$selectedPath"
+ $path = Split-Path -parent $toolsetBuildProject
+ $path = Join-Path $path (Join-Path $buildTool.Framework 'Microsoft.DotNet.Arcade.Sdk.dll')
+ $args += "/logger:$path"
}
MSBuild-Core @args
diff --git a/eng/common/tools.sh b/eng/common/tools.sh
index 5fad1846e5..b160c370f8 100644
--- a/eng/common/tools.sh
+++ b/eng/common/tools.sh
@@ -89,16 +89,16 @@ function ResolvePath {
function ReadGlobalVersion {
local key=$1
- if command -v jq &> /dev/null; then
- _ReadGlobalVersion="$(jq -r ".[] | select(has(\"$key\")) | .\"$key\"" "$global_json_file")"
- elif [[ "$(cat "$global_json_file")" =~ \"$key\"[[:space:]\:]*\"([^\"]+) ]]; then
- _ReadGlobalVersion=${BASH_REMATCH[1]}
- fi
+ local line=$(awk "/$key/ {print; exit}" "$global_json_file")
+ local pattern="\"$key\" *: *\"(.*)\""
- if [[ -z "$_ReadGlobalVersion" ]]; then
+ if [[ ! $line =~ $pattern ]]; then
Write-PipelineTelemetryError -category 'Build' "Error: Cannot find \"$key\" in $global_json_file"
ExitWithExitCode 1
fi
+
+ # return value
+ _ReadGlobalVersion=${BASH_REMATCH[1]}
}
function InitializeDotNetCli {
@@ -273,10 +273,8 @@ function GetDotNetInstallScript {
if command -v curl > /dev/null; then
# first, try directly, if this fails we will retry with verbose logging
curl "$install_script_url" -sSL --retry 10 --create-dirs -o "$install_script" || {
- if command -v openssl &> /dev/null; then
- echo "Curl failed; dumping some information about dotnet.microsoft.com for later investigation"
- echo | openssl s_client -showcerts -servername dotnet.microsoft.com -connect dotnet.microsoft.com:443
- fi
+ echo "Curl failed; dumping some information about dotnet.microsoft.com for later investigation"
+ echo | openssl s_client -showcerts -servername dotnet.microsoft.com -connect dotnet.microsoft.com:443
echo "Will now retry the same URL with verbose logging."
with_retries curl "$install_script_url" -sSL --verbose --retry 10 --create-dirs -o "$install_script" || {
local exit_code=$?
@@ -306,7 +304,7 @@ function InitializeBuildTool {
# return values
_InitializeBuildTool="$_InitializeDotNetCli/dotnet"
_InitializeBuildToolCommand="msbuild"
- _InitializeBuildToolFramework="netcoreapp3.1"
+ _InitializeBuildToolFramework="netcoreapp2.1"
}
# Set RestoreNoCache as a workaround for https://github.com/NuGet/Home/issues/3116
@@ -413,24 +411,8 @@ function MSBuild {
fi
local toolset_dir="${_InitializeToolset%/*}"
- # new scripts need to work with old packages, so we need to look for the old names/versions
- local selectedPath=
- local possiblePaths=()
- possiblePaths+=( "$toolset_dir/$_InitializeBuildToolFramework/Microsoft.DotNet.ArcadeLogging.dll" )
- possiblePaths+=( "$toolset_dir/$_InitializeBuildToolFramework/Microsoft.DotNet.Arcade.Sdk.dll" )
- possiblePaths+=( "$toolset_dir/netcoreapp2.1/Microsoft.DotNet.ArcadeLogging.dll" )
- possiblePaths+=( "$toolset_dir/netcoreapp2.1/Microsoft.DotNet.Arcade.Sdk.dll" )
- for path in "${possiblePaths[@]}"; do
- if [[ -f $path ]]; then
- selectedPath=$path
- break
- fi
- done
- if [[ -z "$selectedPath" ]]; then
- Write-PipelineTelemetryError -category 'Build' "Unable to find arcade sdk logger assembly."
- ExitWithExitCode 1
- fi
- args+=( "-logger:$selectedPath" )
+ local logger_path="$toolset_dir/$_InitializeBuildToolFramework/Microsoft.DotNet.Arcade.Sdk.dll"
+ args=( "${args[@]}" "-logger:$logger_path" )
fi
MSBuild-Core ${args[@]}
@@ -494,11 +476,8 @@ temp_dir="$artifacts_dir/tmp/$configuration"
global_json_file="$repo_root/global.json"
# determine if global.json contains a "runtimes" entry
global_json_has_runtimes=false
-if command -v jq &> /dev/null; then
- if jq -er '. | select(has("runtimes"))' "$global_json_file" &> /dev/null; then
- global_json_has_runtimes=true
- fi
-elif [[ "$(cat "$global_json_file")" =~ \"runtimes\"[[:space:]\:]*\{ ]]; then
+dotnetlocal_key=$(awk "/runtimes/ {print; exit}" "$global_json_file") || true
+if [[ -n "$dotnetlocal_key" ]]; then
global_json_has_runtimes=true
fi
diff --git a/eng/source-build-patches/0003-Update-to-netcoreapp3.1-to-avoid-prebuilts.patch b/eng/source-build-patches/0003-Update-to-netcoreapp3.1-to-avoid-prebuilts.patch
index ae461533d8..1922bb8680 100644
--- a/eng/source-build-patches/0003-Update-to-netcoreapp3.1-to-avoid-prebuilts.patch
+++ b/eng/source-build-patches/0003-Update-to-netcoreapp3.1-to-avoid-prebuilts.patch
@@ -1,9 +1,9 @@
From b9a21ec1c0a77ef4e1e44840a0526545fea456de Mon Sep 17 00:00:00 2001
From: Davis Goodin
Date: Thu, 29 Oct 2020 01:48:54 -0500
-Subject: [PATCH] Update to net5.0 to avoid prebuilts
+Subject: [PATCH] Update to net6.0 to avoid prebuilts
-net5.0 avoids prebuilts (Microsoft.CSharp) but works with the
+net6.0 avoids prebuilts (Microsoft.CSharp) but works with the
rest of source-build: runtime and roslyn.
Includes a code fix for ref nullability with the new framework.
@@ -24,7 +24,7 @@ index b3a542fd..06167997 100644
true
- netstandard2.0
-+ net5.0
++ net6.0
This package includes the experimental DragonFruit app model for System.CommandLine, which allows you to create a command line application using only a Main method while getting support for complex type binding, error reporting, help, shell completions, and more.
@@ -37,7 +37,7 @@ index 1d00cff2..7342c1c5 100644
true
- netstandard2.0;netstandard2.1
-+ net5.0
++ net6.0
9
This package provides support for using System.CommandLine with Microsoft.Extensions.Hosting.
@@ -50,7 +50,7 @@ index d552286e..84026ebe 100644
true
- netstandard2.0
-+ net5.0
++ net6.0
9
This package provides support for structured command line output rendering. Write code once that renders correctly in multiple output modes, including System.Console, virtual terminal (using ANSI escape sequences), and plain text.
@@ -76,7 +76,7 @@ index aaa2c4a3..5e875a73 100644
true
System.CommandLine
- netstandard2.0
-+ net5.0
++ net6.0
9
enable
This package includes a powerful command line parser and other tools for building command line applications, including:
diff --git a/global.json b/global.json
index 8e9411ee92..860592bc84 100644
--- a/global.json
+++ b/global.json
@@ -1,12 +1,16 @@
{
+ "sdk": {
+ "version": "6.0.100-preview.6.21355.2",
+ "allowPrerelease": true,
+ "rollForward": "minor"
+ },
"tools": {
- "dotnet": "5.0.100",
+ "dotnet": "6.0.100-preview.6.21355.2",
"vs": {
- "version": "16.8"
- },
- "xcopy-msbuild": "16.8.0-preview2.1"
+ "version": "16.10"
+ }
},
"msbuild-sdks": {
- "Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.21167.3"
+ "Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.20630.2"
}
-}
+}
\ No newline at end of file
diff --git a/samples/DragonFruit/DragonFruit.csproj b/samples/DragonFruit/DragonFruit.csproj
index 2a9cb34d9c..40a81f2bdd 100644
--- a/samples/DragonFruit/DragonFruit.csproj
+++ b/samples/DragonFruit/DragonFruit.csproj
@@ -2,7 +2,7 @@
Exe
- net5.0
+ net6.0
true
diff --git a/samples/HostingPlayground/HostingPlayground.csproj b/samples/HostingPlayground/HostingPlayground.csproj
index bce0c33b0f..2514608ce3 100644
--- a/samples/HostingPlayground/HostingPlayground.csproj
+++ b/samples/HostingPlayground/HostingPlayground.csproj
@@ -2,7 +2,7 @@
Exe
- net5.0
+ net6.0
true
9
$(NoWarn);CS1591
diff --git a/samples/RenderingPlayground/RenderingPlayground.csproj b/samples/RenderingPlayground/RenderingPlayground.csproj
index 91eb00b8c5..aedc79300d 100644
--- a/samples/RenderingPlayground/RenderingPlayground.csproj
+++ b/samples/RenderingPlayground/RenderingPlayground.csproj
@@ -2,7 +2,7 @@
Exe
- net5.0
+ net6.0
true
9
diff --git a/src/System.CommandLine.Benchmarks/System.CommandLine.Benchmarks.csproj b/src/System.CommandLine.Benchmarks/System.CommandLine.Benchmarks.csproj
index 2975eac115..dba3a32450 100644
--- a/src/System.CommandLine.Benchmarks/System.CommandLine.Benchmarks.csproj
+++ b/src/System.CommandLine.Benchmarks/System.CommandLine.Benchmarks.csproj
@@ -9,8 +9,8 @@
false
- net461;net5.0;
- net5.0;
+ net461;net6.0;
+ net6.0;
9
diff --git a/src/System.CommandLine.DragonFruit.Tests/System.CommandLine.DragonFruit.Tests.csproj b/src/System.CommandLine.DragonFruit.Tests/System.CommandLine.DragonFruit.Tests.csproj
index 8994befbd7..23aa033d61 100644
--- a/src/System.CommandLine.DragonFruit.Tests/System.CommandLine.DragonFruit.Tests.csproj
+++ b/src/System.CommandLine.DragonFruit.Tests/System.CommandLine.DragonFruit.Tests.csproj
@@ -1,6 +1,6 @@
- net5.0
+ net6.0
AutoGeneratedProgram
true
diff --git a/src/System.CommandLine.Hosting.Tests/System.CommandLine.Hosting.Tests.csproj b/src/System.CommandLine.Hosting.Tests/System.CommandLine.Hosting.Tests.csproj
index 34bac83c0f..a4e99105d5 100644
--- a/src/System.CommandLine.Hosting.Tests/System.CommandLine.Hosting.Tests.csproj
+++ b/src/System.CommandLine.Hosting.Tests/System.CommandLine.Hosting.Tests.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
$(TargetFrameworks);net462
9
false
@@ -18,7 +18,7 @@
-
+
diff --git a/src/System.CommandLine.Rendering.Tests/System.CommandLine.Rendering.Tests.csproj b/src/System.CommandLine.Rendering.Tests/System.CommandLine.Rendering.Tests.csproj
index c445d2df42..447e19088e 100644
--- a/src/System.CommandLine.Rendering.Tests/System.CommandLine.Rendering.Tests.csproj
+++ b/src/System.CommandLine.Rendering.Tests/System.CommandLine.Rendering.Tests.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
9
false
diff --git a/src/System.CommandLine.Suggest.Tests/EndToEndTestApp/EndToEndTestApp.csproj b/src/System.CommandLine.Suggest.Tests/EndToEndTestApp/EndToEndTestApp.csproj
index 1e277af463..b02804285c 100644
--- a/src/System.CommandLine.Suggest.Tests/EndToEndTestApp/EndToEndTestApp.csproj
+++ b/src/System.CommandLine.Suggest.Tests/EndToEndTestApp/EndToEndTestApp.csproj
@@ -6,7 +6,7 @@
Exe
- net5.0
+ net6.0
9
diff --git a/src/System.CommandLine.Suggest.Tests/dotnet-suggest.Tests.csproj b/src/System.CommandLine.Suggest.Tests/dotnet-suggest.Tests.csproj
index 1eae028185..da6abedf0b 100644
--- a/src/System.CommandLine.Suggest.Tests/dotnet-suggest.Tests.csproj
+++ b/src/System.CommandLine.Suggest.Tests/dotnet-suggest.Tests.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
diff --git a/src/System.CommandLine.Suggest/dotnet-suggest.csproj b/src/System.CommandLine.Suggest/dotnet-suggest.csproj
index 84e75bd1e3..ae97dfe61f 100644
--- a/src/System.CommandLine.Suggest/dotnet-suggest.csproj
+++ b/src/System.CommandLine.Suggest/dotnet-suggest.csproj
@@ -1,7 +1,7 @@
Exe
- net5.0
+ net6.0
true
true
dotnet-suggest
diff --git a/src/System.CommandLine.Tests/System.CommandLine.Tests.csproj b/src/System.CommandLine.Tests/System.CommandLine.Tests.csproj
index 09c2a2c444..8abb292c39 100644
--- a/src/System.CommandLine.Tests/System.CommandLine.Tests.csproj
+++ b/src/System.CommandLine.Tests/System.CommandLine.Tests.csproj
@@ -1,6 +1,6 @@
- net5.0
+ net6.0
$(TargetFrameworks);net462
9
false
diff --git a/src/System.CommandLine/System.CommandLine.csproj b/src/System.CommandLine/System.CommandLine.csproj
index 9d57b41cf6..f9e2f0b416 100644
--- a/src/System.CommandLine/System.CommandLine.csproj
+++ b/src/System.CommandLine/System.CommandLine.csproj
@@ -4,7 +4,7 @@
true
System.CommandLine
netstandard2.0
- 9
+ 10.0
enable
This package includes a powerful command line parser and other tools for building command line applications, including: