diff --git a/.travis.yml b/.travis.yml
index 767c16a385..22acb82a11 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -4,40 +4,20 @@ os:
- linux
- osx
-osx_image: xcode9
+osx_image: xcode11.2
mono:
- weekly
- latest
- - 5.8.0
+ - 6.0.0
-dotnet: 2.1.4
+dotnet: 3.0.100
sudo: false
install:
script:
- - ./fcs/build.sh Build
-
-# Woes with doing more build/test on linux
-#
-# This fails because NUnit gives an exception (!!!!)
-# - ./fcs/build.sh Test.NetFx
-#
-# System.IO.FileNotFoundException: Could not load file or assembly 'nunit.engine.api, Version=3.0.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb' or one of its dependencies.
-#
-# This fails because Nuget packaging doesn't like backslashes in the package file, but Windows does
-# - ./fcs/build.sh NuGet
-
-# Fails on Travis OSX too often because there are network outages on that configuration getting the Mono MDK
-# Fails on Travis Linux with Mono latest do to a trust issue with certs on package restore?
-matrix:
- exclude:
- - os: osx
- mono: 4.4.2
- - os: osx
- mono: 4.8.0
- - os: linux
- mono: latest
+ - ./fcs/build.sh
+
diff --git a/FSharp.Profiles.props b/FSharp.Profiles.props
index c9e761c997..65cfa205e6 100644
--- a/FSharp.Profiles.props
+++ b/FSharp.Profiles.props
@@ -5,16 +5,12 @@
$(DefineConstants);CROSS_PLATFORM_COMPILER
$(DefineConstants);ENABLE_MONO_SUPPORT
- $(DefineConstants);BE_SECURITY_TRANSPARENT
$(DefineConstants);NETSTANDARD
$(DefineConstants);FX_NO_APP_DOMAINS
$(DefineConstants);FX_NO_CORHOST_SIGNER
- $(DefineConstants);FX_NO_EVENTWAITHANDLE_IDISPOSABLE
- $(DefineConstants);FX_NO_EXIT_CONTEXT_FLAGS
- $(DefineConstants);FX_NO_PARAMETERIZED_THREAD_START
$(DefineConstants);FX_NO_PDB_READER
$(DefineConstants);FX_NO_PDB_WRITER
$(DefineConstants);FX_NO_SYMBOLSTORE
diff --git a/appveyor.yml b/appveyor.yml
index 8525a84874..b72f230f0e 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -1,4 +1,4 @@
-os: Visual Studio 2017
+os: Visual Studio 2019
init:
- git config --global core.autocrlf input
@@ -9,5 +9,4 @@ build_script:
test: off
version: '{build}'
artifacts:
- - path: release\fcs\*.nupkg
- type: NuGetPackage
\ No newline at end of file
+ - path: artifacts\bin\fcs\Release\*.nupkg
\ No newline at end of file
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 9470178a3b..c39e4f27f1 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -3,9 +3,9 @@
-
+
https://github.com/dotnet/arcade
- b62f1617f2c453497fd55697c04dd8021a38dc17
+ b902fd6b6948e689a5128fa6d94dc7de13e6af84
diff --git a/eng/Versions.props b/eng/Versions.props
index caa59fe65e..f923de9fde 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -23,14 +23,14 @@
$(FSCorePackageVersion)-$(PreReleaseVersionLabel).*
- 10.6
+ 10.7
$(FSPackageMajorVersion).0
$(FSPackageVersion)
$(FSPackageVersion).0
16
- 3
+ 4
$(VSMajorVersion).0
$(VSMajorVersion).$(VSMinorVersion).0
$(VSAssemblyVersionPrefix).0
@@ -155,7 +155,7 @@
16.1.28917.181
15.3.58
9.0.30729
- 16.0.2264
+ 16.3.2099
12.0.4
7.0.4
8.0.4
diff --git a/eng/build-utils.ps1 b/eng/build-utils.ps1
index 772de110ca..000319af33 100644
--- a/eng/build-utils.ps1
+++ b/eng/build-utils.ps1
@@ -237,14 +237,14 @@ function Make-BootstrapBuild() {
Create-Directory $dir
# prepare FsLex and Fsyacc and AssemblyCheck
- Run-MSBuild "$RepoRoot\src\buildtools\buildtools.proj" "/restore /t:Publish" -logFileName "BuildTools" -configuration $bootstrapConfiguration
+ Run-MSBuild "$RepoRoot\src\buildtools\buildtools.proj" "/restore /t:Publish /p:PublishWindowsPdb=false" -logFileName "BuildTools" -configuration $bootstrapConfiguration
Copy-Item "$ArtifactsDir\bin\fslex\$bootstrapConfiguration\netcoreapp2.1\publish" -Destination "$dir\fslex" -Force -Recurse
Copy-Item "$ArtifactsDir\bin\fsyacc\$bootstrapConfiguration\netcoreapp2.1\publish" -Destination "$dir\fsyacc" -Force -Recurse
Copy-Item "$ArtifactsDir\bin\AssemblyCheck\$bootstrapConfiguration\netcoreapp2.1\publish" -Destination "$dir\AssemblyCheck" -Force -Recurse
# prepare compiler
$projectPath = "$RepoRoot\proto.proj"
- Run-MSBuild $projectPath "/restore /t:Publish /p:TargetFramework=$bootstrapTfm;ProtoTargetFramework=$bootstrapTfm" -logFileName "Bootstrap" -configuration $bootstrapConfiguration
+ Run-MSBuild $projectPath "/restore /t:Publish /p:TargetFramework=$bootstrapTfm;ProtoTargetFramework=$bootstrapTfm /p:PublishWindowsPdb=false" -logFileName "Bootstrap" -configuration $bootstrapConfiguration
Copy-Item "$ArtifactsDir\bin\fsc\$bootstrapConfiguration\$bootstrapTfm\publish" -Destination "$dir\fsc" -Force -Recurse
Copy-Item "$ArtifactsDir\bin\fsi\$bootstrapConfiguration\$bootstrapTfm\publish" -Destination "$dir\fsi" -Force -Recurse
diff --git a/eng/common/CheckSymbols.ps1 b/eng/common/CheckSymbols.ps1
index b8d84607b8..5442eff386 100644
--- a/eng/common/CheckSymbols.ps1
+++ b/eng/common/CheckSymbols.ps1
@@ -5,11 +5,12 @@ param(
)
Add-Type -AssemblyName System.IO.Compression.FileSystem
+. $PSScriptRoot\pipeline-logging-functions.ps1
function FirstMatchingSymbolDescriptionOrDefault {
param(
[string] $FullPath, # Full path to the module that has to be checked
- [string] $TargetServerParam, # Parameter to pass to `Symbol Tool` indicating the server to lookup for symbols
+ [string] $TargetServerParameter, # Parameter to pass to `Symbol Tool` indicating the server to lookup for symbols
[string] $SymbolsPath
)
@@ -21,36 +22,36 @@ function FirstMatchingSymbolDescriptionOrDefault {
# checking and which type of file was uploaded.
# The file itself is returned
- $SymbolPath = $SymbolsPath + "\" + $FileName
+ $SymbolPath = $SymbolsPath + '\' + $FileName
# PDB file for the module
- $PdbPath = $SymbolPath.Replace($Extension, ".pdb")
+ $PdbPath = $SymbolPath.Replace($Extension, '.pdb')
# PDB file for R2R module (created by crossgen)
- $NGenPdb = $SymbolPath.Replace($Extension, ".ni.pdb")
+ $NGenPdb = $SymbolPath.Replace($Extension, '.ni.pdb')
# DBG file for a .so library
- $SODbg = $SymbolPath.Replace($Extension, ".so.dbg")
+ $SODbg = $SymbolPath.Replace($Extension, '.so.dbg')
# DWARF file for a .dylib
- $DylibDwarf = $SymbolPath.Replace($Extension, ".dylib.dwarf")
+ $DylibDwarf = $SymbolPath.Replace($Extension, '.dylib.dwarf')
- .\dotnet-symbol.exe --symbols --modules --windows-pdbs $TargetServerParam $FullPath -o $SymbolsPath | Out-Null
+ .\dotnet-symbol.exe --symbols --modules --windows-pdbs $TargetServerParameter $FullPath -o $SymbolsPath | Out-Null
if (Test-Path $PdbPath) {
- return "PDB"
+ return 'PDB'
}
elseif (Test-Path $NGenPdb) {
- return "NGen PDB"
+ return 'NGen PDB'
}
elseif (Test-Path $SODbg) {
- return "DBG for SO"
+ return 'DBG for SO'
}
elseif (Test-Path $DylibDwarf) {
- return "Dwarf for Dylib"
+ return 'Dwarf for Dylib'
}
elseif (Test-Path $SymbolPath) {
- return "Module"
+ return 'Module'
}
else {
return $null
@@ -68,7 +69,7 @@ function CountMissingSymbols {
}
# Extensions for which we'll look for symbols
- $RelevantExtensions = @(".dll", ".exe", ".so", ".dylib")
+ $RelevantExtensions = @('.dll', '.exe', '.so', '.dylib')
# How many files are missing symbol information
$MissingSymbols = 0
@@ -76,7 +77,7 @@ function CountMissingSymbols {
$PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath)
$PackageGuid = New-Guid
$ExtractPath = Join-Path -Path $ExtractPath -ChildPath $PackageGuid
- $SymbolsPath = Join-Path -Path $ExtractPath -ChildPath "Symbols"
+ $SymbolsPath = Join-Path -Path $ExtractPath -ChildPath 'Symbols'
[System.IO.Compression.ZipFile]::ExtractToDirectory($PackagePath, $ExtractPath)
@@ -86,31 +87,31 @@ function CountMissingSymbols {
Get-ChildItem -Recurse $ExtractPath |
Where-Object {$RelevantExtensions -contains $_.Extension} |
ForEach-Object {
- if ($_.FullName -Match "\\ref\\") {
+ if ($_.FullName -Match '\\ref\\') {
Write-Host "`t Ignoring reference assembly file" $_.FullName
return
}
- $SymbolsOnMSDL = FirstMatchingSymbolDescriptionOrDefault $_.FullName "--microsoft-symbol-server" $SymbolsPath
- $SymbolsOnSymWeb = FirstMatchingSymbolDescriptionOrDefault $_.FullName "--internal-server" $SymbolsPath
+ $SymbolsOnMSDL = FirstMatchingSymbolDescriptionOrDefault -FullPath $_.FullName -TargetServerParameter '--microsoft-symbol-server' -SymbolsPath $SymbolsPath
+ $SymbolsOnSymWeb = FirstMatchingSymbolDescriptionOrDefault -FullPath $_.FullName -TargetServerParameter '--internal-server' -SymbolsPath $SymbolsPath
Write-Host -NoNewLine "`t Checking file" $_.FullName "... "
if ($SymbolsOnMSDL -ne $null -and $SymbolsOnSymWeb -ne $null) {
- Write-Host "Symbols found on MSDL (" $SymbolsOnMSDL ") and SymWeb (" $SymbolsOnSymWeb ")"
+ Write-Host "Symbols found on MSDL (${$SymbolsOnMSDL}) and SymWeb (${$SymbolsOnSymWeb})"
}
else {
$MissingSymbols++
if ($SymbolsOnMSDL -eq $null -and $SymbolsOnSymWeb -eq $null) {
- Write-Host "No symbols found on MSDL or SymWeb!"
+ Write-Host 'No symbols found on MSDL or SymWeb!'
}
else {
if ($SymbolsOnMSDL -eq $null) {
- Write-Host "No symbols found on MSDL!"
+ Write-Host 'No symbols found on MSDL!'
}
else {
- Write-Host "No symbols found on SymWeb!"
+ Write-Host 'No symbols found on SymWeb!'
}
}
}
@@ -129,26 +130,26 @@ function CheckSymbolsAvailable {
Get-ChildItem "$InputPath\*.nupkg" |
ForEach-Object {
$FileName = $_.Name
-
+
# These packages from Arcade-Services include some native libraries that
# our current symbol uploader can't handle. Below is a workaround until
# we get issue: https://github.com/dotnet/arcade/issues/2457 sorted.
- if ($FileName -Match "Microsoft\.DotNet\.Darc\.") {
+ if ($FileName -Match 'Microsoft\.DotNet\.Darc\.') {
Write-Host "Ignoring Arcade-services file: $FileName"
Write-Host
return
}
- elseif ($FileName -Match "Microsoft\.DotNet\.Maestro\.Tasks\.") {
+ elseif ($FileName -Match 'Microsoft\.DotNet\.Maestro\.Tasks\.') {
Write-Host "Ignoring Arcade-services file: $FileName"
Write-Host
return
}
-
+
Write-Host "Validating $FileName "
$Status = CountMissingSymbols "$InputPath\$FileName"
if ($Status -ne 0) {
- Write-Error "Missing symbols for $Status modules in the package $FileName"
+ Write-PipelineTelemetryError -Category 'CheckSymbols' -Message "Missing symbols for $Status modules in the package $FileName"
}
Write-Host
diff --git a/eng/common/SetupNugetSources.ps1 b/eng/common/SetupNugetSources.ps1
index 2cb40c2947..a5a1e711d7 100644
--- a/eng/common/SetupNugetSources.ps1
+++ b/eng/common/SetupNugetSources.ps1
@@ -16,7 +16,7 @@
# 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
+# arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token
# env:
# Token: $(dn-bot-dnceng-artifact-feeds-rw)
@@ -95,10 +95,15 @@ function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Password) {
}
if (!(Test-Path $ConfigFile -PathType Leaf)) {
- Write-Host "Couldn't find the file NuGet config file: $ConfigFile"
+ Write-PipelineTelemetryError -Category 'Build' -Message "Eng/common/SetupNugetSources.ps1 returned a non-zero exit code. Couldn't find the NuGet config file: $ConfigFile"
ExitWithExitCode 1
}
+if (!$Password) {
+ Write-PipelineTelemetryError -Category 'Build' -Message 'Eng/common/SetupNugetSources.ps1 returned a non-zero exit code. Please supply a valid PAT'
+ ExitWithExitCode 1
+}
+
# Load NuGet.config
$doc = New-Object System.Xml.XmlDocument
$filename = (Get-Item $ConfigFile).FullName
@@ -121,7 +126,16 @@ if ($creds -eq $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
+$dotnet3Source = $sources.SelectSingleNode("add[@key='dotnet3']")
+if ($dotnet3Source -ne $null) {
+ 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
+}
+
+$dotnet31Source = $sources.SelectSingleNode("add[@key='dotnet3.1']")
+if ($dotnet31Source -ne $null) {
+ AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password
+ AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-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
index 1264521317..7d6fef27fe 100644
--- a/eng/common/SetupNugetSources.sh
+++ b/eng/common/SetupNugetSources.sh
@@ -17,7 +17,7 @@
# displayName: Setup Private Feeds Credentials
# inputs:
# filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh
-# arguments: $BUILD_SOURCESDIRECTORY/NuGet.config $Token
+# arguments: $(Build.SourcesDirectory)/NuGet.config $Token
# condition: ne(variables['Agent.OS'], 'Windows_NT')
# env:
# Token: $(dn-bot-dnceng-artifact-feeds-rw)
@@ -42,7 +42,12 @@ scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
. "$scriptroot/tools.sh"
if [ ! -f "$ConfigFile" ]; then
- echo "Couldn't find the file NuGet config file: $ConfigFile"
+ Write-PipelineTelemetryError -Category 'Build' "Error: Eng/common/SetupNugetSources.sh returned a non-zero exit code. Couldn't find the NuGet config file: $ConfigFile"
+ ExitWithExitCode 1
+fi
+
+if [ -z "$CredToken" ]; then
+ Write-PipelineTelemetryError -category 'Build' "Error: Eng/common/SetupNugetSources.sh returned a non-zero exit code. Please supply a valid PAT"
ExitWithExitCode 1
fi
@@ -52,7 +57,7 @@ if [[ `uname -s` == "Darwin" ]]; then
fi
# Ensure there is a ... section.
-grep -i "" $ConfigFile
+grep -i "" $ConfigFile
if [ "$?" != "0" ]; then
echo "Adding ... section."
ConfigNodeHeader=""
@@ -62,7 +67,7 @@ if [ "$?" != "0" ]; then
fi
# Ensure there is a ... section.
-grep -i "" $ConfigFile
+grep -i "" $ConfigFile
if [ "$?" != "0" ]; then
echo "Adding ... section."
@@ -72,37 +77,64 @@ if [ "$?" != "0" ]; then
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourcesNodeFooter${NL}$PackageSourceCredentialsTemplate|" NuGet.config
fi
-# Ensure dotnet3-internal and dotnet3-internal-transport is in the packageSources
-grep -i "" $ConfigFile
-if [ "$?" != "0" ]; then
- echo "Adding dotnet3-internal to the packageSources."
+PackageSources=()
- PackageSourcesNodeFooter=""
- PackageSourceTemplate="${TB}"
+# Ensure dotnet3-internal and dotnet3-internal-transport are in the packageSources if the public dotnet3 feeds are present
+grep -i "" $ConfigFile
+ if [ "$?" != "0" ]; then
+ echo "Adding dotnet3-internal to the packageSources."
+ PackageSourcesNodeFooter=""
+ PackageSourceTemplate="${TB}"
+
+ sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
+ fi
+ PackageSources+=('dotnet3-internal')
+
+ grep -i ""
- sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" NuGet.config
+ sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
+ fi
+ PackageSources+=('dotnet3-internal-transport')
fi
-# Ensure dotnet3-internal and dotnet3-internal-transport is in the packageSources
-grep -i "" $ConfigFile
-if [ "$?" != "0" ]; then
- echo "Adding dotnet3-internal-transport to the packageSources."
+# Ensure dotnet3.1-internal and dotnet3.1-internal-transport are in the packageSources if the public dotnet3.1 feeds are present
+grep -i ""
- PackageSourcesNodeFooter=""
- PackageSourceTemplate="${TB}"
+ sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
+ fi
+ PackageSources+=('dotnet3.1-internal')
+
+ grep -i "" $ConfigFile
+ if [ "$?" != "0" ]; then
+ echo "Adding dotnet3.1-internal-transport to the packageSources."
+ PackageSourcesNodeFooter=""
+ PackageSourceTemplate="${TB}"
- sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" NuGet.config
+ sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
+ fi
+ PackageSources+=('dotnet3.1-internal-transport')
fi
# I want things split line by line
PrevIFS=$IFS
IFS=$'\n'
-PackageSources=$(grep -oh '"darc-int-[^"]*"' $ConfigFile | tr -d '"')
+PackageSources+="$IFS"
+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
@@ -112,6 +144,6 @@ for FeedName in ${PackageSources[@]} ; do
PackageSourceCredentialsNodeFooter=""
NewCredential="${TB}${TB}<$FeedName>${NL}${NL}${NL}$FeedName>"
- sed -i.bak "s|$PackageSourceCredentialsNodeFooter|$NewCredential${NL}$PackageSourceCredentialsNodeFooter|" NuGet.config
+ sed -i.bak "s|$PackageSourceCredentialsNodeFooter|$NewCredential${NL}$PackageSourceCredentialsNodeFooter|" $ConfigFile
fi
done
diff --git a/eng/common/SourceLinkValidation.ps1 b/eng/common/SourceLinkValidation.ps1
index cb2d28cb99..0e4c349e00 100644
--- a/eng/common/SourceLinkValidation.ps1
+++ b/eng/common/SourceLinkValidation.ps1
@@ -6,140 +6,15 @@ param(
[Parameter(Mandatory=$true)][string] $GHCommit # GitHub commit SHA used to build the packages
)
-# Cache/HashMap (File -> Exist flag) used to consult whether a file exist
-# in the repository at a specific commit point. This is populated by inserting
-# all files present in the repo at a specific commit point.
-$global:RepoFiles = @{}
-
-$ValidatePackage = {
- param(
- [string] $PackagePath # Full path to a Symbols.NuGet package
- )
-
- # Ensure input file exist
- if (!(Test-Path $PackagePath)) {
- throw "Input file does not exist: $PackagePath"
- }
-
- # Extensions for which we'll look for SourceLink information
- # For now we'll only care about Portable & Embedded PDBs
- $RelevantExtensions = @(".dll", ".exe", ".pdb")
-
- Write-Host -NoNewLine "Validating" ([System.IO.Path]::GetFileName($PackagePath)) "... "
-
- $PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath)
- $ExtractPath = Join-Path -Path $using:ExtractPath -ChildPath $PackageId
- $FailedFiles = 0
-
- Add-Type -AssemblyName System.IO.Compression.FileSystem
-
- [System.IO.Directory]::CreateDirectory($ExtractPath);
-
- $zip = [System.IO.Compression.ZipFile]::OpenRead($PackagePath)
-
- $zip.Entries |
- Where-Object {$RelevantExtensions -contains [System.IO.Path]::GetExtension($_.Name)} |
- ForEach-Object {
- $FileName = $_.FullName
- $Extension = [System.IO.Path]::GetExtension($_.Name)
- $FakeName = -Join((New-Guid), $Extension)
- $TargetFile = Join-Path -Path $ExtractPath -ChildPath $FakeName
-
- # We ignore resource DLLs
- if ($FileName.EndsWith(".resources.dll")) {
- return
- }
-
- [System.IO.Compression.ZipFileExtensions]::ExtractToFile($_, $TargetFile, $true)
-
- $ValidateFile = {
- param(
- [string] $FullPath, # Full path to the module that has to be checked
- [string] $RealPath,
- [ref] $FailedFiles
- )
-
- # Makes easier to reference `sourcelink cli`
- Push-Location $using:SourceLinkToolPath
-
- $SourceLinkInfos = .\sourcelink.exe print-urls $FullPath | Out-String
-
- if ($LASTEXITCODE -eq 0 -and -not ([string]::IsNullOrEmpty($SourceLinkInfos))) {
- $NumFailedLinks = 0
-
- # We only care about Http addresses
- $Matches = (Select-String '(http[s]?)(:\/\/)([^\s,]+)' -Input $SourceLinkInfos -AllMatches).Matches
-
- if ($Matches.Count -ne 0) {
- $Matches.Value |
- ForEach-Object {
- $Link = $_
- $CommitUrl = -Join("https://raw.githubusercontent.com/", $using:GHRepoName, "/", $using:GHCommit, "/")
- $FilePath = $Link.Replace($CommitUrl, "")
- $Status = 200
- $Cache = $using:RepoFiles
-
- if ( !($Cache.ContainsKey($FilePath)) ) {
- try {
- $Uri = $Link -as [System.URI]
-
- # Only GitHub links are valid
- if ($Uri.AbsoluteURI -ne $null -and $Uri.Host -match "github") {
- $Status = (Invoke-WebRequest -Uri $Link -UseBasicParsing -Method HEAD -TimeoutSec 5).StatusCode
- }
- else {
- $Status = 0
- }
- }
- catch {
- $Status = 0
- }
- }
-
- if ($Status -ne 200) {
- if ($NumFailedLinks -eq 0) {
- if ($FailedFiles.Value -eq 0) {
- Write-Host
- }
-
- Write-Host "`tFile $RealPath has broken links:"
- }
-
- Write-Host "`t`tFailed to retrieve $Link"
-
- $NumFailedLinks++
- }
- }
- }
-
- if ($NumFailedLinks -ne 0) {
- $FailedFiles.value++
- $global:LASTEXITCODE = 1
- }
- }
-
- Pop-Location
- }
-
- &$ValidateFile $TargetFile $FileName ([ref]$FailedFiles)
- }
-
- $zip.Dispose()
-
- if ($FailedFiles -eq 0) {
- Write-Host "Passed."
- }
-}
-
function ValidateSourceLinkLinks {
if (!($GHRepoName -Match "^[^\s\/]+/[^\s\/]+$")) {
- Write-Host "GHRepoName should be in the format /"
+ Write-PipelineTelemetryError -Category "Build" -Message "GHRepoName should be in the format /"
$global:LASTEXITCODE = 1
return
}
if (!($GHCommit -Match "^[0-9a-fA-F]{40}$")) {
- Write-Host "GHCommit should be a 40 chars hexadecimal string"
+ Write-PipelineTelemetryError -Category "Build" -Message "GHCommit should be a 40 chars hexadecimal string"
$global:LASTEXITCODE = 1
return
}
@@ -160,7 +35,7 @@ function ValidateSourceLinkLinks {
}
}
catch {
- Write-Host "Problems downloading the list of files from the repo. Url used: $RepoTreeURL"
+ Write-PipelineTelemetryError -Category "Build" -Message "Problems downloading the list of files from the repo. Url used: $RepoTreeURL"
$global:LASTEXITCODE = 1
return
}
@@ -181,4 +56,140 @@ function ValidateSourceLinkLinks {
}
}
-Measure-Command { ValidateSourceLinkLinks }
+try {
+ . $PSScriptRoot\pipeline-logging-functions.ps1
+
+ # Cache/HashMap (File -> Exist flag) used to consult whether a file exist
+ # in the repository at a specific commit point. This is populated by inserting
+ # all files present in the repo at a specific commit point.
+ $global:RepoFiles = @{}
+
+ $ValidatePackage = {
+ param(
+ [string] $PackagePath # Full path to a Symbols.NuGet package
+ )
+
+ # Ensure input file exist
+ if (!(Test-Path $PackagePath)) {
+ throw "Input file does not exist: $PackagePath"
+ }
+
+ # Extensions for which we'll look for SourceLink information
+ # For now we'll only care about Portable & Embedded PDBs
+ $RelevantExtensions = @(".dll", ".exe", ".pdb")
+
+ Write-Host -NoNewLine "Validating" ([System.IO.Path]::GetFileName($PackagePath)) "... "
+
+ $PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath)
+ $ExtractPath = Join-Path -Path $using:ExtractPath -ChildPath $PackageId
+ $FailedFiles = 0
+
+ Add-Type -AssemblyName System.IO.Compression.FileSystem
+
+ [System.IO.Directory]::CreateDirectory($ExtractPath);
+
+ $zip = [System.IO.Compression.ZipFile]::OpenRead($PackagePath)
+
+ $zip.Entries |
+ Where-Object {$RelevantExtensions -contains [System.IO.Path]::GetExtension($_.Name)} |
+ ForEach-Object {
+ $FileName = $_.FullName
+ $Extension = [System.IO.Path]::GetExtension($_.Name)
+ $FakeName = -Join((New-Guid), $Extension)
+ $TargetFile = Join-Path -Path $ExtractPath -ChildPath $FakeName
+
+ # We ignore resource DLLs
+ if ($FileName.EndsWith(".resources.dll")) {
+ return
+ }
+
+ [System.IO.Compression.ZipFileExtensions]::ExtractToFile($_, $TargetFile, $true)
+
+ $ValidateFile = {
+ param(
+ [string] $FullPath, # Full path to the module that has to be checked
+ [string] $RealPath,
+ [ref] $FailedFiles
+ )
+
+ # Makes easier to reference `sourcelink cli`
+ Push-Location $using:SourceLinkToolPath
+
+ $SourceLinkInfos = .\sourcelink.exe print-urls $FullPath | Out-String
+
+ if ($LASTEXITCODE -eq 0 -and -not ([string]::IsNullOrEmpty($SourceLinkInfos))) {
+ $NumFailedLinks = 0
+
+ # We only care about Http addresses
+ $Matches = (Select-String '(http[s]?)(:\/\/)([^\s,]+)' -Input $SourceLinkInfos -AllMatches).Matches
+
+ if ($Matches.Count -ne 0) {
+ $Matches.Value |
+ ForEach-Object {
+ $Link = $_
+ $CommitUrl = -Join("https://raw.githubusercontent.com/", $using:GHRepoName, "/", $using:GHCommit, "/")
+ $FilePath = $Link.Replace($CommitUrl, "")
+ $Status = 200
+ $Cache = $using:RepoFiles
+
+ if ( !($Cache.ContainsKey($FilePath)) ) {
+ try {
+ $Uri = $Link -as [System.URI]
+
+ # Only GitHub links are valid
+ if ($Uri.AbsoluteURI -ne $null -and $Uri.Host -match "github") {
+ $Status = (Invoke-WebRequest -Uri $Link -UseBasicParsing -Method HEAD -TimeoutSec 5).StatusCode
+ }
+ else {
+ $Status = 0
+ }
+ }
+ catch {
+ $Status = 0
+ }
+ }
+
+ if ($Status -ne 200) {
+ if ($NumFailedLinks -eq 0) {
+ if ($FailedFiles.Value -eq 0) {
+ Write-Host
+ }
+
+ Write-Host "`tFile $RealPath has broken links:"
+ }
+
+ Write-Host "`t`tFailed to retrieve $Link"
+
+ $NumFailedLinks++
+ }
+ }
+ }
+
+ if ($NumFailedLinks -ne 0) {
+ $FailedFiles.value++
+ $global:LASTEXITCODE = 1
+ }
+ }
+
+ Pop-Location
+ }
+
+ &$ValidateFile $TargetFile $FileName ([ref]$FailedFiles)
+ }
+
+ $zip.Dispose()
+
+ if ($FailedFiles -eq 0) {
+ Write-Host "Passed."
+ }
+ }
+
+ Measure-Command { ValidateSourceLinkLinks }
+}
+catch {
+ Write-Host $_.ScriptStackTrace
+ Write-PipelineTelemetryError -Category 'SourceLink' -Message $_
+ ExitWithExitCode 1
+}
+
+
diff --git a/eng/common/build.ps1 b/eng/common/build.ps1
index 55dff33204..88814514d8 100644
--- a/eng/common/build.ps1
+++ b/eng/common/build.ps1
@@ -26,50 +26,50 @@ Param(
[Parameter(ValueFromRemainingArguments=$true)][String[]]$properties
)
-. $PSScriptRoot\tools.ps1
-
function Print-Usage() {
- Write-Host "Common settings:"
- Write-Host " -configuration Build configuration: 'Debug' or 'Release' (short: -c)"
- Write-Host " -platform Platform configuration: 'x86', 'x64' or any valid Platform value to pass to msbuild"
- Write-Host " -verbosity Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic] (short: -v)"
- Write-Host " -binaryLog Output binary log (short: -bl)"
- Write-Host " -help Print help and exit"
- Write-Host ""
-
- Write-Host "Actions:"
- Write-Host " -restore Restore dependencies (short: -r)"
- Write-Host " -build Build solution (short: -b)"
- Write-Host " -rebuild Rebuild solution"
- Write-Host " -deploy Deploy built VSIXes"
- Write-Host " -deployDeps Deploy dependencies (e.g. VSIXes for integration tests)"
- Write-Host " -test Run all unit tests in the solution (short: -t)"
- Write-Host " -integrationTest Run all integration tests in the solution"
- Write-Host " -performanceTest Run all performance tests in the solution"
- 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:"
- Write-Host " -projects Semi-colon delimited list of sln/proj's to build. Globbing is supported (*.sln)"
- Write-Host " -ci Set when running on CI server"
- Write-Host " -prepareMachine Prepare machine for CI run, clean up processes after build"
- Write-Host " -warnAsError Sets warnaserror msbuild parameter ('true' or 'false')"
- Write-Host " -msbuildEngine Msbuild engine to use to run build ('dotnet', 'vs', or unspecified)."
- Write-Host ""
-
- Write-Host "Command line arguments not listed above are passed thru to msbuild."
- Write-Host "The above arguments can be shortened as much as to be unambiguous (e.g. -co for configuration, -t for test, etc.)."
+ Write-Host "Common settings:"
+ Write-Host " -configuration Build configuration: 'Debug' or 'Release' (short: -c)"
+ Write-Host " -platform Platform configuration: 'x86', 'x64' or any valid Platform value to pass to msbuild"
+ Write-Host " -verbosity Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic] (short: -v)"
+ Write-Host " -binaryLog Output binary log (short: -bl)"
+ Write-Host " -help Print help and exit"
+ Write-Host ""
+
+ Write-Host "Actions:"
+ Write-Host " -restore Restore dependencies (short: -r)"
+ Write-Host " -build Build solution (short: -b)"
+ Write-Host " -rebuild Rebuild solution"
+ Write-Host " -deploy Deploy built VSIXes"
+ Write-Host " -deployDeps Deploy dependencies (e.g. VSIXes for integration tests)"
+ Write-Host " -test Run all unit tests in the solution (short: -t)"
+ Write-Host " -integrationTest Run all integration tests in the solution"
+ Write-Host " -performanceTest Run all performance tests in the solution"
+ 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:"
+ Write-Host " -projects Semi-colon delimited list of sln/proj's to build. Globbing is supported (*.sln)"
+ Write-Host " -ci Set when running on CI server"
+ Write-Host " -prepareMachine Prepare machine for CI run, clean up processes after build"
+ Write-Host " -warnAsError Sets warnaserror msbuild parameter ('true' or 'false')"
+ Write-Host " -msbuildEngine Msbuild engine to use to run build ('dotnet', 'vs', or unspecified)."
+ Write-Host ""
+
+ Write-Host "Command line arguments not listed above are passed thru to msbuild."
+ Write-Host "The above arguments can be shortened as much as to be unambiguous (e.g. -co for configuration, -t for test, etc.)."
}
+. $PSScriptRoot\tools.ps1
+
function InitializeCustomToolset {
if (-not $restore) {
return
}
- $script = Join-Path $EngRoot "restore-toolset.ps1"
+ $script = Join-Path $EngRoot 'restore-toolset.ps1'
if (Test-Path $script) {
. $script
@@ -80,8 +80,8 @@ function Build {
$toolsetBuildProj = InitializeToolset
InitializeCustomToolset
- $bl = if ($binaryLog) { "/bl:" + (Join-Path $LogDir "Build.binlog") } else { "" }
- $platformArg = if ($platform) { "/p:Platform=$platform" } else { "" }
+ $bl = if ($binaryLog) { '/bl:' + (Join-Path $LogDir 'Build.binlog') } else { '' }
+ $platformArg = if ($platform) { "/p:Platform=$platform" } else { '' }
if ($projects) {
# Re-assign properties to a new variable because PowerShell doesn't let us append properties directly for unclear reasons.
@@ -114,16 +114,16 @@ function Build {
@properties
}
-if ($clean) {
- if(Test-Path $ArtifactsDir) {
- Remove-Item -Recurse -Force $ArtifactsDir
- Write-Host "Artifacts directory deleted."
+try {
+ if ($clean) {
+ if (Test-Path $ArtifactsDir) {
+ Remove-Item -Recurse -Force $ArtifactsDir
+ Write-Host 'Artifacts directory deleted.'
+ }
+ exit 0
}
- exit 0
-}
-try {
- if ($help -or (($null -ne $properties) -and ($properties.Contains("/help") -or $properties.Contains("/?")))) {
+ if ($help -or (($null -ne $properties) -and ($properties.Contains('/help') -or $properties.Contains('/?')))) {
Print-Usage
exit 0
}
@@ -141,7 +141,7 @@ try {
}
catch {
Write-Host $_.ScriptStackTrace
- Write-PipelineTelemetryError -Category "InitializeToolset" -Message $_
+ Write-PipelineTelemetryError -Category 'InitializeToolset' -Message $_
ExitWithExitCode 1
}
diff --git a/eng/common/cross/build-rootfs.sh b/eng/common/cross/build-rootfs.sh
index d7d5d7d5f4..8d61377a87 100755
--- a/eng/common/cross/build-rootfs.sh
+++ b/eng/common/cross/build-rootfs.sh
@@ -193,7 +193,7 @@ fi
if [[ "$__LinuxCodeName" == "alpine" ]]; then
__ApkToolsVersion=2.9.1
- __AlpineVersion=3.7
+ __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
diff --git a/eng/common/darc-init.ps1 b/eng/common/darc-init.ps1
index 5d7eaa5f94..fc2190365f 100644
--- a/eng/common/darc-init.ps1
+++ b/eng/common/darc-init.ps1
@@ -1,14 +1,14 @@
param (
$darcVersion = $null,
- $versionEndpoint = "https://maestro-prod.westus2.cloudapp.azure.com/api/assets/darc-version?api-version=2019-01-16",
- $verbosity = "m",
+ $versionEndpoint = 'https://maestro-prod.westus2.cloudapp.azure.com/api/assets/darc-version?api-version=2019-01-16',
+ $verbosity = 'minimal',
$toolpath = $null
)
. $PSScriptRoot\tools.ps1
function InstallDarcCli ($darcVersion) {
- $darcCliPackageName = "microsoft.dotnet.darc"
+ $darcCliPackageName = 'microsoft.dotnet.darc'
$dotnetRoot = InitializeDotNetCli -install:$true
$dotnet = "$dotnetRoot\dotnet.exe"
@@ -27,12 +27,19 @@ function InstallDarcCli ($darcVersion) {
$arcadeServicesSource = 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json'
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."
+ Write-Host 'You may need to restart your command window if this is the first dotnet tool you have installed.'
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"
+ & "$dotnet" tool install $darcCliPackageName --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity --tool-path "$toolpath"
}
}
-InstallDarcCli $darcVersion
+try {
+ InstallDarcCli $darcVersion
+}
+catch {
+ Write-Host $_.ScriptStackTrace
+ Write-PipelineTelemetryError -Category 'Darc' -Message $_
+ ExitWithExitCode 1
+}
\ No newline at end of file
diff --git a/eng/common/darc-init.sh b/eng/common/darc-init.sh
index 82b2b57677..d981d7bbf3 100755
--- a/eng/common/darc-init.sh
+++ b/eng/common/darc-init.sh
@@ -2,8 +2,8 @@
source="${BASH_SOURCE[0]}"
darcVersion=''
-versionEndpoint="https://maestro-prod.westus2.cloudapp.azure.com/api/assets/darc-version?api-version=2019-01-16"
-verbosity=m
+versionEndpoint='https://maestro-prod.westus2.cloudapp.azure.com/api/assets/darc-version?api-version=2019-01-16'
+verbosity='minimal'
while [[ $# > 0 ]]; do
opt="$(echo "$1" | awk '{print tolower($0)}')"
diff --git a/eng/common/dotnet-install.ps1 b/eng/common/dotnet-install.ps1
index ec3e739fe8..811f0f717f 100644
--- a/eng/common/dotnet-install.ps1
+++ b/eng/common/dotnet-install.ps1
@@ -1,28 +1,27 @@
[CmdletBinding(PositionalBinding=$false)]
Param(
- [string] $verbosity = "minimal",
- [string] $architecture = "",
- [string] $version = "Latest",
- [string] $runtime = "dotnet",
- [string] $RuntimeSourceFeed = "",
- [string] $RuntimeSourceFeedKey = ""
+ [string] $verbosity = 'minimal',
+ [string] $architecture = '',
+ [string] $version = 'Latest',
+ [string] $runtime = 'dotnet',
+ [string] $RuntimeSourceFeed = '',
+ [string] $RuntimeSourceFeedKey = ''
)
. $PSScriptRoot\tools.ps1
-$dotnetRoot = Join-Path $RepoRoot ".dotnet"
+$dotnetRoot = Join-Path $RepoRoot '.dotnet'
$installdir = $dotnetRoot
try {
- if ($architecture -and $architecture.Trim() -eq "x86") {
- $installdir = Join-Path $installdir "x86"
+ if ($architecture -and $architecture.Trim() -eq 'x86') {
+ $installdir = Join-Path $installdir 'x86'
}
- InstallDotNet $installdir $version $architecture $runtime $true -RuntimeSourceFeed $RuntimeSourceFeed -RuntimeSourceFeedKey $RuntimeSourceFeedKey
-}
+ InstallDotNet $installdir $version $architecture $runtime $true -RuntimeSourceFeed $RuntimeSourceFeed -RuntimeSourceFeedKey $RuntimeSourceFeedKey
+}
catch {
- Write-Host $_
- Write-Host $_.Exception
Write-Host $_.ScriptStackTrace
+ Write-PipelineTelemetryError -Category 'InitializeToolset' -Message $_
ExitWithExitCode 1
}
diff --git a/eng/common/dotnet-install.sh b/eng/common/dotnet-install.sh
index 94ea343882..50bc5e475c 100755
--- a/eng/common/dotnet-install.sh
+++ b/eng/common/dotnet-install.sh
@@ -11,6 +11,8 @@ while [[ -h "$source" ]]; do
done
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
+. "$scriptroot/tools.sh"
+
version='Latest'
architecture=''
runtime='dotnet'
@@ -40,7 +42,7 @@ while [[ $# > 0 ]]; do
runtimeSourceFeedKey="$1"
;;
*)
- echo "Invalid argument: $1"
+ Write-PipelineTelemetryError -Category 'Build' -Message "Invalid argument: $1"
exit 1
;;
esac
@@ -73,7 +75,6 @@ case $cpuname in
;;
esac
-. "$scriptroot/tools.sh"
dotnetRoot="$repo_root/.dotnet"
if [[ $architecture != "" ]] && [[ $architecture != $buildarch ]]; then
dotnetRoot="$dotnetRoot/$architecture"
@@ -81,7 +82,7 @@ fi
InstallDotNet $dotnetRoot $version "$architecture" $runtime true $runtimeSourceFeed $runtimeSourceFeedKey || {
local exit_code=$?
- echo "dotnet-install.sh failed (exit code '$exit_code')." >&2
+ Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "dotnet-install.sh failed (exit code '$exit_code')." >&2
ExitWithExitCode $exit_code
}
diff --git a/eng/common/generate-graph-files.ps1 b/eng/common/generate-graph-files.ps1
index b056e4c1ac..7ad26afa69 100644
--- a/eng/common/generate-graph-files.ps1
+++ b/eng/common/generate-graph-files.ps1
@@ -9,33 +9,33 @@ Param(
# toolset dependencies see https://github.com/dotnet/arcade/blob/master/Documentation/Darc.md#toolset-vs-product-dependencies
)
-$ErrorActionPreference = "Stop"
-. $PSScriptRoot\tools.ps1
-
-Import-Module -Name (Join-Path $PSScriptRoot "native\CommonLibrary.psm1")
-
function CheckExitCode ([string]$stage)
{
$exitCode = $LASTEXITCODE
if ($exitCode -ne 0) {
- Write-Host "Something failed in stage: '$stage'. Check for errors above. Exiting now..."
+ Write-PipelineTelemetryError -Category 'Arcade' -Message "Something failed in stage: '$stage'. Check for errors above. Exiting now..."
ExitWithExitCode $exitCode
}
}
try {
+ $ErrorActionPreference = 'Stop'
+ . $PSScriptRoot\tools.ps1
+
+ Import-Module -Name (Join-Path $PSScriptRoot 'native\CommonLibrary.psm1')
+
Push-Location $PSScriptRoot
- Write-Host "Installing darc..."
+ Write-Host 'Installing darc...'
. .\darc-init.ps1 -darcVersion $darcVersion
- CheckExitCode "Running darc-init"
+ CheckExitCode 'Running darc-init'
- $engCommonBaseDir = Join-Path $PSScriptRoot "native\"
+ $engCommonBaseDir = Join-Path $PSScriptRoot 'native\'
$graphvizInstallDir = CommonLibrary\Get-NativeInstallDirectory
- $nativeToolBaseUri = "https://netcorenativeassets.blob.core.windows.net/resource-packages/external"
- $installBin = Join-Path $graphvizInstallDir "bin"
+ $nativeToolBaseUri = 'https://netcorenativeassets.blob.core.windows.net/resource-packages/external'
+ $installBin = Join-Path $graphvizInstallDir 'bin'
- Write-Host "Installing dot..."
+ Write-Host 'Installing dot...'
.\native\install-tool.ps1 -ToolName graphviz -InstallPath $installBin -BaseUri $nativeToolBaseUri -CommonLibraryDirectory $engCommonBaseDir -Version $graphvizVersion -Verbose
$darcExe = "$env:USERPROFILE\.dotnet\tools"
@@ -51,37 +51,36 @@ try {
$graphVizImageFilePath = "$outputFolder\graph.png"
$normalGraphFilePath = "$outputFolder\graph-full.txt"
$flatGraphFilePath = "$outputFolder\graph-flat.txt"
- $baseOptions = @( "--github-pat", "$gitHubPat", "--azdev-pat", "$azdoPat", "--password", "$barToken" )
+ $baseOptions = @( '--github-pat', "$gitHubPat", '--azdev-pat', "$azdoPat", '--password', "$barToken" )
if ($includeToolset) {
- Write-Host "Toolsets will be included in the graph..."
- $baseOptions += @( "--include-toolset" )
+ Write-Host 'Toolsets will be included in the graph...'
+ $baseOptions += @( '--include-toolset' )
}
- Write-Host "Generating standard dependency graph..."
+ Write-Host 'Generating standard dependency graph...'
& "$darcExe" get-dependency-graph @baseOptions --output-file $normalGraphFilePath
- CheckExitCode "Generating normal dependency graph"
+ CheckExitCode 'Generating normal dependency graph'
- Write-Host "Generating flat dependency graph and graphviz file..."
+ Write-Host 'Generating flat dependency graph and graphviz file...'
& "$darcExe" get-dependency-graph @baseOptions --flat --coherency --graphviz $graphVizFilePath --output-file $flatGraphFilePath
- CheckExitCode "Generating flat and graphviz dependency graph"
+ CheckExitCode 'Generating flat and graphviz dependency graph'
Write-Host "Generating graph image $graphVizFilePath"
$dotFilePath = Join-Path $installBin "graphviz\$graphvizVersion\release\bin\dot.exe"
& "$dotFilePath" -Tpng -o"$graphVizImageFilePath" "$graphVizFilePath"
- CheckExitCode "Generating graphviz image"
+ CheckExitCode 'Generating graphviz image'
Write-Host "'$graphVizFilePath', '$flatGraphFilePath', '$normalGraphFilePath' and '$graphVizImageFilePath' created!"
}
catch {
if (!$includeToolset) {
- Write-Host "This might be a toolset repo which includes only toolset dependencies. " -NoNewline -ForegroundColor Yellow
- Write-Host "Since -includeToolset is not set there is no graph to create. Include -includeToolset and try again..." -ForegroundColor Yellow
+ Write-Host 'This might be a toolset repo which includes only toolset dependencies. ' -NoNewline -ForegroundColor Yellow
+ Write-Host 'Since -includeToolset is not set there is no graph to create. Include -includeToolset and try again...' -ForegroundColor Yellow
}
- Write-Host $_
- Write-Host $_.Exception
Write-Host $_.ScriptStackTrace
+ Write-PipelineTelemetryError -Category 'Arcade' -Message $_
ExitWithExitCode 1
} finally {
- Pop-Location
+ Pop-Location
}
\ No newline at end of file
diff --git a/eng/common/init-tools-native.ps1 b/eng/common/init-tools-native.ps1
index 0fc0503ab9..db830c00a6 100644
--- a/eng/common/init-tools-native.ps1
+++ b/eng/common/init-tools-native.ps1
@@ -35,7 +35,7 @@ File path to global.json file
#>
[CmdletBinding(PositionalBinding=$false)]
Param (
- [string] $BaseUri = "https://netcorenativeassets.blob.core.windows.net/resource-packages/external",
+ [string] $BaseUri = 'https://netcorenativeassets.blob.core.windows.net/resource-packages/external',
[string] $InstallDirectory,
[switch] $Clean = $False,
[switch] $Force = $False,
@@ -45,26 +45,27 @@ Param (
)
if (!$GlobalJsonFile) {
- $GlobalJsonFile = Join-Path (Get-Item $PSScriptRoot).Parent.Parent.FullName "global.json"
+ $GlobalJsonFile = Join-Path (Get-Item $PSScriptRoot).Parent.Parent.FullName 'global.json'
}
Set-StrictMode -version 2.0
-$ErrorActionPreference="Stop"
+$ErrorActionPreference='Stop'
-Import-Module -Name (Join-Path $PSScriptRoot "native\CommonLibrary.psm1")
+. $PSScriptRoot\pipeline-logging-functions.ps1
+Import-Module -Name (Join-Path $PSScriptRoot 'native\CommonLibrary.psm1')
try {
# Define verbose switch if undefined
- $Verbose = $VerbosePreference -Eq "Continue"
+ $Verbose = $VerbosePreference -Eq 'Continue'
- $EngCommonBaseDir = Join-Path $PSScriptRoot "native\"
+ $EngCommonBaseDir = Join-Path $PSScriptRoot 'native\'
$NativeBaseDir = $InstallDirectory
if (!$NativeBaseDir) {
$NativeBaseDir = CommonLibrary\Get-NativeInstallDirectory
}
$Env:CommonLibrary_NativeInstallDir = $NativeBaseDir
- $InstallBin = Join-Path $NativeBaseDir "bin"
- $InstallerPath = Join-Path $EngCommonBaseDir "install-tool.ps1"
+ $InstallBin = Join-Path $NativeBaseDir 'bin'
+ $InstallerPath = Join-Path $EngCommonBaseDir 'install-tool.ps1'
# Process tools list
Write-Host "Processing $GlobalJsonFile"
@@ -74,7 +75,7 @@ try {
}
$NativeTools = Get-Content($GlobalJsonFile) -Raw |
ConvertFrom-Json |
- Select-Object -Expand "native-tools" -ErrorAction SilentlyContinue
+ Select-Object -Expand 'native-tools' -ErrorAction SilentlyContinue
if ($NativeTools) {
$NativeTools.PSObject.Properties | ForEach-Object {
$ToolName = $_.Name
@@ -112,18 +113,21 @@ try {
}
$toolInstallationFailure = $true
} else {
- Write-Error $errMsg
+ # We cannot change this to Write-PipelineTelemetryError because of https://github.com/dotnet/arcade/issues/4482
+ Write-Host $errMsg
exit 1
}
}
}
if ((Get-Variable 'toolInstallationFailure' -ErrorAction 'SilentlyContinue') -and $toolInstallationFailure) {
+ # We cannot change this to Write-PipelineTelemetryError because of https://github.com/dotnet/arcade/issues/4482
+ Write-Host 'Native tools bootstrap failed'
exit 1
}
}
else {
- Write-Host "No native tools defined in global.json"
+ Write-Host 'No native tools defined in global.json'
exit 0
}
@@ -131,18 +135,18 @@ try {
exit 0
}
if (Test-Path $InstallBin) {
- Write-Host "Native tools are available from" (Convert-Path -Path $InstallBin)
+ Write-Host 'Native tools are available from ' (Convert-Path -Path $InstallBin)
Write-Host "##vso[task.prependpath]$(Convert-Path -Path $InstallBin)"
return $InstallBin
}
else {
- Write-Error "Native tools install directory does not exist, installation failed"
+ Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message 'Native tools install directory does not exist, installation failed'
exit 1
}
exit 0
}
catch {
- Write-Host $_
- Write-Host $_.Exception
- exit 1
+ Write-Host $_.ScriptStackTrace
+ Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message $_
+ ExitWithExitCode 1
}
diff --git a/eng/common/init-tools-native.sh b/eng/common/init-tools-native.sh
index 4dafaaca13..dbd7cbfdf6 100755
--- a/eng/common/init-tools-native.sh
+++ b/eng/common/init-tools-native.sh
@@ -12,6 +12,7 @@ retry_wait_time_seconds=30
global_json_file="$(dirname "$(dirname "${scriptroot}")")/global.json"
declare -A native_assets
+. $scriptroot/pipeline-logging-functions.sh
. $scriptroot/native/common-library.sh
while (($# > 0)); do
@@ -120,7 +121,7 @@ else
$installer_command
if [[ $? != 0 ]]; then
- echo "Execution Failed" >&2
+ Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Execution Failed"
exit 1
fi
done
@@ -134,7 +135,7 @@ if [[ -d $install_bin ]]; then
echo "Native tools are available from $install_bin"
echo "##vso[task.prependpath]$install_bin"
else
- echo "Native tools install directory does not exist, installation failed" >&2
+ Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Native tools install directory does not exist, installation failed"
exit 1
fi
diff --git a/eng/common/internal-feed-operations.ps1 b/eng/common/internal-feed-operations.ps1
index 8b8bafd6a8..db0baac9a4 100644
--- a/eng/common/internal-feed-operations.ps1
+++ b/eng/common/internal-feed-operations.ps1
@@ -6,9 +6,8 @@ param(
[switch] $IsFeedPrivate
)
-$ErrorActionPreference = "Stop"
+$ErrorActionPreference = 'Stop'
Set-StrictMode -Version 2.0
-
. $PSScriptRoot\tools.ps1
# Sets VSS_NUGET_EXTERNAL_FEED_ENDPOINTS based on the "darc-int-*" feeds defined in NuGet.config. This is needed
@@ -21,7 +20,7 @@ function SetupCredProvider {
)
# Install the Cred Provider NuGet plugin
- Write-Host "Setting up Cred Provider NuGet plugin in the agent..."
+ Write-Host 'Setting up Cred Provider NuGet plugin in the agent...'
Write-Host "Getting 'installcredprovider.ps1' from 'https://github.com/microsoft/artifacts-credprovider'..."
$url = 'https://raw.githubusercontent.com/microsoft/artifacts-credprovider/master/helpers/installcredprovider.ps1'
@@ -29,18 +28,18 @@ function SetupCredProvider {
Write-Host "Writing the contents of 'installcredprovider.ps1' locally..."
Invoke-WebRequest $url -OutFile installcredprovider.ps1
- Write-Host "Installing plugin..."
+ Write-Host 'Installing plugin...'
.\installcredprovider.ps1 -Force
Write-Host "Deleting local copy of 'installcredprovider.ps1'..."
Remove-Item .\installcredprovider.ps1
if (-Not("$env:USERPROFILE\.nuget\plugins\netcore")) {
- Write-Host "CredProvider plugin was not installed correctly!"
+ Write-PipelineTelemetryError -Category 'Arcade' -Message 'CredProvider plugin was not installed correctly!'
ExitWithExitCode 1
}
else {
- Write-Host "CredProvider plugin was installed correctly!"
+ Write-Host 'CredProvider plugin was installed correctly!'
}
# Then, we set the 'VSS_NUGET_EXTERNAL_FEED_ENDPOINTS' environment variable to restore from the stable
@@ -49,7 +48,7 @@ function SetupCredProvider {
$nugetConfigPath = "$RepoRoot\NuGet.config"
if (-Not (Test-Path -Path $nugetConfigPath)) {
- Write-Host "NuGet.config file not found in repo's root!"
+ Write-PipelineTelemetryError -Category 'Build' -Message 'NuGet.config file not found in repo root!'
ExitWithExitCode 1
}
@@ -81,7 +80,7 @@ function SetupCredProvider {
}
else
{
- Write-Host "No internal endpoints found in NuGet.config"
+ Write-Host 'No internal endpoints found in NuGet.config'
}
}
@@ -99,7 +98,7 @@ function InstallDotNetSdkAndRestoreArcade {
& $dotnet restore $restoreProjPath
- Write-Host "Arcade SDK restored!"
+ Write-Host 'Arcade SDK restored!'
if (Test-Path -Path $restoreProjPath) {
Remove-Item $restoreProjPath
@@ -113,23 +112,22 @@ function InstallDotNetSdkAndRestoreArcade {
try {
Push-Location $PSScriptRoot
- if ($Operation -like "setup") {
+ if ($Operation -like 'setup') {
SetupCredProvider $AuthToken
}
- elseif ($Operation -like "install-restore") {
+ elseif ($Operation -like 'install-restore') {
InstallDotNetSdkAndRestoreArcade
}
else {
- Write-Host "Unknown operation '$Operation'!"
+ Write-PipelineTelemetryError -Category 'Arcade' -Message "Unknown operation '$Operation'!"
ExitWithExitCode 1
}
}
catch {
- Write-Host $_
- Write-Host $_.Exception
Write-Host $_.ScriptStackTrace
+ Write-PipelineTelemetryError -Category 'Arcade' -Message $_
ExitWithExitCode 1
}
finally {
- Pop-Location
+ Pop-Location
}
diff --git a/eng/common/internal-feed-operations.sh b/eng/common/internal-feed-operations.sh
index 1ff654d2ff..5941ea2833 100755
--- a/eng/common/internal-feed-operations.sh
+++ b/eng/common/internal-feed-operations.sh
@@ -30,7 +30,7 @@ function SetupCredProvider {
rm installcredprovider.sh
if [ ! -d "$HOME/.nuget/plugins" ]; then
- echo "CredProvider plugin was not installed correctly!"
+ Write-PipelineTelemetryError -category 'Build' 'CredProvider plugin was not installed correctly!'
ExitWithExitCode 1
else
echo "CredProvider plugin was installed correctly!"
@@ -42,7 +42,7 @@ function SetupCredProvider {
local nugetConfigPath="$repo_root/NuGet.config"
if [ ! "$nugetConfigPath" ]; then
- echo "NuGet.config file not found in repo's root!"
+ Write-PipelineTelemetryError -category 'Build' "NuGet.config file not found in repo's root!"
ExitWithExitCode 1
fi
diff --git a/eng/common/msbuild.ps1 b/eng/common/msbuild.ps1
index b37fd3d5e9..c640123000 100644
--- a/eng/common/msbuild.ps1
+++ b/eng/common/msbuild.ps1
@@ -1,6 +1,6 @@
[CmdletBinding(PositionalBinding=$false)]
Param(
- [string] $verbosity = "minimal",
+ [string] $verbosity = 'minimal',
[bool] $warnAsError = $true,
[bool] $nodeReuse = $true,
[switch] $ci,
@@ -18,9 +18,8 @@ try {
MSBuild @extraArgs
}
catch {
- Write-Host $_
- Write-Host $_.Exception
Write-Host $_.ScriptStackTrace
+ Write-PipelineTelemetryError -Category 'Build' -Message $_
ExitWithExitCode 1
}
diff --git a/eng/common/native/common-library.sh b/eng/common/native/common-library.sh
index 271bddfac5..bf272dcf55 100755
--- a/eng/common/native/common-library.sh
+++ b/eng/common/native/common-library.sh
@@ -34,7 +34,7 @@ function ExpandZip {
echo "'Force flag enabled, but '$output_directory' exists. Removing directory"
rm -rf $output_directory
if [[ $? != 0 ]]; then
- echo Unable to remove '$output_directory'>&2
+ Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Unable to remove '$output_directory'"
return 1
fi
fi
@@ -45,7 +45,7 @@ function ExpandZip {
echo "Extracting archive"
tar -xf $zip_path -C $output_directory
if [[ $? != 0 ]]; then
- echo "Unable to extract '$zip_path'" >&2
+ Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Unable to extract '$zip_path'"
return 1
fi
@@ -117,7 +117,7 @@ function DownloadAndExtract {
# Download file
GetFile "$uri" "$temp_tool_path" $force $download_retries $retry_wait_time_seconds
if [[ $? != 0 ]]; then
- echo "Failed to download '$uri' to '$temp_tool_path'." >&2
+ Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Failed to download '$uri' to '$temp_tool_path'."
return 1
fi
@@ -125,7 +125,7 @@ function DownloadAndExtract {
echo "extracting from $temp_tool_path to $installDir"
ExpandZip "$temp_tool_path" "$installDir" $force $download_retries $retry_wait_time_seconds
if [[ $? != 0 ]]; then
- echo "Failed to extract '$temp_tool_path' to '$installDir'." >&2
+ Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Failed to extract '$temp_tool_path' to '$installDir'."
return 1
fi
@@ -148,7 +148,7 @@ function NewScriptShim {
fi
if [[ ! -f $tool_file_path ]]; then
- echo "Specified tool file path:'$tool_file_path' does not exist" >&2
+ Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Specified tool file path:'$tool_file_path' does not exist"
return 1
fi
diff --git a/eng/common/native/install-cmake-test.sh b/eng/common/native/install-cmake-test.sh
index 53ddf4e686..12339a4076 100755
--- a/eng/common/native/install-cmake-test.sh
+++ b/eng/common/native/install-cmake-test.sh
@@ -101,7 +101,7 @@ fi
DownloadAndExtract $uri $tool_install_directory $force $download_retries $retry_wait_time_seconds
if [[ $? != 0 ]]; then
- echo "Installation failed" >&2
+ Write-PipelineTelemetryError -category 'NativeToolsBootstrap' 'Installation failed'
exit 1
fi
@@ -110,7 +110,7 @@ fi
NewScriptShim $shim_path $tool_file_path true
if [[ $? != 0 ]]; then
- echo "Shim generation failed" >&2
+ Write-PipelineTelemetryError -category 'NativeToolsBootstrap' 'Shim generation failed'
exit 1
fi
diff --git a/eng/common/native/install-cmake.sh b/eng/common/native/install-cmake.sh
index 5f1a182fa9..18041be876 100755
--- a/eng/common/native/install-cmake.sh
+++ b/eng/common/native/install-cmake.sh
@@ -101,7 +101,7 @@ fi
DownloadAndExtract $uri $tool_install_directory $force $download_retries $retry_wait_time_seconds
if [[ $? != 0 ]]; then
- echo "Installation failed" >&2
+ Write-PipelineTelemetryError -category 'NativeToolsBootstrap' 'Installation failed'
exit 1
fi
@@ -110,7 +110,7 @@ fi
NewScriptShim $shim_path $tool_file_path true
if [[ $? != 0 ]]; then
- echo "Shim generation failed" >&2
+ Write-PipelineTelemetryError -category 'NativeToolsBootstrap' 'Shim generation failed'
exit 1
fi
diff --git a/eng/common/native/install-tool.ps1 b/eng/common/native/install-tool.ps1
index 635ab3fd41..f397e1c75d 100644
--- a/eng/common/native/install-tool.ps1
+++ b/eng/common/native/install-tool.ps1
@@ -46,6 +46,8 @@ Param (
[int] $RetryWaitTimeInSeconds = 30
)
+. $PSScriptRoot\..\pipeline-logging-functions.ps1
+
# Import common library modules
Import-Module -Name (Join-Path $CommonLibraryDirectory "CommonLibrary.psm1")
@@ -93,7 +95,7 @@ try {
-Verbose:$Verbose
if ($InstallStatus -Eq $False) {
- Write-Error "Installation failed"
+ Write-PipelineTelemetryError "Installation failed" -Category "NativeToolsetBootstrapping"
exit 1
}
}
@@ -103,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-Error "$ToolName was not found in $ToolFilePath."
+ Write-Host "$ToolName was not found in $ToolFilePath."
exit 1
}
@@ -117,14 +119,14 @@ try {
-Verbose:$Verbose
if ($GenerateShimStatus -Eq $False) {
- Write-Error "Generate shim failed"
+ Write-PipelineTelemetryError "Generate shim failed" -Category "NativeToolsetBootstrapping"
return 1
}
exit 0
}
catch {
- Write-Host $_
- Write-Host $_.Exception
+ Write-Host $_.ScriptStackTrace
+ Write-PipelineTelemetryError -Category "NativeToolsetBootstrapping" -Message $_
exit 1
}
diff --git a/eng/common/pipeline-logging-functions.ps1 b/eng/common/pipeline-logging-functions.ps1
index af5f48aace..2688c389bd 100644
--- a/eng/common/pipeline-logging-functions.ps1
+++ b/eng/common/pipeline-logging-functions.ps1
@@ -12,6 +12,7 @@ $script:loggingCommandEscapeMappings = @( # TODO: WHAT ABOUT "="? WHAT ABOUT "%"
# TODO: BUG: Escape % ???
# TODO: Add test to verify don't need to escape "=".
+# Specify "-Force" to force pipeline formatted output even if "$ci" is false or not set
function Write-PipelineTelemetryError {
[CmdletBinding()]
param(
@@ -25,49 +26,53 @@ function Write-PipelineTelemetryError {
[string]$SourcePath,
[string]$LineNumber,
[string]$ColumnNumber,
- [switch]$AsOutput)
+ [switch]$AsOutput,
+ [switch]$Force)
- $PSBoundParameters.Remove("Category") | Out-Null
+ $PSBoundParameters.Remove('Category') | Out-Null
$Message = "(NETCORE_ENGINEERING_TELEMETRY=$Category) $Message"
- $PSBoundParameters.Remove("Message") | Out-Null
- $PSBoundParameters.Add("Message", $Message)
-
+ $PSBoundParameters.Remove('Message') | Out-Null
+ $PSBoundParameters.Add('Message', $Message)
Write-PipelineTaskError @PSBoundParameters
}
+# Specify "-Force" to force pipeline formatted output even if "$ci" is false or not set
function Write-PipelineTaskError {
[CmdletBinding()]
param(
- [Parameter(Mandatory = $true)]
- [string]$Message,
- [Parameter(Mandatory = $false)]
- [string]$Type = 'error',
- [string]$ErrCode,
- [string]$SourcePath,
- [string]$LineNumber,
- [string]$ColumnNumber,
- [switch]$AsOutput)
-
- if(!$ci) {
+ [Parameter(Mandatory = $true)]
+ [string]$Message,
+ [Parameter(Mandatory = $false)]
+ [string]$Type = 'error',
+ [string]$ErrCode,
+ [string]$SourcePath,
+ [string]$LineNumber,
+ [string]$ColumnNumber,
+ [switch]$AsOutput,
+ [switch]$Force
+ )
+
+ if(!$Force -And (-Not (Test-Path variable:ci) -Or !$ci)) {
if($Type -eq 'error') {
- Write-Host $Message -ForegroundColor Red
- return
+ Write-Host $Message -ForegroundColor Red
+ return
}
elseif ($Type -eq 'warning') {
- Write-Host $Message -ForegroundColor Yellow
- return
+ Write-Host $Message -ForegroundColor Yellow
+ return
}
- }
-
- if(($Type -ne 'error') -and ($Type -ne 'warning')) {
- Write-Host $Message
- return
- }
- if(-not $PSBoundParameters.ContainsKey('Type')) {
- $PSBoundParameters.Add('Type', 'error')
- }
- Write-LogIssue @PSBoundParameters
+ }
+
+ if(($Type -ne 'error') -and ($Type -ne 'warning')) {
+ Write-Host $Message
+ return
+ }
+ $PSBoundParameters.Remove('Force') | Out-Null
+ if(-not $PSBoundParameters.ContainsKey('Type')) {
+ $PSBoundParameters.Add('Type', 'error')
+ }
+ Write-LogIssue @PSBoundParameters
}
function Write-PipelineSetVariable {
@@ -80,7 +85,7 @@ function Write-PipelineTaskError {
[switch]$AsOutput,
[bool]$IsMultiJobVariable=$true)
- if($ci) {
+ if((Test-Path variable:ci) -And $ci) {
Write-LoggingCommand -Area 'task' -Event 'setvariable' -Data $Value -Properties @{
'variable' = $Name
'isSecret' = $Secret
@@ -95,7 +100,8 @@ function Write-PipelineTaskError {
[Parameter(Mandatory=$true)]
[string]$Path,
[switch]$AsOutput)
- if($ci) {
+
+ if(-Not (Test-Path variable:ci) -Or !$ci) {
Write-LoggingCommand -Area 'task' -Event 'prependpath' -Data $Path -AsOutput:$AsOutput
}
}
diff --git a/eng/common/pipeline-logging-functions.sh b/eng/common/pipeline-logging-functions.sh
index 1c560a5061..33c3f0d807 100755
--- a/eng/common/pipeline-logging-functions.sh
+++ b/eng/common/pipeline-logging-functions.sh
@@ -2,6 +2,7 @@
function Write-PipelineTelemetryError {
local telemetry_category=''
+ local force=false
local function_args=()
local message=''
while [[ $# -gt 0 ]]; do
@@ -11,6 +12,9 @@ function Write-PipelineTelemetryError {
telemetry_category=$2
shift
;;
+ -force|-f)
+ force=true
+ ;;
-*)
function_args+=("$1 $2")
shift
@@ -22,19 +26,22 @@ function Write-PipelineTelemetryError {
shift
done
- if [[ "$ci" != true ]]; then
+ if [[ $force != true ]] && [[ "$ci" != true ]]; then
echo "$message" >&2
return
fi
message="(NETCORE_ENGINEERING_TELEMETRY=$telemetry_category) $message"
function_args+=("$message")
+ if [[ $force == true ]]; then
+ function_args+=("-force")
+ fi
Write-PipelineTaskError $function_args
}
function Write-PipelineTaskError {
- if [[ "$ci" != true ]]; then
+ if [[ $force != true ]] && [[ "$ci" != true ]]; then
echo "$@" >&2
return
fi
diff --git a/eng/common/post-build/darc-gather-drop.ps1 b/eng/common/post-build/darc-gather-drop.ps1
index 89854d3c1c..81ff2a4377 100644
--- a/eng/common/post-build/darc-gather-drop.ps1
+++ b/eng/common/post-build/darc-gather-drop.ps1
@@ -2,20 +2,20 @@ param(
[Parameter(Mandatory=$true)][int] $BarBuildId, # ID of the build which assets should be downloaded
[Parameter(Mandatory=$true)][string] $DropLocation, # Where the assets should be downloaded to
[Parameter(Mandatory=$true)][string] $MaestroApiAccessToken, # Token used to access Maestro API
- [Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = "https://maestro-prod.westus2.cloudapp.azure.com", # Maestro API URL
- [Parameter(Mandatory=$false)][string] $MaestroApiVersion = "2019-01-16" # Version of Maestro API to use
+ [Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = 'https://maestro-prod.westus2.cloudapp.azure.com', # Maestro API URL
+ [Parameter(Mandatory=$false)][string] $MaestroApiVersion = '2019-01-16' # Version of Maestro API to use
)
-. $PSScriptRoot\post-build-utils.ps1
-
try {
- Write-Host "Installing DARC ..."
+ . $PSScriptRoot\post-build-utils.ps1
+
+ Write-Host 'Installing DARC ...'
. $PSScriptRoot\..\darc-init.ps1
$exitCode = $LASTEXITCODE
if ($exitCode -ne 0) {
- Write-PipelineTaskError "Something failed while running 'darc-init.ps1'. Check for errors above. Exiting now..."
+ Write-PipelineTelemetryError -Category "Darc" -Message "Something failed while running 'darc-init.ps1'. Check for errors above. Exiting now..."
ExitWithExitCode $exitCode
}
@@ -38,8 +38,7 @@ try {
--latest-location
}
catch {
- Write-Host $_
- Write-Host $_.Exception
Write-Host $_.ScriptStackTrace
+ Write-PipelineTelemetryError -Category "Darc" -Message $_
ExitWithExitCode 1
}
diff --git a/eng/common/post-build/nuget-validation.ps1 b/eng/common/post-build/nuget-validation.ps1
index 78ed0d540f..3d6129d72b 100644
--- a/eng/common/post-build/nuget-validation.ps1
+++ b/eng/common/post-build/nuget-validation.ps1
@@ -6,20 +6,19 @@ param(
[Parameter(Mandatory=$true)][string] $ToolDestinationPath # Where the validation tool should be downloaded to
)
-. $PSScriptRoot\post-build-utils.ps1
-
try {
- $url = "https://raw.githubusercontent.com/NuGet/NuGetGallery/jver-verify/src/VerifyMicrosoftPackage/verify.ps1"
+ . $PSScriptRoot\post-build-utils.ps1
+
+ $url = 'https://raw.githubusercontent.com/NuGet/NuGetGallery/jver-verify/src/VerifyMicrosoftPackage/verify.ps1'
- New-Item -ItemType "directory" -Path ${ToolDestinationPath} -Force
+ New-Item -ItemType 'directory' -Path ${ToolDestinationPath} -Force
Invoke-WebRequest $url -OutFile ${ToolDestinationPath}\verify.ps1
& ${ToolDestinationPath}\verify.ps1 ${PackagesPath}\*.nupkg
}
catch {
- Write-PipelineTaskError "NuGet package validation failed. Please check error logs."
- Write-Host $_
Write-Host $_.ScriptStackTrace
+ Write-PipelineTelemetryError -Category 'NuGetValidation' -Message $_
ExitWithExitCode 1
}
diff --git a/eng/common/post-build/post-build-utils.ps1 b/eng/common/post-build/post-build-utils.ps1
index aa9a025c0b..7d49744795 100644
--- a/eng/common/post-build/post-build-utils.ps1
+++ b/eng/common/post-build/post-build-utils.ps1
@@ -1,17 +1,17 @@
# Most of the functions in this file require the variables `MaestroApiEndPoint`,
# `MaestroApiVersion` and `MaestroApiAccessToken` to be globally available.
-$ErrorActionPreference = "Stop"
+$ErrorActionPreference = 'Stop'
Set-StrictMode -Version 2.0
# `tools.ps1` checks $ci to perform some actions. Since the post-build
# 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"
+$disableConfigureToolsetImport = $true
. $PSScriptRoot\..\tools.ps1
-function Create-MaestroApiRequestHeaders([string]$ContentType = "application/json") {
+function Create-MaestroApiRequestHeaders([string]$ContentType = 'application/json') {
Validate-MaestroVars
$headers = New-Object 'System.Collections.Generic.Dictionary[[String],[String]]'
@@ -51,20 +51,20 @@ function Get-MaestroSubscriptions([string]$SourceRepository, [int]$ChannelId) {
return $result
}
-function Trigger-Subscription([string]$SubscriptionId) {
+function Assign-BuildToChannel([int]$BuildId, [int]$ChannelId) {
Validate-MaestroVars
$apiHeaders = Create-MaestroApiRequestHeaders -AuthToken $MaestroApiAccessToken
- $apiEndpoint = "$MaestroApiEndPoint/api/subscriptions/$SubscriptionId/trigger?api-version=$MaestroApiVersion"
- Invoke-WebRequest -Uri $apiEndpoint -Headers $apiHeaders -Method Post | Out-Null
+ $apiEndpoint = "$MaestroApiEndPoint/api/channels/${ChannelId}/builds/${BuildId}?api-version=$MaestroApiVersion"
+ Invoke-WebRequest -Method Post -Uri $apiEndpoint -Headers $apiHeaders | Out-Null
}
-function Assign-BuildToChannel([int]$BuildId, [int]$ChannelId) {
+function Trigger-Subscription([string]$SubscriptionId) {
Validate-MaestroVars
$apiHeaders = Create-MaestroApiRequestHeaders -AuthToken $MaestroApiAccessToken
- $apiEndpoint = "$MaestroApiEndPoint/api/channels/${ChannelId}/builds/${BuildId}?api-version=$MaestroApiVersion"
- Invoke-WebRequest -Method Post -Uri $apiEndpoint -Headers $apiHeaders | Out-Null
+ $apiEndpoint = "$MaestroApiEndPoint/api/subscriptions/$SubscriptionId/trigger?api-version=$MaestroApiVersion"
+ Invoke-WebRequest -Uri $apiEndpoint -Headers $apiHeaders -Method Post | Out-Null
}
function Validate-MaestroVars {
@@ -73,18 +73,18 @@ function Validate-MaestroVars {
Get-Variable MaestroApiVersion -Scope Global | Out-Null
Get-Variable MaestroApiAccessToken -Scope Global | Out-Null
- if (!($MaestroApiEndPoint -Match "^http[s]?://maestro-(int|prod).westus2.cloudapp.azure.com$")) {
- Write-PipelineTaskError "MaestroApiEndPoint is not a valid Maestro URL. '$MaestroApiEndPoint'"
+ if (!($MaestroApiEndPoint -Match '^http[s]?://maestro-(int|prod).westus2.cloudapp.azure.com$')) {
+ Write-PipelineTelemetryError -Category 'MaestroVars' -Message "MaestroApiEndPoint is not a valid Maestro URL. '$MaestroApiEndPoint'"
ExitWithExitCode 1
}
- if (!($MaestroApiVersion -Match "^[0-9]{4}-[0-9]{2}-[0-9]{2}$")) {
- Write-PipelineTaskError "MaestroApiVersion does not match a version string in the format yyyy-MM-DD. '$MaestroApiVersion'"
+ if (!($MaestroApiVersion -Match '^[0-9]{4}-[0-9]{2}-[0-9]{2}$')) {
+ Write-PipelineTelemetryError -Category 'MaestroVars' -Message "MaestroApiVersion does not match a version string in the format yyyy-MM-DD. '$MaestroApiVersion'"
ExitWithExitCode 1
}
}
catch {
- Write-PipelineTaskError "Error: Variables `MaestroApiEndPoint`, `MaestroApiVersion` and `MaestroApiAccessToken` are required while using this script."
+ Write-PipelineTelemetryError -Category 'MaestroVars' -Message 'Error: Variables `MaestroApiEndPoint`, `MaestroApiVersion` and `MaestroApiAccessToken` are required while using this script.'
Write-Host $_
ExitWithExitCode 1
}
diff --git a/eng/common/post-build/promote-build.ps1 b/eng/common/post-build/promote-build.ps1
index e5ae85f251..ce45635fbd 100644
--- a/eng/common/post-build/promote-build.ps1
+++ b/eng/common/post-build/promote-build.ps1
@@ -2,18 +2,18 @@ param(
[Parameter(Mandatory=$true)][int] $BuildId,
[Parameter(Mandatory=$true)][int] $ChannelId,
[Parameter(Mandatory=$true)][string] $MaestroApiAccessToken,
- [Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = "https://maestro-prod.westus2.cloudapp.azure.com",
- [Parameter(Mandatory=$false)][string] $MaestroApiVersion = "2019-01-16"
+ [Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = 'https://maestro-prod.westus2.cloudapp.azure.com',
+ [Parameter(Mandatory=$false)][string] $MaestroApiVersion = '2019-01-16'
)
-. $PSScriptRoot\post-build-utils.ps1
-
try {
+ . $PSScriptRoot\post-build-utils.ps1
+
# Check that the channel we are going to promote the build to exist
$channelInfo = Get-MaestroChannel -ChannelId $ChannelId
if (!$channelInfo) {
- Write-Host "Channel with BAR ID $ChannelId was not found in BAR!"
+ Write-PipelineTelemetryCategory -Category 'PromoteBuild' -Message "Channel with BAR ID $ChannelId was not found in BAR!"
ExitWithExitCode 1
}
@@ -21,7 +21,7 @@ try {
$buildInfo = Get-MaestroBuild -BuildId $BuildId
if (!$buildInfo) {
- Write-Host "Build with BAR ID $BuildId was not found in BAR!"
+ Write-PipelineTelemetryError -Category 'PromoteBuild' -Message "Build with BAR ID $BuildId was not found in BAR!"
ExitWithExitCode 1
}
@@ -39,10 +39,10 @@ try {
Assign-BuildToChannel -BuildId $BuildId -ChannelId $ChannelId
- Write-Host "done."
+ Write-Host 'done.'
}
catch {
- Write-Host "There was an error while trying to promote build '$BuildId' to channel '$ChannelId'"
Write-Host $_
- Write-Host $_.ScriptStackTrace
+ Write-PipelineTelemetryError -Category 'PromoteBuild' -Message "There was an error while trying to promote build '$BuildId' to channel '$ChannelId'"
+ ExitWithExitCode 1
}
diff --git a/eng/common/post-build/sourcelink-validation.ps1 b/eng/common/post-build/sourcelink-validation.ps1
index bbfdacca13..cc9d059d04 100644
--- a/eng/common/post-build/sourcelink-validation.ps1
+++ b/eng/common/post-build/sourcelink-validation.ps1
@@ -34,9 +34,9 @@ $ValidatePackage = {
# Extensions for which we'll look for SourceLink information
# For now we'll only care about Portable & Embedded PDBs
- $RelevantExtensions = @(".dll", ".exe", ".pdb")
+ $RelevantExtensions = @('.dll', '.exe', '.pdb')
- Write-Host -NoNewLine "Validating" ([System.IO.Path]::GetFileName($PackagePath)) "... "
+ Write-Host -NoNewLine 'Validating ' ([System.IO.Path]::GetFileName($PackagePath)) '...'
$PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath)
$ExtractPath = Join-Path -Path $using:ExtractPath -ChildPath $PackageId
@@ -58,7 +58,7 @@ $ValidatePackage = {
$TargetFile = Join-Path -Path $ExtractPath -ChildPath $FakeName
# We ignore resource DLLs
- if ($FileName.EndsWith(".resources.dll")) {
+ if ($FileName.EndsWith('.resources.dll')) {
return
}
@@ -96,7 +96,7 @@ $ValidatePackage = {
$Uri = $Link -as [System.URI]
# Only GitHub links are valid
- if ($Uri.AbsoluteURI -ne $null -and ($Uri.Host -match "github" -or $Uri.Host -match "githubusercontent")) {
+ if ($Uri.AbsoluteURI -ne $null -and ($Uri.Host -match 'github' -or $Uri.Host -match 'githubusercontent')) {
$Status = (Invoke-WebRequest -Uri $Link -UseBasicParsing -Method HEAD -TimeoutSec 5).StatusCode
}
else {
@@ -143,19 +143,19 @@ $ValidatePackage = {
}
if ($FailedFiles -eq 0) {
- Write-Host "Passed."
+ Write-Host 'Passed.'
return 0
}
else {
- Write-Host "$PackagePath has broken SourceLink links."
+ Write-PipelineTelemetryError -Category 'SourceLink' -Message "$PackagePath has broken SourceLink links."
return 1
}
}
function ValidateSourceLinkLinks {
- if ($GHRepoName -ne "" -and !($GHRepoName -Match "^[^\s\/]+/[^\s\/]+$")) {
- if (!($GHRepoName -Match "^[^\s-]+-[^\s]+$")) {
- Write-PipelineTaskError "GHRepoName should be in the format / or -. '$GHRepoName'"
+ if ($GHRepoName -ne '' -and !($GHRepoName -Match '^[^\s\/]+/[^\s\/]+$')) {
+ if (!($GHRepoName -Match '^[^\s-]+-[^\s]+$')) {
+ Write-PipelineTelemetryError -Category 'SourceLink' -Message "GHRepoName should be in the format / or -. '$GHRepoName'"
ExitWithExitCode 1
}
else {
@@ -163,14 +163,14 @@ function ValidateSourceLinkLinks {
}
}
- if ($GHCommit -ne "" -and !($GHCommit -Match "^[0-9a-fA-F]{40}$")) {
- Write-PipelineTaskError "GHCommit should be a 40 chars hexadecimal string. '$GHCommit'"
+ if ($GHCommit -ne '' -and !($GHCommit -Match '^[0-9a-fA-F]{40}$')) {
+ Write-PipelineTelemetryError -Category 'SourceLink' -Message "GHCommit should be a 40 chars hexadecimal string. '$GHCommit'"
ExitWithExitCode 1
}
- if ($GHRepoName -ne "" -and $GHCommit -ne "") {
- $RepoTreeURL = -Join("http://api.github.com/repos/", $GHRepoName, "/git/trees/", $GHCommit, "?recursive=1")
- $CodeExtensions = @(".cs", ".vb", ".fs", ".fsi", ".fsx", ".fsscript")
+ if ($GHRepoName -ne '' -and $GHCommit -ne '') {
+ $RepoTreeURL = -Join('http://api.github.com/repos/', $GHRepoName, '/git/trees/', $GHCommit, '?recursive=1')
+ $CodeExtensions = @('.cs', '.vb', '.fs', '.fsi', '.fsx', '.fsscript')
try {
# Retrieve the list of files in the repo at that particular commit point and store them in the RepoFiles hash
@@ -188,8 +188,8 @@ function ValidateSourceLinkLinks {
Write-Host "Problems downloading the list of files from the repo. Url used: $RepoTreeURL . Execution will proceed without caching."
}
}
- elseif ($GHRepoName -ne "" -or $GHCommit -ne "") {
- Write-Host "For using the http caching mechanism both GHRepoName and GHCommit should be informed."
+ elseif ($GHRepoName -ne '' -or $GHCommit -ne '') {
+ Write-Host 'For using the http caching mechanism both GHRepoName and GHCommit should be informed.'
}
if (Test-Path $ExtractPath) {
@@ -217,18 +217,18 @@ function ValidateSourceLinkLinks {
$ValidationFailures = 0
foreach ($Job in @(Get-Job)) {
$jobResult = Wait-Job -Id $Job.Id | Receive-Job
- if ($jobResult -ne "0") {
+ if ($jobResult -ne '0') {
$ValidationFailures++
}
}
if ($ValidationFailures -gt 0) {
- Write-PipelineTaskError " $ValidationFailures package(s) failed validation."
+ Write-PipelineTelemetryError -Category 'SourceLink' -Message "$ValidationFailures package(s) failed validation."
ExitWithExitCode 1
}
}
function InstallSourcelinkCli {
- $sourcelinkCliPackageName = "sourcelink"
+ $sourcelinkCliPackageName = 'sourcelink'
$dotnetRoot = InitializeDotNetCli -install:$true
$dotnet = "$dotnetRoot\dotnet.exe"
@@ -239,7 +239,7 @@ function InstallSourcelinkCli {
}
else {
Write-Host "Installing SourceLink CLI version $sourcelinkCliVersion..."
- Write-Host "You may need to restart your command window if this is the first dotnet tool you have installed."
+ Write-Host 'You may need to restart your command window if this is the first dotnet tool you have installed.'
& "$dotnet" tool install $sourcelinkCliPackageName --version $sourcelinkCliVersion --verbosity "minimal" --global
}
}
@@ -250,8 +250,8 @@ try {
ValidateSourceLinkLinks
}
catch {
- Write-Host $_
Write-Host $_.Exception
Write-Host $_.ScriptStackTrace
+ Write-PipelineTelemetryError -Category 'SourceLink' -Message $_
ExitWithExitCode 1
}
diff --git a/eng/common/post-build/symbols-validation.ps1 b/eng/common/post-build/symbols-validation.ps1
index 42f5e996bc..6e3e134172 100644
--- a/eng/common/post-build/symbols-validation.ps1
+++ b/eng/common/post-build/symbols-validation.ps1
@@ -4,10 +4,6 @@ param(
[Parameter(Mandatory=$true)][string] $DotnetSymbolVersion # Version of dotnet symbol to use
)
-. $PSScriptRoot\post-build-utils.ps1
-
-Add-Type -AssemblyName System.IO.Compression.FileSystem
-
function FirstMatchingSymbolDescriptionOrDefault {
param(
[string] $FullPath, # Full path to the module that has to be checked
@@ -23,19 +19,19 @@ function FirstMatchingSymbolDescriptionOrDefault {
# checking and which type of file was uploaded.
# The file itself is returned
- $SymbolPath = $SymbolsPath + "\" + $FileName
+ $SymbolPath = $SymbolsPath + '\' + $FileName
# PDB file for the module
- $PdbPath = $SymbolPath.Replace($Extension, ".pdb")
+ $PdbPath = $SymbolPath.Replace($Extension, '.pdb')
# PDB file for R2R module (created by crossgen)
- $NGenPdb = $SymbolPath.Replace($Extension, ".ni.pdb")
+ $NGenPdb = $SymbolPath.Replace($Extension, '.ni.pdb')
# DBG file for a .so library
- $SODbg = $SymbolPath.Replace($Extension, ".so.dbg")
+ $SODbg = $SymbolPath.Replace($Extension, '.so.dbg')
# DWARF file for a .dylib
- $DylibDwarf = $SymbolPath.Replace($Extension, ".dylib.dwarf")
+ $DylibDwarf = $SymbolPath.Replace($Extension, '.dylib.dwarf')
$dotnetSymbolExe = "$env:USERPROFILE\.dotnet\tools"
$dotnetSymbolExe = Resolve-Path "$dotnetSymbolExe\dotnet-symbol.exe"
@@ -43,19 +39,19 @@ function FirstMatchingSymbolDescriptionOrDefault {
& $dotnetSymbolExe --symbols --modules --windows-pdbs $TargetServerParam $FullPath -o $SymbolsPath | Out-Null
if (Test-Path $PdbPath) {
- return "PDB"
+ return 'PDB'
}
elseif (Test-Path $NGenPdb) {
- return "NGen PDB"
+ return 'NGen PDB'
}
elseif (Test-Path $SODbg) {
- return "DBG for SO"
+ return 'DBG for SO'
}
elseif (Test-Path $DylibDwarf) {
- return "Dwarf for Dylib"
+ return 'Dwarf for Dylib'
}
elseif (Test-Path $SymbolPath) {
- return "Module"
+ return 'Module'
}
else {
return $null
@@ -74,7 +70,7 @@ function CountMissingSymbols {
}
# Extensions for which we'll look for symbols
- $RelevantExtensions = @(".dll", ".exe", ".so", ".dylib")
+ $RelevantExtensions = @('.dll', '.exe', '.so', '.dylib')
# How many files are missing symbol information
$MissingSymbols = 0
@@ -82,38 +78,38 @@ function CountMissingSymbols {
$PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath)
$PackageGuid = New-Guid
$ExtractPath = Join-Path -Path $ExtractPath -ChildPath $PackageGuid
- $SymbolsPath = Join-Path -Path $ExtractPath -ChildPath "Symbols"
+ $SymbolsPath = Join-Path -Path $ExtractPath -ChildPath 'Symbols'
[System.IO.Compression.ZipFile]::ExtractToDirectory($PackagePath, $ExtractPath)
Get-ChildItem -Recurse $ExtractPath |
Where-Object {$RelevantExtensions -contains $_.Extension} |
ForEach-Object {
- if ($_.FullName -Match "\\ref\\") {
- Write-Host "`t Ignoring reference assembly file" $_.FullName
+ if ($_.FullName -Match '\\ref\\') {
+ Write-Host "`t Ignoring reference assembly file " $_.FullName
return
}
- $SymbolsOnMSDL = FirstMatchingSymbolDescriptionOrDefault $_.FullName "--microsoft-symbol-server" $SymbolsPath
- $SymbolsOnSymWeb = FirstMatchingSymbolDescriptionOrDefault $_.FullName "--internal-server" $SymbolsPath
+ $SymbolsOnMSDL = FirstMatchingSymbolDescriptionOrDefault $_.FullName '--microsoft-symbol-server' $SymbolsPath
+ $SymbolsOnSymWeb = FirstMatchingSymbolDescriptionOrDefault $_.FullName '--internal-server' $SymbolsPath
- Write-Host -NoNewLine "`t Checking file" $_.FullName "... "
+ Write-Host -NoNewLine "`t Checking file " $_.FullName "... "
if ($SymbolsOnMSDL -ne $null -and $SymbolsOnSymWeb -ne $null) {
- Write-Host "Symbols found on MSDL (" $SymbolsOnMSDL ") and SymWeb (" $SymbolsOnSymWeb ")"
+ Write-Host "Symbols found on MSDL ($SymbolsOnMSDL) and SymWeb ($SymbolsOnSymWeb)"
}
else {
$MissingSymbols++
if ($SymbolsOnMSDL -eq $null -and $SymbolsOnSymWeb -eq $null) {
- Write-Host "No symbols found on MSDL or SymWeb!"
+ Write-Host 'No symbols found on MSDL or SymWeb!'
}
else {
if ($SymbolsOnMSDL -eq $null) {
- Write-Host "No symbols found on MSDL!"
+ Write-Host 'No symbols found on MSDL!'
}
else {
- Write-Host "No symbols found on SymWeb!"
+ Write-Host 'No symbols found on SymWeb!'
}
}
}
@@ -132,27 +128,27 @@ function CheckSymbolsAvailable {
Get-ChildItem "$InputPath\*.nupkg" |
ForEach-Object {
$FileName = $_.Name
-
+
# These packages from Arcade-Services include some native libraries that
# our current symbol uploader can't handle. Below is a workaround until
# we get issue: https://github.com/dotnet/arcade/issues/2457 sorted.
- if ($FileName -Match "Microsoft\.DotNet\.Darc\.") {
+ if ($FileName -Match 'Microsoft\.DotNet\.Darc\.') {
Write-Host "Ignoring Arcade-services file: $FileName"
Write-Host
return
}
- elseif ($FileName -Match "Microsoft\.DotNet\.Maestro\.Tasks\.") {
+ elseif ($FileName -Match 'Microsoft\.DotNet\.Maestro\.Tasks\.') {
Write-Host "Ignoring Arcade-services file: $FileName"
Write-Host
return
}
-
+
Write-Host "Validating $FileName "
$Status = CountMissingSymbols "$InputPath\$FileName"
-
+
if ($Status -ne 0) {
- Write-PipelineTaskError "Missing symbols for $Status modules in the package $FileName"
- ExitWithExitCode $exitCode
+ Write-PipelineTelemetryError -Category 'CheckSymbols' -Message "Missing symbols for $Status modules in the package $FileName"
+ ExitWithExitCode $exitCode
}
Write-Host
@@ -160,7 +156,7 @@ function CheckSymbolsAvailable {
}
function InstallDotnetSymbol {
- $dotnetSymbolPackageName = "dotnet-symbol"
+ $dotnetSymbolPackageName = 'dotnet-symbol'
$dotnetRoot = InitializeDotNetCli -install:$true
$dotnet = "$dotnetRoot\dotnet.exe"
@@ -171,18 +167,21 @@ function InstallDotnetSymbol {
}
else {
Write-Host "Installing dotnet-symbol version $dotnetSymbolVersion..."
- Write-Host "You may need to restart your command window if this is the first dotnet tool you have installed."
+ Write-Host 'You may need to restart your command window if this is the first dotnet tool you have installed.'
& "$dotnet" tool install $dotnetSymbolPackageName --version $dotnetSymbolVersion --verbosity "minimal" --global
}
}
try {
+ . $PSScriptRoot\post-build-utils.ps1
+
+ Add-Type -AssemblyName System.IO.Compression.FileSystem
+
InstallDotnetSymbol
CheckSymbolsAvailable
}
catch {
- Write-Host $_
- Write-Host $_.Exception
Write-Host $_.ScriptStackTrace
+ Write-PipelineTelemetryError -Category 'CheckSymbols' -Message $_
ExitWithExitCode 1
}
diff --git a/eng/common/post-build/trigger-subscriptions.ps1 b/eng/common/post-build/trigger-subscriptions.ps1
index 926d5b4551..55dea518ac 100644
--- a/eng/common/post-build/trigger-subscriptions.ps1
+++ b/eng/common/post-build/trigger-subscriptions.ps1
@@ -2,56 +2,63 @@ param(
[Parameter(Mandatory=$true)][string] $SourceRepo,
[Parameter(Mandatory=$true)][int] $ChannelId,
[Parameter(Mandatory=$true)][string] $MaestroApiAccessToken,
- [Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = "https://maestro-prod.westus2.cloudapp.azure.com",
- [Parameter(Mandatory=$false)][string] $MaestroApiVersion = "2019-01-16"
+ [Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = 'https://maestro-prod.westus2.cloudapp.azure.com',
+ [Parameter(Mandatory=$false)][string] $MaestroApiVersion = '2019-01-16'
)
-. $PSScriptRoot\post-build-utils.ps1
+try {
+ . $PSScriptRoot\post-build-utils.ps1
-# Get all the $SourceRepo subscriptions
-$normalizedSourceRepo = $SourceRepo.Replace('dnceng@', '')
-$subscriptions = Get-MaestroSubscriptions -SourceRepository $normalizedSourceRepo -ChannelId $ChannelId
+ # Get all the $SourceRepo subscriptions
+ $normalizedSourceRepo = $SourceRepo.Replace('dnceng@', '')
+ $subscriptions = Get-MaestroSubscriptions -SourceRepository $normalizedSourceRepo -ChannelId $ChannelId
-if (!$subscriptions) {
- Write-Host "No subscriptions found for source repo '$normalizedSourceRepo' in channel '$ChannelId'"
- ExitWithExitCode 0
-}
+ if (!$subscriptions) {
+ Write-PipelineTelemetryError -Category 'TriggerSubscriptions' -Message "No subscriptions found for source repo '$normalizedSourceRepo' in channel '$ChannelId'"
+ ExitWithExitCode 0
+ }
-$subscriptionsToTrigger = New-Object System.Collections.Generic.List[string]
-$failedTriggeredSubscription = $false
+ $subscriptionsToTrigger = New-Object System.Collections.Generic.List[string]
+ $failedTriggeredSubscription = $false
-# Get all enabled subscriptions that need dependency flow on 'everyBuild'
-foreach ($subscription in $subscriptions) {
- if ($subscription.enabled -and $subscription.policy.updateFrequency -like 'everyBuild' -and $subscription.channel.id -eq $ChannelId) {
- Write-Host "Should trigger this subscription: $subscription.id"
- [void]$subscriptionsToTrigger.Add($subscription.id)
+ # Get all enabled subscriptions that need dependency flow on 'everyBuild'
+ foreach ($subscription in $subscriptions) {
+ if ($subscription.enabled -and $subscription.policy.updateFrequency -like 'everyBuild' -and $subscription.channel.id -eq $ChannelId) {
+ Write-Host "Should trigger this subscription: ${$subscription.id}"
+ [void]$subscriptionsToTrigger.Add($subscription.id)
+ }
}
-}
-foreach ($subscriptionToTrigger in $subscriptionsToTrigger) {
- try {
- Write-Host "Triggering subscription '$subscriptionToTrigger'."
-
- Trigger-Subscription -SubscriptionId $subscriptionToTrigger
-
- Write-Host "done."
- }
- catch
- {
- Write-Host "There was an error while triggering subscription '$subscriptionToTrigger'"
- Write-Host $_
- Write-Host $_.ScriptStackTrace
- $failedTriggeredSubscription = $true
+ foreach ($subscriptionToTrigger in $subscriptionsToTrigger) {
+ try {
+ Write-Host "Triggering subscription '$subscriptionToTrigger'."
+
+ Trigger-Subscription -SubscriptionId $subscriptionToTrigger
+
+ Write-Host 'done.'
+ }
+ catch
+ {
+ Write-Host "There was an error while triggering subscription '$subscriptionToTrigger'"
+ Write-Host $_
+ Write-Host $_.ScriptStackTrace
+ $failedTriggeredSubscription = $true
+ }
}
-}
-if ($subscriptionsToTrigger.Count -eq 0) {
- Write-Host "No subscription matched source repo '$normalizedSourceRepo' and channel ID '$ChannelId'."
+ if ($subscriptionsToTrigger.Count -eq 0) {
+ Write-Host "No subscription matched source repo '$normalizedSourceRepo' and channel ID '$ChannelId'."
+ }
+ elseif ($failedTriggeredSubscription) {
+ Write-PipelineTelemetryError -Category 'TriggerSubscriptions' -Message 'At least one subscription failed to be triggered...'
+ ExitWithExitCode 1
+ }
+ else {
+ Write-Host 'All subscriptions were triggered successfully!'
+ }
}
-elseif ($failedTriggeredSubscription) {
- Write-Host "At least one subscription failed to be triggered..."
+catch {
+ Write-Host $_.ScriptStackTrace
+ Write-PipelineTelemetryError -Category 'TriggerSubscriptions' -Message $_
ExitWithExitCode 1
}
-else {
- Write-Host "All subscriptions were triggered successfully!"
-}
diff --git a/eng/common/sdk-task.ps1 b/eng/common/sdk-task.ps1
index d0eec5163e..3872af59b9 100644
--- a/eng/common/sdk-task.ps1
+++ b/eng/common/sdk-task.ps1
@@ -1,8 +1,8 @@
[CmdletBinding(PositionalBinding=$false)]
Param(
- [string] $configuration = "Debug",
+ [string] $configuration = 'Debug',
[string] $task,
- [string] $verbosity = "minimal",
+ [string] $verbosity = 'minimal',
[string] $msbuildEngine = $null,
[switch] $restore,
[switch] $prepareMachine,
@@ -32,7 +32,7 @@ function Print-Usage() {
}
function Build([string]$target) {
- $logSuffix = if ($target -eq "Execute") { "" } else { ".$target" }
+ $logSuffix = if ($target -eq 'Execute') { '' } else { ".$target" }
$log = Join-Path $LogDir "$task$logSuffix.binlog"
$outputPath = Join-Path $ToolsetDir "$task\\"
@@ -46,33 +46,32 @@ function Build([string]$target) {
}
try {
- if ($help -or (($null -ne $properties) -and ($properties.Contains("/help") -or $properties.Contains("/?")))) {
+ if ($help -or (($null -ne $properties) -and ($properties.Contains('/help') -or $properties.Contains('/?')))) {
Print-Usage
exit 0
}
if ($task -eq "") {
- Write-Host "Missing required parameter '-task '" -ForegroundColor Red
+ Write-PipelineTelemetryError -Category 'Build' -Message "Missing required parameter '-task '" -ForegroundColor Red
Print-Usage
ExitWithExitCode 1
}
$taskProject = GetSdkTaskProject $task
if (!(Test-Path $taskProject)) {
- Write-Host "Unknown task: $task" -ForegroundColor Red
+ Write-PipelineTelemetryError -Category 'Build' -Message "Unknown task: $task" -ForegroundColor Red
ExitWithExitCode 1
}
if ($restore) {
- Build "Restore"
+ Build 'Restore'
}
- Build "Execute"
+ Build 'Execute'
}
catch {
- Write-Host $_
- Write-Host $_.Exception
Write-Host $_.ScriptStackTrace
+ Write-PipelineTelemetryError -Category 'Build' -Message $_
ExitWithExitCode 1
}
diff --git a/eng/common/sdl/execute-all-sdl-tools.ps1 b/eng/common/sdl/execute-all-sdl-tools.ps1
index eb21321ba2..339dc9b503 100644
--- a/eng/common/sdl/execute-all-sdl-tools.ps1
+++ b/eng/common/sdl/execute-all-sdl-tools.ps1
@@ -27,74 +27,84 @@ Param(
[string[]] $PoliCheckAdditionalRunConfigParams # Optional: Additional Params to custom build a Policheck run config in the format @("xyz:abc","sdf:1")
)
-$ErrorActionPreference = "Stop"
-Set-StrictMode -Version 2.0
-$LASTEXITCODE = 0
+try {
+ $ErrorActionPreference = 'Stop'
+ Set-StrictMode -Version 2.0
+ $disableConfigureToolsetImport = $true
+ $LASTEXITCODE = 0
-#Replace repo names to the format of org/repo
-if (!($Repository.contains('/'))) {
- $RepoName = $Repository -replace '(.*?)-(.*)', '$1/$2';
-}
-else{
- $RepoName = $Repository;
-}
+ . $PSScriptRoot\..\tools.ps1
-if ($GuardianPackageName) {
- $guardianCliLocation = Join-Path $NugetPackageDirectory (Join-Path $GuardianPackageName (Join-Path "tools" "guardian.cmd"))
-} else {
- $guardianCliLocation = $GuardianCliLocation
-}
+ #Replace repo names to the format of org/repo
+ if (!($Repository.contains('/'))) {
+ $RepoName = $Repository -replace '(.*?)-(.*)', '$1/$2';
+ }
+ else{
+ $RepoName = $Repository;
+ }
+
+ if ($GuardianPackageName) {
+ $guardianCliLocation = Join-Path $NugetPackageDirectory (Join-Path $GuardianPackageName (Join-Path 'tools' 'guardian.cmd'))
+ } else {
+ $guardianCliLocation = $GuardianCliLocation
+ }
-$workingDirectory = (Split-Path $SourceDirectory -Parent)
-$ValidPath = Test-Path $guardianCliLocation
+ $workingDirectory = (Split-Path $SourceDirectory -Parent)
+ $ValidPath = Test-Path $guardianCliLocation
-if ($ValidPath -eq $False)
-{
- Write-Host "Invalid Guardian CLI Location."
- exit 1
-}
+ if ($ValidPath -eq $False)
+ {
+ Write-PipelineTelemetryError -Force -Category 'Sdl' -Message 'Invalid Guardian CLI Location.'
+ ExitWithExitCode 1
+ }
-& $(Join-Path $PSScriptRoot "init-sdl.ps1") -GuardianCliLocation $guardianCliLocation -Repository $RepoName -BranchName $BranchName -WorkingDirectory $workingDirectory -AzureDevOpsAccessToken $AzureDevOpsAccessToken -GuardianLoggerLevel $GuardianLoggerLevel
-$gdnFolder = Join-Path $workingDirectory ".gdn"
+ & $(Join-Path $PSScriptRoot 'init-sdl.ps1') -GuardianCliLocation $guardianCliLocation -Repository $RepoName -BranchName $BranchName -WorkingDirectory $workingDirectory -AzureDevOpsAccessToken $AzureDevOpsAccessToken -GuardianLoggerLevel $GuardianLoggerLevel
+ $gdnFolder = Join-Path $workingDirectory '.gdn'
-if ($TsaOnboard) {
- if ($TsaCodebaseName -and $TsaNotificationEmail -and $TsaCodebaseAdmin -and $TsaBugAreaPath) {
- Write-Host "$guardianCliLocation tsa-onboard --codebase-name `"$TsaCodebaseName`" --notification-alias `"$TsaNotificationEmail`" --codebase-admin `"$TsaCodebaseAdmin`" --instance-url `"$TsaInstanceUrl`" --project-name `"$TsaProjectName`" --area-path `"$TsaBugAreaPath`" --iteration-path `"$TsaIterationPath`" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel"
- & $guardianCliLocation tsa-onboard --codebase-name "$TsaCodebaseName" --notification-alias "$TsaNotificationEmail" --codebase-admin "$TsaCodebaseAdmin" --instance-url "$TsaInstanceUrl" --project-name "$TsaProjectName" --area-path "$TsaBugAreaPath" --iteration-path "$TsaIterationPath" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel
- if ($LASTEXITCODE -ne 0) {
- Write-Host "Guardian tsa-onboard failed with exit code $LASTEXITCODE."
- exit $LASTEXITCODE
+ if ($TsaOnboard) {
+ if ($TsaCodebaseName -and $TsaNotificationEmail -and $TsaCodebaseAdmin -and $TsaBugAreaPath) {
+ Write-Host "$guardianCliLocation tsa-onboard --codebase-name `"$TsaCodebaseName`" --notification-alias `"$TsaNotificationEmail`" --codebase-admin `"$TsaCodebaseAdmin`" --instance-url `"$TsaInstanceUrl`" --project-name `"$TsaProjectName`" --area-path `"$TsaBugAreaPath`" --iteration-path `"$TsaIterationPath`" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel"
+ & $guardianCliLocation tsa-onboard --codebase-name "$TsaCodebaseName" --notification-alias "$TsaNotificationEmail" --codebase-admin "$TsaCodebaseAdmin" --instance-url "$TsaInstanceUrl" --project-name "$TsaProjectName" --area-path "$TsaBugAreaPath" --iteration-path "$TsaIterationPath" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel
+ if ($LASTEXITCODE -ne 0) {
+ Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian tsa-onboard failed with exit code $LASTEXITCODE."
+ ExitWithExitCode $LASTEXITCODE
+ }
+ } else {
+ Write-PipelineTelemetryError -Force -Category 'Sdl' -Message 'Could not onboard to TSA -- not all required values ($TsaCodebaseName, $TsaNotificationEmail, $TsaCodebaseAdmin, $TsaBugAreaPath) were specified.'
+ ExitWithExitCode 1
}
- } else {
- Write-Host "Could not onboard to TSA -- not all required values ($$TsaCodebaseName, $$TsaNotificationEmail, $$TsaCodebaseAdmin, $$TsaBugAreaPath) were specified."
- exit 1
}
-}
-if ($ArtifactToolsList -and $ArtifactToolsList.Count -gt 0) {
- & $(Join-Path $PSScriptRoot "run-sdl.ps1") -GuardianCliLocation $guardianCliLocation -WorkingDirectory $workingDirectory -TargetDirectory $ArtifactsDirectory -GdnFolder $gdnFolder -ToolsList $ArtifactToolsList -AzureDevOpsAccessToken $AzureDevOpsAccessToken -UpdateBaseline $UpdateBaseline -GuardianLoggerLevel $GuardianLoggerLevel -CrScanAdditionalRunConfigParams $CrScanAdditionalRunConfigParams -PoliCheckAdditionalRunConfigParams $PoliCheckAdditionalRunConfigParams
-}
-if ($SourceToolsList -and $SourceToolsList.Count -gt 0) {
- & $(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 ($ArtifactToolsList -and $ArtifactToolsList.Count -gt 0) {
+ & $(Join-Path $PSScriptRoot 'run-sdl.ps1') -GuardianCliLocation $guardianCliLocation -WorkingDirectory $workingDirectory -TargetDirectory $ArtifactsDirectory -GdnFolder $gdnFolder -ToolsList $ArtifactToolsList -AzureDevOpsAccessToken $AzureDevOpsAccessToken -UpdateBaseline $UpdateBaseline -GuardianLoggerLevel $GuardianLoggerLevel -CrScanAdditionalRunConfigParams $CrScanAdditionalRunConfigParams -PoliCheckAdditionalRunConfigParams $PoliCheckAdditionalRunConfigParams
+ }
+ if ($SourceToolsList -and $SourceToolsList.Count -gt 0) {
+ & $(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 ($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) {
- $TsaRepositoryName = "$($Repository)-$($BranchName)"
- }
- Write-Host "$guardianCliLocation tsa-publish --all-tools --repository-name `"$TsaRepositoryName`" --branch-name `"$TsaBranchName`" --build-number `"$BuildNumber`" --codebase-name `"$TsaCodebaseName`" --notification-alias `"$TsaNotificationEmail`" --codebase-admin `"$TsaCodebaseAdmin`" --instance-url `"$TsaInstanceUrl`" --project-name `"$TsaProjectName`" --area-path `"$TsaBugAreaPath`" --iteration-path `"$TsaIterationPath`" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel"
- & $guardianCliLocation tsa-publish --all-tools --repository-name "$TsaRepositoryName" --branch-name "$TsaBranchName" --build-number "$BuildNumber" --onboard $True --codebase-name "$TsaCodebaseName" --notification-alias "$TsaNotificationEmail" --codebase-admin "$TsaCodebaseAdmin" --instance-url "$TsaInstanceUrl" --project-name "$TsaProjectName" --area-path "$TsaBugAreaPath" --iteration-path "$TsaIterationPath" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel
- if ($LASTEXITCODE -ne 0) {
- Write-Host "Guardian tsa-publish failed with exit code $LASTEXITCODE."
- exit $LASTEXITCODE
+ if ($TsaPublish) {
+ if ($TsaBranchName -and $BuildNumber) {
+ if (-not $TsaRepositoryName) {
+ $TsaRepositoryName = "$($Repository)-$($BranchName)"
+ }
+ Write-Host "$guardianCliLocation tsa-publish --all-tools --repository-name `"$TsaRepositoryName`" --branch-name `"$TsaBranchName`" --build-number `"$BuildNumber`" --codebase-name `"$TsaCodebaseName`" --notification-alias `"$TsaNotificationEmail`" --codebase-admin `"$TsaCodebaseAdmin`" --instance-url `"$TsaInstanceUrl`" --project-name `"$TsaProjectName`" --area-path `"$TsaBugAreaPath`" --iteration-path `"$TsaIterationPath`" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel"
+ & $guardianCliLocation tsa-publish --all-tools --repository-name "$TsaRepositoryName" --branch-name "$TsaBranchName" --build-number "$BuildNumber" --onboard $True --codebase-name "$TsaCodebaseName" --notification-alias "$TsaNotificationEmail" --codebase-admin "$TsaCodebaseAdmin" --instance-url "$TsaInstanceUrl" --project-name "$TsaProjectName" --area-path "$TsaBugAreaPath" --iteration-path "$TsaIterationPath" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel
+ if ($LASTEXITCODE -ne 0) {
+ Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian tsa-publish failed with exit code $LASTEXITCODE."
+ ExitWithExitCode $LASTEXITCODE
+ }
+ } else {
+ Write-PipelineTelemetryError -Force -Category 'Sdl' -Message 'Could not publish to TSA -- not all required values ($TsaBranchName, $BuildNumber) were specified.'
+ ExitWithExitCode 1
}
- } else {
- Write-Host "Could not publish to TSA -- not all required values ($$TsaBranchName, $$BuildNumber) were specified."
- exit 1
}
}
+catch {
+ Write-Host $_.ScriptStackTrace
+ Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_
+ exit 1
+}
diff --git a/eng/common/sdl/extract-artifact-packages.ps1 b/eng/common/sdl/extract-artifact-packages.ps1
index d857ae2197..9a4fc1743d 100644
--- a/eng/common/sdl/extract-artifact-packages.ps1
+++ b/eng/common/sdl/extract-artifact-packages.ps1
@@ -3,14 +3,13 @@ param(
[Parameter(Mandatory=$true)][string] $ExtractPath # Full path to directory where the packages will be extracted
)
-$ErrorActionPreference = "Stop"
+$ErrorActionPreference = 'Stop'
Set-StrictMode -Version 2.0
# `tools.ps1` checks $ci to perform some actions. Since the post-build
# 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 = {
@@ -32,26 +31,15 @@ $ExtractPackage = {
Add-Type -AssemblyName System.IO.Compression.FileSystem
[System.IO.Directory]::CreateDirectory($ExtractPath);
+>>>>>>> refs/rewritten/upstream/release/dev16.4
- try {
- $zip = [System.IO.Compression.ZipFile]::OpenRead($PackagePath)
-
- $zip.Entries |
- Where-Object {$RelevantExtensions -contains [System.IO.Path]::GetExtension($_.Name)} |
- ForEach-Object {
- $TargetFile = Join-Path -Path $ExtractPath -ChildPath $_.Name
+# `tools.ps1` checks $ci to perform some actions. Since the post-build
+# 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
- [System.IO.Compression.ZipFileExtensions]::ExtractToFile($_, $TargetFile, $true)
- }
- }
- catch {
-
- }
- finally {
- $zip.Dispose()
- }
- }
- function ExtractArtifacts {
+function ExtractArtifacts {
if (!(Test-Path $InputPath)) {
Write-Host "Input Path does not exist: $InputPath"
ExitWithExitCode 0
@@ -68,11 +56,52 @@ $ExtractPackage = {
}
try {
+ . $PSScriptRoot\..\tools.ps1
+
+ $ExtractPackage = {
+ param(
+ [string] $PackagePath # Full path to a NuGet package
+ )
+
+ if (!(Test-Path $PackagePath)) {
+ Write-PipelineTelemetryError -Category 'Build' -Message "Input file does not exist: $PackagePath"
+ ExitWithExitCode 1
+ }
+
+ $RelevantExtensions = @('.dll', '.exe', '.pdb')
+ Write-Host -NoNewLine 'Extracting ' ([System.IO.Path]::GetFileName($PackagePath)) '...'
+
+ $PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath)
+ $ExtractPath = Join-Path -Path $using:ExtractPath -ChildPath $PackageId
+
+ Add-Type -AssemblyName System.IO.Compression.FileSystem
+
+ [System.IO.Directory]::CreateDirectory($ExtractPath);
+
+ try {
+ $zip = [System.IO.Compression.ZipFile]::OpenRead($PackagePath)
+
+ $zip.Entries |
+ Where-Object {$RelevantExtensions -contains [System.IO.Path]::GetExtension($_.Name)} |
+ ForEach-Object {
+ $TargetFile = Join-Path -Path $ExtractPath -ChildPath $_.Name
+
+ [System.IO.Compression.ZipFileExtensions]::ExtractToFile($_, $TargetFile, $true)
+ }
+ }
+ catch {
+ Write-Host $_.ScriptStackTrace
+ Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_
+ ExitWithExitCode 1
+ }
+ finally {
+ $zip.Dispose()
+ }
+ }
Measure-Command { ExtractArtifacts }
}
catch {
- Write-Host $_
- Write-Host $_.Exception
Write-Host $_.ScriptStackTrace
+ Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_
ExitWithExitCode 1
}
diff --git a/eng/common/sdl/init-sdl.ps1 b/eng/common/sdl/init-sdl.ps1
index c737eb0e71..285f1ccdb0 100644
--- a/eng/common/sdl/init-sdl.ps1
+++ b/eng/common/sdl/init-sdl.ps1
@@ -1,16 +1,19 @@
Param(
[string] $GuardianCliLocation,
[string] $Repository,
- [string] $BranchName="master",
+ [string] $BranchName='master',
[string] $WorkingDirectory,
[string] $AzureDevOpsAccessToken,
- [string] $GuardianLoggerLevel="Standard"
+ [string] $GuardianLoggerLevel='Standard'
)
-$ErrorActionPreference = "Stop"
+$ErrorActionPreference = 'Stop'
Set-StrictMode -Version 2.0
+$disableConfigureToolsetImport = $true
$LASTEXITCODE = 0
+. $PSScriptRoot\..\tools.ps1
+
# Don't display the console progress UI - it's a huge perf hit
$ProgressPreference = 'SilentlyContinue'
@@ -21,11 +24,10 @@ $uri = "https://dev.azure.com/dnceng/internal/_apis/git/repositories/sdl-tool-cf
$zipFile = "$WorkingDirectory/gdn.zip"
Add-Type -AssemblyName System.IO.Compression.FileSystem
-$gdnFolder = (Join-Path $WorkingDirectory ".gdn")
-Try
-{
+$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..."
+ 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)
@@ -33,19 +35,29 @@ Try
}
[System.IO.Compression.ZipFile]::ExtractToDirectory($zipFile, $WorkingDirectory)
Write-Host $gdnFolder
-} Catch [System.Net.WebException] {
+ 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..."
+ Write-Host 'Initializing Guardian...'
Write-Host "$GuardianCliLocation init --working-directory $WorkingDirectory --logger-level $GuardianLoggerLevel"
& $GuardianCliLocation init --working-directory $WorkingDirectory --logger-level $GuardianLoggerLevel
if ($LASTEXITCODE -ne 0) {
- Write-Error "Guardian init failed with exit code $LASTEXITCODE."
+ Write-PipelineTelemetryError -Force -Category 'Build' -Message "Guardian init failed with exit code $LASTEXITCODE."
+ ExitWithExitCode $LASTEXITCODE
}
# We create the mainbaseline so it can be edited later
Write-Host "$GuardianCliLocation baseline --working-directory $WorkingDirectory --name mainbaseline"
& $GuardianCliLocation baseline --working-directory $WorkingDirectory --name mainbaseline
if ($LASTEXITCODE -ne 0) {
- Write-Error "Guardian baseline failed with exit code $LASTEXITCODE."
+ 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"
-}
\ No newline at end of file
+ & $(Join-Path $PSScriptRoot 'push-gdn.ps1') -Repository $Repository -BranchName $BranchName -GdnFolder $gdnFolder -AzureDevOpsAccessToken $AzureDevOpsAccessToken -PushReason 'Initialize gdn folder'
+ ExitWithExitCode 0
+}
+catch {
+ Write-Host $_.ScriptStackTrace
+ Write-PipelineTelemetryError -Category 'Sdl' -Message $_
+ ExitWithExitCode 1
+}
diff --git a/eng/common/sdl/push-gdn.ps1 b/eng/common/sdl/push-gdn.ps1
index 79c707d6d8..79d3d355c7 100644
--- a/eng/common/sdl/push-gdn.ps1
+++ b/eng/common/sdl/push-gdn.ps1
@@ -1,51 +1,65 @@
Param(
[string] $Repository,
- [string] $BranchName="master",
+ [string] $BranchName='master',
[string] $GdnFolder,
[string] $AzureDevOpsAccessToken,
[string] $PushReason
)
-$ErrorActionPreference = "Stop"
+$ErrorActionPreference = 'Stop'
Set-StrictMode -Version 2.0
+$disableConfigureToolsetImport = $true
$LASTEXITCODE = 0
-# 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
-}
+try {
+ . $PSScriptRoot\..\tools.ps1
-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-Error "Git clone failed with exit code $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-Error "Git add failed with exit code $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-Error "Git commit failed with exit code $LASTEXITCODE."
-}
-Write-Host "git push"
-git push
-if ($LASTEXITCODE -ne 0) {
- Write-Error "Git push failed with exit code $LASTEXITCODE."
-}
+ # 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
+ }
-# Return to the original directory
-Pop-Location
\ No newline at end of file
+ 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
+}
\ No newline at end of file
diff --git a/eng/common/sdl/run-sdl.ps1 b/eng/common/sdl/run-sdl.ps1
index 9bc25314ae..40a084f796 100644
--- a/eng/common/sdl/run-sdl.ps1
+++ b/eng/common/sdl/run-sdl.ps1
@@ -5,55 +5,65 @@ Param(
[string] $GdnFolder,
[string[]] $ToolsList,
[string] $UpdateBaseline,
- [string] $GuardianLoggerLevel="Standard",
+ [string] $GuardianLoggerLevel='Standard',
[string[]] $CrScanAdditionalRunConfigParams,
[string[]] $PoliCheckAdditionalRunConfigParams
)
-$ErrorActionPreference = "Stop"
+$ErrorActionPreference = 'Stop'
Set-StrictMode -Version 2.0
+$disableConfigureToolsetImport = $true
$LASTEXITCODE = 0
-# We store config files in the r directory of .gdn
-Write-Host $ToolsList
-$gdnConfigPath = Join-Path $GdnFolder "r"
-$ValidPath = Test-Path $GuardianCliLocation
+try {
+ . $PSScriptRoot\..\tools.ps1
-if ($ValidPath -eq $False)
-{
- Write-Host "Invalid Guardian CLI Location."
- exit 1
-}
+ # We store config files in the r directory of .gdn
+ Write-Host $ToolsList
+ $gdnConfigPath = Join-Path $GdnFolder 'r'
+ $ValidPath = Test-Path $GuardianCliLocation
-$configParam = @("--config")
-
-foreach ($tool in $ToolsList) {
- $gdnConfigFile = Join-Path $gdnConfigPath "$tool-configure.gdnconfig"
- Write-Host $tool
- # We have to manually configure tools that run on source to look at the source directory only
- if ($tool -eq "credscan") {
- Write-Host "$GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args `" TargetDirectory < $TargetDirectory `" `" OutputType < pre `" $(If ($CrScanAdditionalRunConfigParams) {$CrScanAdditionalRunConfigParams})"
- & $GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args " TargetDirectory < $TargetDirectory " "OutputType < pre" $(If ($CrScanAdditionalRunConfigParams) {$CrScanAdditionalRunConfigParams})
- if ($LASTEXITCODE -ne 0) {
- Write-Host "Guardian configure for $tool failed with exit code $LASTEXITCODE."
- exit $LASTEXITCODE
- }
+ if ($ValidPath -eq $False)
+ {
+ Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Invalid Guardian CLI Location."
+ ExitWithExitCode 1
}
- if ($tool -eq "policheck") {
- Write-Host "$GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args `" Target < $TargetDirectory `" $(If ($PoliCheckAdditionalRunConfigParams) {$PoliCheckAdditionalRunConfigParams})"
- & $GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args " Target < $TargetDirectory " $(If ($PoliCheckAdditionalRunConfigParams) {$PoliCheckAdditionalRunConfigParams})
- if ($LASTEXITCODE -ne 0) {
- Write-Host "Guardian configure for $tool failed with exit code $LASTEXITCODE."
- exit $LASTEXITCODE
+
+ $configParam = @('--config')
+
+ foreach ($tool in $ToolsList) {
+ $gdnConfigFile = Join-Path $gdnConfigPath "$tool-configure.gdnconfig"
+ Write-Host $tool
+ # We have to manually configure tools that run on source to look at the source directory only
+ if ($tool -eq 'credscan') {
+ Write-Host "$GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args `" TargetDirectory < $TargetDirectory `" `" OutputType < pre `" $(If ($CrScanAdditionalRunConfigParams) {$CrScanAdditionalRunConfigParams})"
+ & $GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args " TargetDirectory < $TargetDirectory " "OutputType < pre" $(If ($CrScanAdditionalRunConfigParams) {$CrScanAdditionalRunConfigParams})
+ if ($LASTEXITCODE -ne 0) {
+ Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian configure for $tool failed with exit code $LASTEXITCODE."
+ ExitWithExitCode $LASTEXITCODE
+ }
+ }
+ if ($tool -eq 'policheck') {
+ Write-Host "$GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args `" Target < $TargetDirectory `" $(If ($PoliCheckAdditionalRunConfigParams) {$PoliCheckAdditionalRunConfigParams})"
+ & $GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args " Target < $TargetDirectory " $(If ($PoliCheckAdditionalRunConfigParams) {$PoliCheckAdditionalRunConfigParams})
+ if ($LASTEXITCODE -ne 0) {
+ Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian configure for $tool failed with exit code $LASTEXITCODE."
+ ExitWithExitCode $LASTEXITCODE
+ }
}
- }
- $configParam+=$gdnConfigFile
-}
+ $configParam+=$gdnConfigFile
+ }
-Write-Host "$GuardianCliLocation run --working-directory $WorkingDirectory --baseline mainbaseline --update-baseline $UpdateBaseline --logger-level $GuardianLoggerLevel $configParam"
-& $GuardianCliLocation run --working-directory $WorkingDirectory --tool $tool --baseline mainbaseline --update-baseline $UpdateBaseline --logger-level $GuardianLoggerLevel $configParam
-if ($LASTEXITCODE -ne 0) {
- Write-Host "Guardian run for $ToolsList using $configParam failed with exit code $LASTEXITCODE."
- exit $LASTEXITCODE
+ Write-Host "$GuardianCliLocation run --working-directory $WorkingDirectory --baseline mainbaseline --update-baseline $UpdateBaseline --logger-level $GuardianLoggerLevel $configParam"
+ & $GuardianCliLocation run --working-directory $WorkingDirectory --tool $tool --baseline mainbaseline --update-baseline $UpdateBaseline --logger-level $GuardianLoggerLevel $configParam
+ if ($LASTEXITCODE -ne 0) {
+ Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian run for $ToolsList using $configParam failed with exit code $LASTEXITCODE."
+ ExitWithExitCode $LASTEXITCODE
+ }
}
+catch {
+ Write-Host $_.ScriptStackTrace
+ Write-PipelineTelemetryError -Category 'Sdl' -Message $_
+ ExitWithExitCode 1
+}
\ No newline at end of file
diff --git a/eng/common/templates/job/execute-sdl.yml b/eng/common/templates/job/execute-sdl.yml
index 9a00430d65..da342a0749 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
diff --git a/eng/common/templates/job/job.yml b/eng/common/templates/job/job.yml
index ecebd0f03e..13dd40e26c 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 - https://github.com/dotnet/arcade/blob/master/Documentation/AzureDevOps/TemplateSchema.md
+ # See schema documentation in /Documentation/AzureDevOps/TemplateSchema.md
artifacts: ''
enableMicrobuild: false
enablePublishBuildArtifacts: false
diff --git a/eng/common/templates/post-build/channels/general-testing.yml b/eng/common/templates/post-build/channels/general-testing.yml
deleted file mode 100644
index 229e80a883..0000000000
--- a/eng/common/templates/post-build/channels/general-testing.yml
+++ /dev/null
@@ -1,143 +0,0 @@
-parameters:
- artifactsPublishingAdditionalParameters: ''
- dependsOn:
- - Validate
- publishInstallersAndChecksums: false
- symbolPublishingAdditionalParameters: ''
-
-stages:
-- stage: General_Testing_Publish
- dependsOn: ${{ parameters.dependsOn }}
- variables:
- - template: ../common-variables.yml
- displayName: General Testing Publishing
- jobs:
- - template: ../setup-maestro-vars.yml
-
- - job:
- displayName: Symbol Publishing
- dependsOn: setupMaestroVars
- condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.GeneralTesting_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
-
- # 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:
- 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:
- - 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.GeneralTesting_Channel_Id))
- pool:
- vmImage: 'windows-2019'
- steps:
- - task: DownloadBuildArtifacts@0
- displayName: Download Package Artifacts
- 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
- 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:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/general-testing/nuget/v3/index.json'
- /p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
- /p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/general-testing/nuget/v3/index.json'
- /p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
- /p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/general-testing-symbols/nuget/v3/index.json'
- /p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
- ${{ parameters.artifactsPublishingAdditionalParameters }}
-
- - template: ../../steps/promote-build.yml
- parameters:
- ChannelId: ${{ variables.GeneralTesting_Channel_Id }}
diff --git a/eng/common/templates/post-build/channels/netcore-3-eng-validation.yml b/eng/common/templates/post-build/channels/netcore-3-eng-validation.yml
deleted file mode 100644
index 47f7a445be..0000000000
--- a/eng/common/templates/post-build/channels/netcore-3-eng-validation.yml
+++ /dev/null
@@ -1,96 +0,0 @@
-parameters:
- artifactsPublishingAdditionalParameters: ''
- dependsOn:
- - Validate
- publishInstallersAndChecksums: false
-
-stages:
-- stage: NetCore_3_Tools_Validation_Publish
- dependsOn: ${{ parameters.dependsOn }}
- variables:
- - template: ../common-variables.yml
- displayName: .NET 3 Tools - Validation Publishing
- jobs:
- - template: ../setup-maestro-vars.yml
-
- - job: publish_assets
- displayName: Publish Assets
- dependsOn: setupMaestroVars
- variables:
- - 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_3_Tools_Validation_Channel_Id))
- pool:
- vmImage: 'windows-2019'
- steps:
- - task: DownloadBuildArtifacts@0
- displayName: Download Package Artifacts
- 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
- 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:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
- /p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
- /p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
- /p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
- /p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json'
- /p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
- ${{ parameters.artifactsPublishingAdditionalParameters }}
-
- - template: ../../steps/promote-build.yml
- parameters:
- ChannelId: ${{ variables.NETCore_3_Tools_Validation_Channel_Id }}
diff --git a/eng/common/templates/post-build/channels/netcore-3-eng.yml b/eng/common/templates/post-build/channels/netcore-3-eng.yml
deleted file mode 100644
index a8ef4435dd..0000000000
--- a/eng/common/templates/post-build/channels/netcore-3-eng.yml
+++ /dev/null
@@ -1,143 +0,0 @@
-parameters:
- artifactsPublishingAdditionalParameters: ''
- dependsOn:
- - Validate
- publishInstallersAndChecksums: false
- symbolPublishingAdditionalParameters: ''
-
-stages:
-- stage: NetCore_3_Tools_Publish
- dependsOn: ${{ parameters.dependsOn }}
- variables:
- - template: ../common-variables.yml
- displayName: .NET 3 Tools Publishing
- jobs:
- - template: ../setup-maestro-vars.yml
-
- - job:
- displayName: Symbol Publishing
- dependsOn: setupMaestroVars
- condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.NetCore_3_Tools_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
-
- # 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 there will be authentication failures when accessing a private feed hosted in a different org.
- - 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:
- 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:
- - 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_3_Tools_Channel_Id))
- pool:
- vmImage: 'windows-2019'
- steps:
- - task: DownloadBuildArtifacts@0
- displayName: Download Package Artifacts
- 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
- 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:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
- /p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
- /p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
- /p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
- /p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json'
- /p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
- ${{ parameters.artifactsPublishingAdditionalParameters }}
-
- - template: ../../steps/promote-build.yml
- parameters:
- ChannelId: ${{ variables.NetCore_3_Tools_Channel_Id }}
diff --git a/eng/common/templates/post-build/channels/netcore-blazor-31-features.yml b/eng/common/templates/post-build/channels/netcore-blazor-31-features.yml
deleted file mode 100644
index 8be0506ff9..0000000000
--- a/eng/common/templates/post-build/channels/netcore-blazor-31-features.yml
+++ /dev/null
@@ -1,143 +0,0 @@
-parameters:
- artifactsPublishingAdditionalParameters: ''
- dependsOn:
- - Validate
- publishInstallersAndChecksums: false
- symbolPublishingAdditionalParameters: ''
-
-stages:
-- stage: NetCore_Blazor31_Features_Publish
- dependsOn: ${{ parameters.dependsOn }}
- variables:
- - template: ../common-variables.yml
- displayName: .NET Core 3.1 Blazor Features Publishing
- jobs:
- - template: ../setup-maestro-vars.yml
-
- - job:
- displayName: Symbol Publishing
- dependsOn: setupMaestroVars
- condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.NetCore_31_Blazor_Features))
- 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
-
- # 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:
- 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:
- - 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_31_Blazor_Features))
- pool:
- vmImage: 'windows-2019'
- steps:
- - task: DownloadBuildArtifacts@0
- displayName: Download Package Artifacts
- 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
- 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:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-blazor/nuget/v3/index.json'
- /p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
- /p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-blazor/nuget/v3/index.json'
- /p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
- /p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-blazor-symbols/nuget/v3/index.json'
- /p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
- ${{ parameters.artifactsPublishingAdditionalParameters }}
-
- - template: ../../steps/promote-build.yml
- parameters:
- ChannelId: ${{ variables.NetCore_31_Blazor_Features }}
diff --git a/eng/common/templates/post-build/channels/netcore-dev-30.yml b/eng/common/templates/post-build/channels/netcore-dev-30.yml
deleted file mode 100644
index 69f1a9013e..0000000000
--- a/eng/common/templates/post-build/channels/netcore-dev-30.yml
+++ /dev/null
@@ -1,126 +0,0 @@
-parameters:
- symbolPublishingAdditionalParameters: ''
- artifactsPublishingAdditionalParameters: ''
- publishInstallersAndChecksums: false
-
-stages:
-- stage: NetCore_Dev30_Publish
- dependsOn: validate
- variables:
- - template: ../common-variables.yml
- displayName: .NET Core 3.0 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_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.PublicDevRelease_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: Publish Assets
- env:
- AZURE_DEVOPS_EXT_PAT: $(dn-bot-dnceng-universal-packages-rw)
- 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.PublicDevRelease_30_Channel_Id }}
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 83a411f111..0000000000
--- a/eng/common/templates/post-build/channels/netcore-dev-31.yml
+++ /dev/null
@@ -1,159 +0,0 @@
-parameters:
-<<<<<<< HEAD
- symbolPublishingAdditionalParameters: ''
- artifactsPublishingAdditionalParameters: ''
- publishInstallersAndChecksums: false
-
-stages:
-- stage: NetCore_Dev31_Publish
- dependsOn: validate
-=======
- artifactsPublishingAdditionalParameters: ''
- dependsOn:
- - Validate
- publishInstallersAndChecksums: false
- symbolPublishingAdditionalParameters: ''
-
-stages:
-- stage: NetCore_Dev31_Publish
- dependsOn: ${{ parameters.dependsOn }}
->>>>>>> refs/rewritten/master
- 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
-
- # 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:
- 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:
- - 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
- continueOnError: true
-
- - task: DownloadBuildArtifacts@0
- displayName: Download Blob Artifacts
- inputs:
- buildType: current
- artifactName: BlobArtifacts
- continueOnError: true
-
- - 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
-<<<<<<< HEAD
- displayName: Publish Assets
- env:
- AZURE_DEVOPS_EXT_PAT: $(dn-bot-dnceng-universal-packages-rw)
-=======
- 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
->>>>>>> refs/rewritten/master
- 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: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 a918545677..0000000000
--- a/eng/common/templates/post-build/channels/netcore-dev-5.yml
+++ /dev/null
@@ -1,159 +0,0 @@
-parameters:
-<<<<<<< HEAD
- symbolPublishingAdditionalParameters: ''
- artifactsPublishingAdditionalParameters: ''
- publishInstallersAndChecksums: false
-
-stages:
-- stage: NetCore_Dev5_Publish
- dependsOn: validate
-=======
- artifactsPublishingAdditionalParameters: ''
- dependsOn:
- - Validate
- publishInstallersAndChecksums: false
- symbolPublishingAdditionalParameters: ''
-
-stages:
-- stage: NetCore_Dev5_Publish
- dependsOn: ${{ parameters.dependsOn }}
->>>>>>> refs/rewritten/master
- 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
-
- # 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:
- 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:
- - 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
- continueOnError: true
-
- - task: DownloadBuildArtifacts@0
- displayName: Download Blob Artifacts
- inputs:
- buildType: current
- artifactName: BlobArtifacts
- continueOnError: true
-
- - 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
-<<<<<<< HEAD
- displayName: Publish Assets
- env:
- AZURE_DEVOPS_EXT_PAT: $(dn-bot-dnceng-universal-packages-rw)
-=======
- 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
->>>>>>> refs/rewritten/master
- 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: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-eng-latest.yml b/eng/common/templates/post-build/channels/netcore-eng-latest.yml
deleted file mode 100644
index 4bf6cdbde1..0000000000
--- a/eng/common/templates/post-build/channels/netcore-eng-latest.yml
+++ /dev/null
@@ -1,159 +0,0 @@
-parameters:
-<<<<<<< HEAD
- symbolPublishingAdditionalParameters: ''
- artifactsPublishingAdditionalParameters: ''
- publishInstallersAndChecksums: false
-
-stages:
-- stage: NetCore_Tools_Latest_Publish
- dependsOn: validate
-=======
- artifactsPublishingAdditionalParameters: ''
- dependsOn:
- - Validate
- publishInstallersAndChecksums: false
- symbolPublishingAdditionalParameters: ''
-
-stages:
-- stage: NetCore_Tools_Latest_Publish
- dependsOn: ${{ parameters.dependsOn }}
->>>>>>> refs/rewritten/master
- 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
-
- # 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:
- 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:
- - 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
- continueOnError: true
-
- - task: DownloadBuildArtifacts@0
- displayName: Download Blob Artifacts
- inputs:
- buildType: current
- artifactName: BlobArtifacts
- continueOnError: true
-
- - 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
-<<<<<<< HEAD
- displayName: Publish Assets
- env:
- AZURE_DEVOPS_EXT_PAT: $(dn-bot-dnceng-universal-packages-rw)
-=======
- 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
->>>>>>> refs/rewritten/master
- 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:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
- /p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
- /p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
- /p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
- /p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-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 }}
diff --git a/eng/common/templates/post-build/channels/netcore-eng-validation.yml b/eng/common/templates/post-build/channels/netcore-eng-validation.yml
deleted file mode 100644
index 36991ed020..0000000000
--- a/eng/common/templates/post-build/channels/netcore-eng-validation.yml
+++ /dev/null
@@ -1,98 +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:
- - 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_Validation_Channel_Id))
- pool:
- vmImage: 'windows-2019'
- steps:
- - task: DownloadBuildArtifacts@0
- displayName: Download Package Artifacts
- 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
- 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
- # 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 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:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
- /p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
- /p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
- /p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
- /p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-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_Validation_Channel_Id }}
diff --git a/eng/common/templates/post-build/channels/netcore-internal-30.yml b/eng/common/templates/post-build/channels/netcore-internal-30.yml
deleted file mode 100644
index 75b1bfaaad..0000000000
--- a/eng/common/templates/post-build/channels/netcore-internal-30.yml
+++ /dev/null
@@ -1,161 +0,0 @@
-parameters:
-<<<<<<< HEAD
- symbolPublishingAdditionalParameters: ''
- artifactsPublishingAdditionalParameters: ''
-
-stages:
-- stage: NetCore_30_Internal_Servicing_Publishing
- dependsOn: validate
-=======
- artifactsPublishingAdditionalParameters: ''
- dependsOn:
- - Validate
- publishInstallersAndChecksums: false
- symbolPublishingAdditionalParameters: ''
-
-stages:
-- stage: NetCore_30_Internal_Servicing_Publishing
- dependsOn: ${{ parameters.dependsOn }}
->>>>>>> refs/rewritten/master
- variables:
- - template: ../common-variables.yml
- displayName: .NET Core 3.0 Internal Servicing Publishing
- jobs:
- - template: ../setup-maestro-vars.yml
-
- - job:
- displayName: Symbol Publishing
- dependsOn: setupMaestroVars
- condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.InternalServicing_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
-
-<<<<<<< HEAD
-=======
- # 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)
-
->>>>>>> refs/rewritten/master
- - 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
- /p:PublishToMSDL=false
- ${{ parameters.symbolPublishingAdditionalParameters }}
-
- - job: publish_assets
- displayName: Publish Assets
- dependsOn: setupMaestroVars
- variables:
- - 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))
- pool:
- vmImage: 'windows-2019'
- steps:
- - task: DownloadBuildArtifacts@0
- displayName: Download Package Artifacts
- 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
- 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
-<<<<<<< HEAD
- displayName: Publish Assets
- env:
- AZURE_DEVOPS_EXT_PAT: $(dn-bot-dnceng-universal-packages-rw)
-=======
- 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
->>>>>>> refs/rewritten/master
- inputs:
- filePath: eng\common\sdk-task.ps1
- arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet
- /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=true
- /p:ChecksumsTargetStaticFeed=$(InternalChecksumsBlobFeedUrl)
- /p:ChecksumsAzureAccountKey=$(InternalChecksumsBlobFeedKey)
- /p:InstallersTargetStaticFeed=$(InternalInstallersBlobFeedUrl)
- /p:InstallersAzureAccountKey=$(InternalInstallersBlobFeedKey)
- /p:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v3/index.json'
- /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:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
- /p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-symbols/nuget/v3/index.json'
- /p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
- ${{ parameters.artifactsPublishingAdditionalParameters }}
-
- - template: ../../steps/promote-build.yml
- parameters:
- ChannelId: ${{ variables.InternalServicing_30_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 ad82afd50b..0000000000
--- a/eng/common/templates/post-build/channels/netcore-release-30.yml
+++ /dev/null
@@ -1,159 +0,0 @@
-parameters:
-<<<<<<< HEAD
- symbolPublishingAdditionalParameters: ''
- artifactsPublishingAdditionalParameters: ''
- publishInstallersAndChecksums: false
-
-stages:
-- stage: NetCore_Release30_Publish
- dependsOn: validate
-=======
- artifactsPublishingAdditionalParameters: ''
- dependsOn:
- - Validate
- publishInstallersAndChecksums: false
- symbolPublishingAdditionalParameters: ''
-
-stages:
-- stage: NetCore_Release30_Publish
- dependsOn: ${{ parameters.dependsOn }}
->>>>>>> refs/rewritten/master
- 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
-
- # 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:
- 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:
- - 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
- continueOnError: true
-
- - task: DownloadBuildArtifacts@0
- displayName: Download Blob Artifacts
- inputs:
- buildType: current
- artifactName: BlobArtifacts
- continueOnError: true
-
- - 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
-<<<<<<< HEAD
- displayName: Publish Assets
- env:
- AZURE_DEVOPS_EXT_PAT: $(dn-bot-dnceng-universal-packages-rw)
-=======
- 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
->>>>>>> refs/rewritten/master
- 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: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-release-31.yml b/eng/common/templates/post-build/channels/netcore-release-31.yml
deleted file mode 100644
index 070c1186da..0000000000
--- a/eng/common/templates/post-build/channels/netcore-release-31.yml
+++ /dev/null
@@ -1,159 +0,0 @@
-parameters:
-<<<<<<< HEAD
- symbolPublishingAdditionalParameters: ''
- artifactsPublishingAdditionalParameters: ''
- publishInstallersAndChecksums: false
-
-stages:
-- stage: NetCore_Release31_Publish
- dependsOn: validate
-=======
- artifactsPublishingAdditionalParameters: ''
- dependsOn:
- - Validate
- publishInstallersAndChecksums: false
- symbolPublishingAdditionalParameters: ''
-
-stages:
-- stage: NetCore_Release31_Publish
- dependsOn: ${{ parameters.dependsOn }}
->>>>>>> refs/rewritten/master
- variables:
- - template: ../common-variables.yml
- displayName: .NET Core 3.1 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_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
-
- # 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:
- 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:
- - 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))
- pool:
- vmImage: 'windows-2019'
- steps:
- - task: DownloadBuildArtifacts@0
- displayName: Download Package Artifacts
- 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
- 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
-<<<<<<< HEAD
- displayName: Publish Assets
- env:
- AZURE_DEVOPS_EXT_PAT: $(dn-bot-dnceng-universal-packages-rw)
-=======
- 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
->>>>>>> refs/rewritten/master
- 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: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.PublicRelease_31_Channel_Id }}
diff --git a/eng/common/templates/post-build/common-variables.yml b/eng/common/templates/post-build/common-variables.yml
deleted file mode 100644
index ad4e0004f2..0000000000
--- a/eng/common/templates/post-build/common-variables.yml
+++ /dev/null
@@ -1,96 +0,0 @@
-variables:
- - 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
- value: 128
-
- # .NET Core 5 Dev
- - name: NetCore_5_Dev_Channel_Id
- value: 131
-
- # .NET Core 3.1 Dev
- - name: PublicDevRelease_31_Channel_Id
- value: 128
-
- # .NET Core 5 Dev
- - name: NetCore_5_Dev_Channel_Id
- value: 131
-
- # .NET Tools - Validation
- - 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
-
- # .NET Core 3.0 Release
- - name: PublicRelease_30_Channel_Id
- value: 19
-
- # .NET Core 3.1 Release
- - 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
- value: 531
-
- # Whether the build is internal or not
- - name: IsInternalBuild
- value: ${{ and(ne(variables['System.TeamProject'], 'public'), contains(variables['Build.SourceBranch'], 'internal')) }}
-
- # Default Maestro++ API Endpoint and API Version
- - name: MaestroApiEndPoint
- value: "https://maestro-prod.westus2.cloudapp.azure.com"
- - name: MaestroApiAccessToken
- value: $(MaestroAccessToken)
- - name: MaestroApiVersion
- value: "2019-01-16"
-
- - name: SourceLinkCLIVersion
- value: 3.0.0
- - name: SymbolToolVersion
- value: 1.0.1
-
- # Feed Configurations
- # These should include the suffix "/index.json"
-
- # Default locations for Installers and checksums
- # Public Locations
- - name: ChecksumsBlobFeedUrl
- value: https://dotnetclichecksums.blob.core.windows.net/dotnet/index.json
- - name: InstallersBlobFeedUrl
- value: https://dotnetcli.blob.core.windows.net/dotnet/index.json
-
- # Private Locations
- - name: InternalChecksumsBlobFeedUrl
- value: https://dotnetclichecksumsmsrc.blob.core.windows.net/dotnet/index.json
- - name: InternalChecksumsBlobFeedKey
- value: $(dotnetclichecksumsmsrc-storage-key)
-
- - name: InternalInstallersBlobFeedUrl
- value: https://dotnetclimsrc.blob.core.windows.net/dotnet/index.json
- - name: InternalInstallersBlobFeedKey
- value: $(dotnetclimsrc-access-key)
diff --git a/eng/common/templates/post-build/darc-gather-drop.yml b/eng/common/templates/post-build/darc-gather-drop.yml
deleted file mode 100644
index 3268ccaa55..0000000000
--- a/eng/common/templates/post-build/darc-gather-drop.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-parameters:
- ChannelId: 0
-
-jobs:
-- job: gatherDrop
- displayName: Gather Drop
- dependsOn: setupMaestroVars
- condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.ChannelId }}))
- variables:
- - name: BARBuildId
- value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
- pool:
- vmImage: 'windows-2019'
- steps:
- - task: PowerShell@2
- displayName: Darc gather-drop
- inputs:
- filePath: $(Build.SourcesDirectory)/eng/common/post-build/darc-gather-drop.ps1
- arguments: -BarBuildId $(BARBuildId)
- -DropLocation $(Agent.BuildDirectory)/Temp/Drop/
- -MaestroApiAccessToken $(MaestroApiAccessToken)
- -MaestroApiEndPoint $(MaestroApiEndPoint)
- -MaestroApiVersion $(MaestroApiVersion)
diff --git a/eng/common/templates/post-build/post-build.yml b/eng/common/templates/post-build/post-build.yml
deleted file mode 100644
index f5755590cd..0000000000
--- a/eng/common/templates/post-build/post-build.yml
+++ /dev/null
@@ -1,188 +0,0 @@
-parameters:
- enableSourceLinkValidation: false
- enableSigningValidation: true
- enableSymbolValidation: false
- enableNugetValidation: true
- publishInstallersAndChecksums: false
- SDLValidationParameters:
- enable: false
- continueOnError: false
- params: ''
-
- # These parameters let the user customize the call to sdk-task.ps1 for publishing
- # symbols & general artifacts as well as for signing validation
- symbolPublishingAdditionalParameters: ''
- artifactsPublishingAdditionalParameters: ''
- signingValidationAdditionalParameters: ''
-
- # Which stages should finish execution before post-build stages start
- validateDependsOn:
- - build
- publishDependsOn:
- - Validate
-
-stages:
-- stage: Validate
- dependsOn: ${{ parameters.validateDependsOn }}
- displayName: Validate
- jobs:
- - ${{ if eq(parameters.enableNugetValidation, 'true') }}:
- - job:
- displayName: NuGet Validation
- pool:
- vmImage: 'windows-2019'
- steps:
- - task: DownloadBuildArtifacts@0
- displayName: Download Package Artifacts
- inputs:
- buildType: current
- artifactName: PackageArtifacts
-
- - task: PowerShell@2
- displayName: Validate
- inputs:
- filePath: $(Build.SourcesDirectory)/eng/common/post-build/nuget-validation.ps1
- arguments: -PackagesPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/
- -ToolDestinationPath $(Agent.BuildDirectory)/Extract/
-
- - ${{ if eq(parameters.enableSigningValidation, 'true') }}:
- - job:
- displayName: Signing Validation
- variables:
- - template: common-variables.yml
- pool:
- vmImage: 'windows-2019'
- steps:
- - task: DownloadBuildArtifacts@0
- displayName: Download Package Artifacts
- inputs:
- buildType: current
- artifactName: PackageArtifacts
-
- # 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: Validate
- inputs:
- filePath: eng\common\sdk-task.ps1
- arguments: -task SigningValidation -restore -msbuildEngine dotnet
- /p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts'
- /p:SignCheckExclusionsFile='$(Build.SourcesDirectory)/eng/SignCheckExclusionsFile.txt'
- /p:Configuration=Release
- ${{ parameters.signingValidationAdditionalParameters }}
-
- - ${{ if eq(parameters.enableSourceLinkValidation, 'true') }}:
- - job:
- displayName: SourceLink Validation
- variables:
- - template: common-variables.yml
- pool:
- vmImage: 'windows-2019'
- steps:
- - task: DownloadBuildArtifacts@0
- displayName: Download Blob Artifacts
- inputs:
- buildType: current
- artifactName: BlobArtifacts
-
- - task: PowerShell@2
- displayName: Validate
- inputs:
- filePath: $(Build.SourcesDirectory)/eng/common/post-build/sourcelink-validation.ps1
- arguments: -InputPath $(Build.ArtifactStagingDirectory)/BlobArtifacts/
- -ExtractPath $(Agent.BuildDirectory)/Extract/
- -GHRepoName $(Build.Repository.Name)
- -GHCommit $(Build.SourceVersion)
- -SourcelinkCliVersion $(SourceLinkCLIVersion)
- continueOnError: true
-
- - ${{ if eq(parameters.SDLValidationParameters.enable, 'true') }}:
- - template: /eng/common/templates/job/execute-sdl.yml
- parameters:
- additionalParameters: ${{ parameters.SDLValidationParameters.params }}
- continueOnError: ${{ parameters.SDLValidationParameters.continueOnError }}
-
-- template: \eng\common\templates\post-build\channels\netcore-dev-5.yml
- parameters:
- artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
- dependsOn: ${{ parameters.publishDependsOn }}
- publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
- symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
-
-- template: \eng\common\templates\post-build\channels\netcore-dev-31.yml
- parameters:
- artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
- dependsOn: ${{ parameters.publishDependsOn }}
- publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
- symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
-
-- template: \eng\common\templates\post-build\channels\netcore-eng-latest.yml
- parameters:
- artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
- dependsOn: ${{ parameters.publishDependsOn }}
- publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
- symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
-
-- template: \eng\common\templates\post-build\channels\netcore-eng-validation.yml
- parameters:
- artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
- dependsOn: ${{ parameters.publishDependsOn }}
- publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
-
-- template: \eng\common\templates\post-build\channels\netcore-3-eng-validation.yml
- parameters:
- artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
- dependsOn: ${{ parameters.publishDependsOn }}
- publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
-
-- template: \eng\common\templates\post-build\channels\netcore-3-eng.yml
- parameters:
- dependsOn: ${{ parameters.publishDependsOn }}
- symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
- artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
- publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
-
-- template: \eng\common\templates\post-build\channels\netcore-release-30.yml
- parameters:
- artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
- dependsOn: ${{ parameters.publishDependsOn }}
- publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
- symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
-
-- template: \eng\common\templates\post-build\channels\netcore-release-31.yml
- parameters:
- artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
- dependsOn: ${{ parameters.publishDependsOn }}
- publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
- symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
-
-- template: \eng\common\templates\post-build\channels\netcore-blazor-31-features.yml
- parameters:
- artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
- dependsOn: ${{ parameters.publishDependsOn }}
- publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
- symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
-
-- template: \eng\common\templates\post-build\channels\netcore-internal-30.yml
- parameters:
- artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
- dependsOn: ${{ parameters.publishDependsOn }}
- publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
- symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
-
-- template: \eng\common\templates\post-build\channels\general-testing.yml
- parameters:
- artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
- dependsOn: ${{ parameters.publishDependsOn }}
- publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
- symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
diff --git a/eng/common/templates/post-build/promote-build.yml b/eng/common/templates/post-build/promote-build.yml
deleted file mode 100644
index 6b479c3b82..0000000000
--- a/eng/common/templates/post-build/promote-build.yml
+++ /dev/null
@@ -1,25 +0,0 @@
-parameters:
- ChannelId: 0
-
-jobs:
-- job:
- displayName: Promote Build
- dependsOn: setupMaestroVars
- condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.ChannelId }}))
- variables:
- - name: BARBuildId
- value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
- - name: ChannelId
- value: ${{ parameters.ChannelId }}
- pool:
- vmImage: 'windows-2019'
- steps:
- - task: PowerShell@2
- displayName: Add Build to Channel
- inputs:
- filePath: $(Build.SourcesDirectory)/eng/common/post-build/promote-build.ps1
- arguments: -BuildId $(BARBuildId)
- -ChannelId $(ChannelId)
- -MaestroApiAccessToken $(MaestroApiAccessToken)
- -MaestroApiEndPoint $(MaestroApiEndPoint)
- -MaestroApiVersion $(MaestroApiVersion)
diff --git a/eng/common/templates/post-build/setup-maestro-vars.yml b/eng/common/templates/post-build/setup-maestro-vars.yml
deleted file mode 100644
index 716b53f740..0000000000
--- a/eng/common/templates/post-build/setup-maestro-vars.yml
+++ /dev/null
@@ -1,40 +0,0 @@
-jobs:
-- job: setupMaestroVars
- displayName: Setup Maestro Vars
- pool:
- vmImage: 'windows-2019'
- steps:
- - checkout: none
-
- - task: DownloadBuildArtifacts@0
- displayName: Download Release Configs
- inputs:
- buildType: current
- artifactName: ReleaseConfigs
-
- - task: PowerShell@2
- name: setReleaseVars
- displayName: Set Release Configs Vars
- inputs:
- 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/post-build/trigger-subscription.yml b/eng/common/templates/post-build/trigger-subscription.yml
deleted file mode 100644
index da669030da..0000000000
--- a/eng/common/templates/post-build/trigger-subscription.yml
+++ /dev/null
@@ -1,13 +0,0 @@
-parameters:
- ChannelId: 0
-
-steps:
-- task: PowerShell@2
- displayName: Triggering subscriptions
- inputs:
- filePath: $(Build.SourcesDirectory)/eng/common/post-build/trigger-subscriptions.ps1
- arguments: -SourceRepo $(Build.Repository.Uri)
- -ChannelId ${{ parameters.ChannelId }}
- -MaestroApiAccessToken $(MaestroAccessToken)
- -MaestroApiEndPoint $(MaestroApiEndPoint)
- -MaestroApiVersion $(MaestroApiVersion)
diff --git a/eng/common/templates/steps/publish-logs.yml b/eng/common/templates/steps/publish-logs.yml
new file mode 100644
index 0000000000..8903ba57c0
--- /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/tools.ps1 b/eng/common/tools.ps1
index 42ca33ac33..d762c9f044 100644
--- a/eng/common/tools.ps1
+++ b/eng/common/tools.ps1
@@ -5,7 +5,7 @@
[bool]$ci = if (Test-Path variable:ci) { $ci } else { $false }
# Build configuration. Common values include 'Debug' and 'Release', but the repository may use other names.
-[string]$configuration = if (Test-Path variable:configuration) { $configuration } else { "Debug" }
+[string]$configuration = if (Test-Path variable:configuration) { $configuration } else { 'Debug' }
# Set to true to output binary log from msbuild. Note that emitting binary log slows down the build.
# Binary log must be enabled on CI.
@@ -24,7 +24,7 @@
[bool]$restore = if (Test-Path variable:restore) { $restore } else { $true }
# Adjusts msbuild verbosity level.
-[string]$verbosity = if (Test-Path variable:verbosity) { $verbosity } else { "minimal" }
+[string]$verbosity = if (Test-Path variable:verbosity) { $verbosity } else { 'minimal' }
# Set to true to reuse msbuild nodes. Recommended to not reuse on CI.
[bool]$nodeReuse = if (Test-Path variable:nodeReuse) { $nodeReuse } else { !$ci }
@@ -41,23 +41,23 @@
# Enable repos to use a particular version of the on-line dotnet-install scripts.
# default URL: https://dot.net/v1/dotnet-install.ps1
-[string]$dotnetInstallScriptVersion = if (Test-Path variable:dotnetInstallScriptVersion) { $dotnetInstallScriptVersion } else { "v1" }
+[string]$dotnetInstallScriptVersion = if (Test-Path variable:dotnetInstallScriptVersion) { $dotnetInstallScriptVersion } else { 'v1' }
# True to use global NuGet cache instead of restoring packages to repository-local directory.
[bool]$useGlobalNuGetCache = if (Test-Path variable:useGlobalNuGetCache) { $useGlobalNuGetCache } else { !$ci }
# 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") }
+$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"
+$ErrorActionPreference = 'Stop'
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
function Create-Directory([string[]] $path) {
if (!(Test-Path $path)) {
- New-Item -path $path -force -itemType "Directory" | Out-Null
+ New-Item -path $path -force -itemType 'Directory' | Out-Null
}
}
@@ -121,7 +121,7 @@ function InitializeDotNetCli([bool]$install) {
# Find the first path on %PATH% that contains the dotnet.exe
if ($useInstalledDotNetCli -and (-not $globalJsonHasRuntimes) -and ($env:DOTNET_INSTALL_DIR -eq $null)) {
- $dotnetCmd = Get-Command "dotnet.exe" -ErrorAction SilentlyContinue
+ $dotnetCmd = Get-Command 'dotnet.exe' -ErrorAction SilentlyContinue
if ($dotnetCmd -ne $null) {
$env:DOTNET_INSTALL_DIR = Split-Path $dotnetCmd.Path -Parent
}
@@ -134,13 +134,13 @@ function InitializeDotNetCli([bool]$install) {
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"
+ $dotnetRoot = Join-Path $RepoRoot '.dotnet'
if (-not (Test-Path(Join-Path $dotnetRoot "sdk\$dotnetSdkVersion"))) {
if ($install) {
InstallDotNetSdk $dotnetRoot $dotnetSdkVersion
} else {
- Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Unable to find dotnet with SDK version '$dotnetSdkVersion'"
+ Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Unable to find dotnet with SDK version '$dotnetSdkVersion'"
ExitWithExitCode 1
}
}
@@ -163,7 +163,7 @@ function InitializeDotNetCli([bool]$install) {
}
function GetDotNetInstallScript([string] $dotnetRoot) {
- $installScript = Join-Path $dotnetRoot "dotnet-install.ps1"
+ $installScript = Join-Path $dotnetRoot 'dotnet-install.ps1'
if (!(Test-Path $installScript)) {
Create-Directory $dotnetRoot
$ProgressPreference = 'SilentlyContinue' # Don't display the console progress UI - it's a huge perf hit
@@ -173,17 +173,17 @@ function GetDotNetInstallScript([string] $dotnetRoot) {
return $installScript
}
-function InstallDotNetSdk([string] $dotnetRoot, [string] $version, [string] $architecture = "") {
+function InstallDotNetSdk([string] $dotnetRoot, [string] $version, [string] $architecture = '') {
InstallDotNet $dotnetRoot $version $architecture
}
function InstallDotNet([string] $dotnetRoot,
[string] $version,
- [string] $architecture = "",
- [string] $runtime = "",
+ [string] $architecture = '',
+ [string] $runtime = '',
[bool] $skipNonVersionedFiles = $false,
- [string] $runtimeSourceFeed = "",
- [string] $runtimeSourceFeedKey = "") {
+ [string] $runtimeSourceFeed = '',
+ [string] $runtimeSourceFeedKey = '') {
$installScript = GetDotNetInstallScript $dotnetRoot
$installParameters = @{
@@ -199,7 +199,7 @@ function InstallDotNet([string] $dotnetRoot,
& $installScript @installParameters
}
catch {
- Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Failed to install dotnet runtime '$runtime' from public location."
+ 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)) {
@@ -215,7 +215,7 @@ function InstallDotNet([string] $dotnetRoot,
& $installScript @installParameters
}
catch {
- Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Failed to install dotnet runtime '$runtime' from custom location '$runtimeSourceFeed'."
+ Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Failed to install dotnet runtime '$runtime' from custom location '$runtimeSourceFeed'."
}
}
}
@@ -238,16 +238,16 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements =
}
if (!$vsRequirements) { $vsRequirements = $GlobalJson.tools.vs }
- $vsMinVersionStr = if ($vsRequirements.version) { $vsRequirements.version } else { "15.9" }
+ $vsMinVersionStr = if ($vsRequirements.version) { $vsRequirements.version } else { '15.9' }
$vsMinVersion = [Version]::new($vsMinVersionStr)
# Try msbuild command available in the environment.
if ($env:VSINSTALLDIR -ne $null) {
- $msbuildCmd = Get-Command "msbuild.exe" -ErrorAction SilentlyContinue
+ $msbuildCmd = Get-Command 'msbuild.exe' -ErrorAction SilentlyContinue
if ($msbuildCmd -ne $null) {
# Workaround for https://github.com/dotnet/roslyn/issues/35793
# Due to this issue $msbuildCmd.Version returns 0.0.0.0 for msbuild.exe 16.2+
- $msbuildVersion = [Version]::new((Get-Item $msbuildCmd.Path).VersionInfo.ProductVersion.Split(@('-', '+'))[0])
+ $msbuildVersion = [Version]::new((Get-Item $msbuildCmd.Path).VersionInfo.ProductVersion.Split([char[]]@('-', '+'))[0])
if ($msbuildVersion -ge $vsMinVersion) {
return $global:_MSBuildExe = $msbuildCmd.Path
@@ -267,7 +267,7 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements =
InitializeVisualStudioEnvironmentVariables $vsInstallDir $vsMajorVersion
} else {
- if (Get-Member -InputObject $GlobalJson.tools -Name "xcopy-msbuild") {
+ if (Get-Member -InputObject $GlobalJson.tools -Name 'xcopy-msbuild') {
$xcopyMSBuildVersion = $GlobalJson.tools.'xcopy-msbuild'
$vsMajorVersion = $xcopyMSBuildVersion.Split('.')[0]
} else {
@@ -277,7 +277,7 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements =
$vsInstallDir = InitializeXCopyMSBuild $xcopyMSBuildVersion $install
if ($vsInstallDir -eq $null) {
- throw "Unable to find Visual Studio that has required version and components installed"
+ throw 'Unable to find Visual Studio that has required version and components installed'
}
}
@@ -301,7 +301,7 @@ function InstallXCopyMSBuild([string]$packageVersion) {
}
function InitializeXCopyMSBuild([string]$packageVersion, [bool]$install) {
- $packageName = "RoslynTools.MSBuild"
+ $packageName = 'RoslynTools.MSBuild'
$packageDir = Join-Path $ToolsDir "msbuild\$packageVersion"
$packagePath = Join-Path $packageDir "$packageName.$packageVersion.nupkg"
@@ -317,7 +317,7 @@ function InitializeXCopyMSBuild([string]$packageVersion, [bool]$install) {
Unzip $packagePath $packageDir
}
- return Join-Path $packageDir "tools"
+ return Join-Path $packageDir 'tools'
}
#
@@ -334,32 +334,32 @@ function InitializeXCopyMSBuild([string]$packageVersion, [bool]$install) {
# or $null if no instance meeting the requirements is found on the machine.
#
function LocateVisualStudio([object]$vsRequirements = $null){
- if (Get-Member -InputObject $GlobalJson.tools -Name "vswhere") {
+ if (Get-Member -InputObject $GlobalJson.tools -Name 'vswhere') {
$vswhereVersion = $GlobalJson.tools.vswhere
} else {
- $vswhereVersion = "2.5.2"
+ $vswhereVersion = '2.5.2'
}
$vsWhereDir = Join-Path $ToolsDir "vswhere\$vswhereVersion"
- $vsWhereExe = Join-Path $vsWhereDir "vswhere.exe"
+ $vsWhereExe = Join-Path $vsWhereDir 'vswhere.exe'
if (!(Test-Path $vsWhereExe)) {
Create-Directory $vsWhereDir
- Write-Host "Downloading vswhere"
+ Write-Host 'Downloading vswhere'
Invoke-WebRequest "https://github.com/Microsoft/vswhere/releases/download/$vswhereVersion/vswhere.exe" -OutFile $vswhereExe
}
if (!$vsRequirements) { $vsRequirements = $GlobalJson.tools.vs }
- $args = @("-latest", "-prerelease", "-format", "json", "-requires", "Microsoft.Component.MSBuild", "-products", "*")
+ $args = @('-latest', '-prerelease', '-format', 'json', '-requires', 'Microsoft.Component.MSBuild', '-products', '*')
- if (Get-Member -InputObject $vsRequirements -Name "version") {
- $args += "-version"
+ if (Get-Member -InputObject $vsRequirements -Name 'version') {
+ $args += '-version'
$args += $vsRequirements.version
}
- if (Get-Member -InputObject $vsRequirements -Name "components") {
+ if (Get-Member -InputObject $vsRequirements -Name 'components') {
foreach ($component in $vsRequirements.components) {
- $args += "-requires"
+ $args += '-requires'
$args += $component
}
}
@@ -385,27 +385,27 @@ function InitializeBuildTool() {
# Initialize dotnet cli if listed in 'tools'
$dotnetRoot = $null
- if (Get-Member -InputObject $GlobalJson.tools -Name "dotnet") {
+ if (Get-Member -InputObject $GlobalJson.tools -Name 'dotnet') {
$dotnetRoot = InitializeDotNetCli -install:$restore
}
- if ($msbuildEngine -eq "dotnet") {
+ if ($msbuildEngine -eq 'dotnet') {
if (!$dotnetRoot) {
- Write-PipelineTelemetryError -Category "InitializeToolset" -Message "/global.json must specify 'tools.dotnet'."
+ Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "/global.json must specify 'tools.dotnet'."
ExitWithExitCode 1
}
- $buildTool = @{ Path = Join-Path $dotnetRoot "dotnet.exe"; Command = "msbuild"; Tool = "dotnet"; Framework = "netcoreapp2.1" }
+ $buildTool = @{ Path = Join-Path $dotnetRoot 'dotnet.exe'; Command = 'msbuild'; Tool = 'dotnet'; Framework = 'netcoreapp2.1' }
} elseif ($msbuildEngine -eq "vs") {
try {
$msbuildPath = InitializeVisualStudioMSBuild -install:$restore
} catch {
- Write-PipelineTelemetryError -Category "InitializeToolset" -Message $_
+ Write-PipelineTelemetryError -Category 'InitializeToolset' -Message $_
ExitWithExitCode 1
}
$buildTool = @{ Path = $msbuildPath; Command = ""; Tool = "vs"; Framework = "net472" }
} else {
- Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Unexpected value of -msbuildEngine: '$msbuildEngine'."
+ Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Unexpected value of -msbuildEngine: '$msbuildEngine'."
ExitWithExitCode 1
}
@@ -414,15 +414,15 @@ function InitializeBuildTool() {
function GetDefaultMSBuildEngine() {
# Presence of tools.vs indicates the repo needs to build using VS msbuild on Windows.
- if (Get-Member -InputObject $GlobalJson.tools -Name "vs") {
- return "vs"
+ if (Get-Member -InputObject $GlobalJson.tools -Name 'vs') {
+ return 'vs'
}
- if (Get-Member -InputObject $GlobalJson.tools -Name "dotnet") {
- return "dotnet"
+ if (Get-Member -InputObject $GlobalJson.tools -Name 'dotnet') {
+ return 'dotnet'
}
- Write-PipelineTelemetryError -Category "InitializeToolset" -Message "-msbuildEngine must be specified, or /global.json must specify 'tools.dotnet' or 'tools.vs'."
+ Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "-msbuildEngine must be specified, or /global.json must specify 'tools.dotnet' or 'tools.vs'."
ExitWithExitCode 1
}
@@ -431,9 +431,9 @@ function GetNuGetPackageCachePath() {
# Use local cache on CI to ensure deterministic build,
# use global cache in dev builds to avoid cost of downloading packages.
if ($useGlobalNuGetCache) {
- $env:NUGET_PACKAGES = Join-Path $env:UserProfile ".nuget\packages"
+ $env:NUGET_PACKAGES = Join-Path $env:UserProfile '.nuget\packages'
} else {
- $env:NUGET_PACKAGES = Join-Path $RepoRoot ".packages"
+ $env:NUGET_PACKAGES = Join-Path $RepoRoot '.packages'
}
}
@@ -475,14 +475,14 @@ function InitializeToolset() {
}
if (-not $restore) {
- Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Toolset version $toolsetVersion has not been restored."
+ Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Toolset version $toolsetVersion has not been restored."
ExitWithExitCode 1
}
$buildTool = InitializeBuildTool
- $proj = Join-Path $ToolsetDir "restore.proj"
- $bl = if ($binaryLog) { "/bl:" + (Join-Path $LogDir "ToolsetRestore.binlog") } else { "" }
+ $proj = Join-Path $ToolsetDir 'restore.proj'
+ $bl = if ($binaryLog) { '/bl:' + (Join-Path $LogDir 'ToolsetRestore.binlog') } else { '' }
'' | Set-Content $proj
@@ -504,7 +504,7 @@ function ExitWithExitCode([int] $exitCode) {
}
function Stop-Processes() {
- Write-Host "Killing running build processes..."
+ Write-Host 'Killing running build processes...'
foreach ($processName in $processesToStopOnExit) {
Get-Process -Name $processName -ErrorAction SilentlyContinue | Stop-Process
}
@@ -521,7 +521,7 @@ function MSBuild() {
# Work around issues with Azure Artifacts credential provider
# https://github.com/dotnet/arcade/issues/3932
- if ($ci -and $buildTool.Tool -eq "dotnet") {
+ if ($ci -and $buildTool.Tool -eq 'dotnet') {
dotnet nuget locals http-cache -c
$env:NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS = 20
@@ -532,7 +532,7 @@ function MSBuild() {
$toolsetBuildProject = InitializeToolset
$path = Split-Path -parent $toolsetBuildProject
- $path = Join-Path $path (Join-Path $buildTool.Framework "Microsoft.DotNet.Arcade.Sdk.dll")
+ $path = Join-Path $path (Join-Path $buildTool.Framework 'Microsoft.DotNet.Arcade.Sdk.dll')
$args += "/logger:$path"
}
@@ -547,12 +547,12 @@ function MSBuild() {
function MSBuild-Core() {
if ($ci) {
if (!$binaryLog) {
- Write-PipelineTaskError -Message "Binary log must be enabled in CI build."
+ Write-PipelineTelemetryError -Category 'Build' -Message 'Binary log must be enabled in CI build.'
ExitWithExitCode 1
}
if ($nodeReuse) {
- Write-PipelineTaskError -Message "Node reuse must be disabled in CI build."
+ Write-PipelineTelemetryError -Category 'Build' -Message 'Node reuse must be disabled in CI build.'
ExitWithExitCode 1
}
}
@@ -562,10 +562,10 @@ function MSBuild-Core() {
$cmdArgs = "$($buildTool.Command) /m /nologo /clp:Summary /v:$verbosity /nr:$nodeReuse /p:ContinuousIntegrationBuild=$ci"
if ($warnAsError) {
- $cmdArgs += " /warnaserror /p:TreatWarningsAsErrors=true"
+ $cmdArgs += ' /warnaserror /p:TreatWarningsAsErrors=true'
}
else {
- $cmdArgs += " /p:TreatWarningsAsErrors=false"
+ $cmdArgs += ' /p:TreatWarningsAsErrors=false'
}
foreach ($arg in $args) {
@@ -577,7 +577,7 @@ function MSBuild-Core() {
$exitCode = Exec-Process $buildTool.Path $cmdArgs
if ($exitCode -ne 0) {
- Write-PipelineTaskError -Message "Build failed."
+ Write-PipelineTelemetryError Category 'Build' -Message 'Build failed.'
$buildLog = GetMSBuildBinaryLogCommandLineArgument $args
if ($buildLog -ne $null) {
@@ -592,12 +592,12 @@ function GetMSBuildBinaryLogCommandLineArgument($arguments) {
foreach ($argument in $arguments) {
if ($argument -ne $null) {
$arg = $argument.Trim()
- if ($arg.StartsWith("/bl:", "OrdinalIgnoreCase")) {
- return $arg.Substring("/bl:".Length)
+ if ($arg.StartsWith('/bl:', "OrdinalIgnoreCase")) {
+ return $arg.Substring('/bl:'.Length)
}
- if ($arg.StartsWith("/binaryLogger:", "OrdinalIgnoreCase")) {
- return $arg.Substring("/binaryLogger:".Length)
+ if ($arg.StartsWith('/binaryLogger:', 'OrdinalIgnoreCase')) {
+ return $arg.Substring('/binaryLogger:'.Length)
}
}
}
@@ -607,14 +607,14 @@ function GetMSBuildBinaryLogCommandLineArgument($arguments) {
. $PSScriptRoot\pipeline-logging-functions.ps1
-$RepoRoot = Resolve-Path (Join-Path $PSScriptRoot "..\..")
-$EngRoot = Resolve-Path (Join-Path $PSScriptRoot "..")
-$ArtifactsDir = Join-Path $RepoRoot "artifacts"
-$ToolsetDir = Join-Path $ArtifactsDir "toolset"
-$ToolsDir = Join-Path $RepoRoot ".tools"
-$LogDir = Join-Path (Join-Path $ArtifactsDir "log") $configuration
-$TempDir = Join-Path (Join-Path $ArtifactsDir "tmp") $configuration
-$GlobalJson = Get-Content -Raw -Path (Join-Path $RepoRoot "global.json") | ConvertFrom-Json
+$RepoRoot = Resolve-Path (Join-Path $PSScriptRoot '..\..')
+$EngRoot = Resolve-Path (Join-Path $PSScriptRoot '..')
+$ArtifactsDir = Join-Path $RepoRoot 'artifacts'
+$ToolsetDir = Join-Path $ArtifactsDir 'toolset'
+$ToolsDir = Join-Path $RepoRoot '.tools'
+$LogDir = Join-Path (Join-Path $ArtifactsDir 'log') $configuration
+$TempDir = Join-Path (Join-Path $ArtifactsDir 'tmp') $configuration
+$GlobalJson = Get-Content -Raw -Path (Join-Path $RepoRoot 'global.json') | ConvertFrom-Json
# true if global.json contains a "runtimes" section
$globalJsonHasRuntimes = if ($GlobalJson.tools.PSObject.Properties.Name -Match 'runtimes') { $true } else { $false }
@@ -631,8 +631,14 @@ 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"
+ $configureToolsetScript = Join-Path $EngRoot 'configure-toolset.ps1'
if (Test-Path $configureToolsetScript) {
- . $configureToolsetScript
+ . $configureToolsetScript
+ if ((Test-Path variable:failOnConfigureToolsetError) -And $failOnConfigureToolsetError) {
+ if ((Test-Path variable:LastExitCode) -And ($LastExitCode -ne 0)) {
+ Write-PipelineTelemetryError -Category 'Build' -Message 'configure-toolset.ps1 returned a non-zero exit code'
+ ExitWithExitCode $LastExitCode
+ }
+ }
}
}
diff --git a/eng/common/tools.sh b/eng/common/tools.sh
index 2a18067fbc..6054a3798f 100755
--- a/eng/common/tools.sh
+++ b/eng/common/tools.sh
@@ -4,7 +4,6 @@
# 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
@@ -82,7 +81,7 @@ function ReadGlobalVersion {
local pattern="\"$key\" *: *\"(.*)\""
if [[ ! $line =~ $pattern ]]; then
- Write-PipelineTelemetryError -category 'InitializeToolset' "Error: Cannot find \"$key\" in $global_json_file"
+ Write-PipelineTelemetryError -category 'Build' "Error: Cannot find \"$key\" in $global_json_file"
ExitWithExitCode 1
fi
@@ -153,15 +152,6 @@ function InitializeDotNetCli {
# build steps from using anything other than what we've downloaded.
Write-PipelinePrependPath -path "$dotnet_root"
- # Work around issues with Azure Artifacts credential provider
- # https://github.com/dotnet/arcade/issues/3932
- if [[ "$ci" == true ]]; then
- export NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS=20
- export NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS=20
- Write-PipelineSetVariable -name "NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS" -value "20"
- Write-PipelineSetVariable -name "NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS" -value "20"
- fi
-
Write-PipelineSetVariable -name "DOTNET_MULTILEVEL_LOOKUP" -value "0"
Write-PipelineSetVariable -name "DOTNET_SKIP_FIRST_TIME_EXPERIENCE" -value "1"
@@ -334,7 +324,7 @@ function InitializeToolset {
local toolset_build_proj=`cat "$toolset_location_file"`
if [[ ! -a "$toolset_build_proj" ]]; then
- Write-PipelineTelemetryError -category 'InitializeToolset' "Invalid toolset path: $toolset_build_proj"
+ Write-PipelineTelemetryError -category 'Build' "Invalid toolset path: $toolset_build_proj"
ExitWithExitCode 3
fi
@@ -365,7 +355,7 @@ function MSBuild {
# Work around issues with Azure Artifacts credential provider
# https://github.com/dotnet/arcade/issues/3932
if [[ "$ci" == true ]]; then
- "$_InitializeBuildTool" nuget locals http-cache -c
+ dotnet nuget locals http-cache -c
export NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS=20
export NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS=20
@@ -384,12 +374,12 @@ function MSBuild {
function MSBuild-Core {
if [[ "$ci" == true ]]; then
if [[ "$binary_log" != true ]]; then
- Write-PipelineTaskError "Binary log must be enabled in CI build."
+ Write-PipelineTelemetryError -category 'Build' "Binary log must be enabled in CI build."
ExitWithExitCode 1
fi
if [[ "$node_reuse" == true ]]; then
- Write-PipelineTaskError "Node reuse must be disabled in CI build."
+ Write-PipelineTelemetryError -category 'Build' "Node reuse must be disabled in CI build."
ExitWithExitCode 1
fi
fi
@@ -403,7 +393,7 @@ function MSBuild-Core {
"$_InitializeBuildTool" "$_InitializeBuildToolCommand" /m /nologo /clp:Summary /v:$verbosity /nr:$node_reuse $warnaserror_switch /p:TreatWarningsAsErrors=$warn_as_error /p:ContinuousIntegrationBuild=$ci "$@" || {
local exit_code=$?
- Write-PipelineTaskError "Build failed (exit code '$exit_code')."
+ Write-PipelineTelemetryError -category 'Build' "Build failed (exit code '$exit_code')."
ExitWithExitCode $exit_code
}
}
@@ -446,7 +436,7 @@ 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
+if [ -z "${disable_configure_toolset_import:-}" ]; then
configure_toolset_script="$eng_root/configure-toolset.sh"
if [[ -a "$configure_toolset_script" ]]; then
. "$configure_toolset_script"
diff --git a/fcs/.config/dotnet-tools.json b/fcs/.config/dotnet-tools.json
new file mode 100644
index 0000000000..c3e6f5e472
--- /dev/null
+++ b/fcs/.config/dotnet-tools.json
@@ -0,0 +1,18 @@
+{
+ "version": 1,
+ "isRoot": true,
+ "tools": {
+ "fake-cli": {
+ "version": "5.18.3",
+ "commands": [
+ "fake"
+ ]
+ },
+ "paket": {
+ "version": "5.236.0",
+ "commands": [
+ "paket"
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/fcs/.gitignore b/fcs/.gitignore
index a21a02ee54..ba316d8d5a 100644
--- a/fcs/.gitignore
+++ b/fcs/.gitignore
@@ -1,4 +1,5 @@
.paket/
+build.fsx.lock
FSharp.Compiler.Service.Tests/TestResults/*
FSharp.Compiler.Service.netstandard/illex.fs
FSharp.Compiler.Service.netstandard/ilpars.fs
diff --git a/fcs/.paket/Paket.Restore.targets b/fcs/.paket/Paket.Restore.targets
index e33a731f23..a79555813d 100644
--- a/fcs/.paket/Paket.Restore.targets
+++ b/fcs/.paket/Paket.Restore.targets
@@ -5,6 +5,11 @@
$(MSBuildAllProjects);$(MSBuildThisFileFullPath)
+
+ $(MSBuildVersion)
+ 15.0.0
+ false
+ true
true
$(MSBuildThisFileDirectory)
@@ -22,86 +27,118 @@
$(PaketRootPath)paket.bootstrapper.exe
$(PaketToolsPath)paket.bootstrapper.exe
$([System.IO.Path]::GetDirectoryName("$(PaketBootStrapperExePath)"))\
-
-
-
-
- $(PaketRootPath)paket.exe
- $(PaketToolsPath)paket.exe
- $(PaketToolsPath)paket.exe
- $(_PaketBootStrapperExeDir)paket.exe
- paket.exe
-
-
- $(PaketRootPath)paket
- $(PaketToolsPath)paket
- $(PaketToolsPath)paket
-
-
- $(PaketRootPath)paket.exe
- $(PaketToolsPath)paket.exe
-
-
- $(PaketBootStrapperExeDir)paket.exe
-
-
- paket
-
-
- <_PaketExeExtension>$([System.IO.Path]::GetExtension("$(PaketExePath)"))
- dotnet "$(PaketExePath)"
- $(MonoPath) --runtime=v4.0.30319 "$(PaketExePath)"
- "$(PaketExePath)"
-
-
+
"$(PaketBootStrapperExePath)"
$(MonoPath) --runtime=v4.0.30319 "$(PaketBootStrapperExePath)"
-
+
true
true
True
+
+ $(BaseIntermediateOutputPath.TrimEnd('\').TrimEnd('\/'))
+
+
+
+
+
+
+
+
+
+
+ dotnet paket
+
+
+
+
+
+ $(PaketRootPath)paket.exe
+ $(PaketToolsPath)paket.exe
+ $(PaketToolsPath)paket.exe
+ $(_PaketBootStrapperExeDir)paket.exe
+ paket.exe
+
+
+ $(PaketRootPath)paket
+ $(PaketToolsPath)paket
+ $(PaketToolsPath)paket
+
+
+ $(PaketRootPath)paket.exe
+ $(PaketToolsPath)paket.exe
+
+
+ $(PaketBootStrapperExeDir)paket.exe
+
+
+ paket
+
+ <_PaketExeExtension>$([System.IO.Path]::GetExtension("$(PaketExePath)"))
+ dotnet "$(PaketExePath)"
+ $(MonoPath) --runtime=v4.0.30319 "$(PaketExePath)"
+ "$(PaketExePath)"
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
-
+
true
$(NoWarn);NU1603;NU1604;NU1605;NU1608
+ false
+ true
-
-
- /usr/bin/shasum "$(PaketRestoreCacheFile)" | /usr/bin/awk '{ print $1 }'
- /usr/bin/shasum "$(PaketLockFilePath)" | /usr/bin/awk '{ print $1 }'
+
+
+
+
+
+
+ $([System.IO.File]::ReadAllText('$(PaketRestoreCacheFile)'))
+
+
+
+
+
+
+ $([System.Text.RegularExpressions.Regex]::Split(`%(Identity)`, `": "`)[0].Replace(`"`, ``).Replace(` `, ``))
+ $([System.Text.RegularExpressions.Regex]::Split(`%(Identity)`, `": "`)[1].Replace(`"`, ``).Replace(` `, ``))
+
+
+
+
+ %(PaketRestoreCachedKeyValue.Value)
+ %(PaketRestoreCachedKeyValue.Value)
-
-
-
-
-
-
-
-
-
-
-
-
-
- $([System.IO.File]::ReadAllText('$(PaketRestoreCacheFile)'))
- $([System.IO.File]::ReadAllText('$(PaketLockFilePath)'))
+
+
true
- false
+ false
true
@@ -114,19 +151,22 @@
+
+
-
-
+
+
+
-
+
-
+
- $(MSBuildProjectDirectory)\obj\$(MSBuildProjectFile).paket.references.cached
+ $(PaketIntermediateOutputPath)\$(MSBuildProjectFile).paket.references.cached
$(MSBuildProjectFullPath).paket.references
@@ -161,8 +201,9 @@
-
-
+
+
+
@@ -182,7 +223,7 @@
$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[0])
$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[1])
$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[4])
- $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[5])
+ $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[5])
%(PaketReferencesFileLinesInfo.PackageVersion)
@@ -195,7 +236,7 @@
- $(MSBuildProjectDirectory)/obj/$(MSBuildProjectFile).paket.clitools
+ $(PaketIntermediateOutputPath)/$(MSBuildProjectFile).paket.clitools
@@ -214,23 +255,20 @@
-
+
false
- $(MSBuildVersion)
- 15.8.0
-
-
+
- <_NuspecFilesNewLocation Include="$(BaseIntermediateOutputPath)$(Configuration)\*.nuspec"/>
+ <_NuspecFilesNewLocation Include="$(PaketIntermediateOutputPath)\$(Configuration)\*.nuspec"/>
@@ -246,15 +284,17 @@
true
false
true
- $(BaseIntermediateOutputPath)$(Configuration)
- $(BaseIntermediateOutputPath)
+ $(PaketIntermediateOutputPath)\$(Configuration)
+ $(PaketIntermediateOutputPath)
- <_NuspecFiles Include="$(AdjustedNuspecOutputPath)\*.nuspec"/>
+ <_NuspecFiles Include="$(AdjustedNuspecOutputPath)\*.$(PackageVersion.Split(`+`)[0]).nuspec"/>
-
+
+
+
@@ -280,7 +320,7 @@
DevelopmentDependency="$(DevelopmentDependency)"
BuildOutputInPackage="@(_BuildOutputInPackage)"
TargetPathsToSymbols="@(_TargetPathsToSymbols)"
- SymbolPackageFormat="symbols.nupkg"
+ SymbolPackageFormat="$(SymbolPackageFormat)"
TargetFrameworks="@(_TargetFrameworks)"
AssemblyName="$(AssemblyName)"
PackageOutputPath="$(PackageOutputAbsolutePath)"
@@ -327,7 +367,7 @@
DevelopmentDependency="$(DevelopmentDependency)"
BuildOutputInPackage="@(_BuildOutputInPackage)"
TargetPathsToSymbols="@(_TargetPathsToSymbols)"
- SymbolPackageFormat="symbols.nupkg"
+ SymbolPackageFormat="$(SymbolPackageFormat)"
TargetFrameworks="@(_TargetFrameworks)"
AssemblyName="$(AssemblyName)"
PackageOutputPath="$(PackageOutputAbsolutePath)"
diff --git a/fcs/RELEASE_NOTES.md b/fcs/RELEASE_NOTES.md
index 44a9e271df..c9cc93b08f 100644
--- a/fcs/RELEASE_NOTES.md
+++ b/fcs/RELEASE_NOTES.md
@@ -1,3 +1,14 @@
+#### 33.0.1
+
+Integrate dotnet/fsharp from 4f5f08320 to 7b25d7f82. Notable changes include:
+
+* Addition of the FsharpUnionCase.HasFields property
+* FCS builds entirely on .Net Core now
+* Better debug information for ranges
+* Support for Literal values in signature files
+* Using memory-mapped files cross-platform to read IL.
+
+
#### 33.0.0
Integrate dotnet/fsharp from 48f932cf8 to 085985140. Notable changes include:
diff --git a/fcs/build.cmd b/fcs/build.cmd
index e556a4bd7d..dc47a88f8c 100644
--- a/fcs/build.cmd
+++ b/fcs/build.cmd
@@ -3,13 +3,14 @@
setlocal
pushd %~dp0%
+dotnet tool restore
+
if errorlevel 1 (
endlocal
exit /b %errorlevel%
)
-powershell -noprofile -executionPolicy RemoteSigned -file "%~dp0\download-paket.ps1"
-.paket\paket.exe restore
+dotnet paket restore
if errorlevel 1 (
endlocal
exit /b %errorlevel%
@@ -18,7 +19,8 @@ if errorlevel 1 (
:: don't care if this fails
dotnet build-server shutdown >NUL 2>&1
-packages\FAKE\tools\FAKE.exe build.fsx %*
+dotnet fake build -t %*
+
if errorlevel 1 (
endlocal
exit /b %errorlevel%
diff --git a/fcs/build.fsx b/fcs/build.fsx
index 0a3821c708..6b315182dd 100644
--- a/fcs/build.fsx
+++ b/fcs/build.fsx
@@ -1,58 +1,34 @@
// --------------------------------------------------------------------------------------
// FAKE build script
// --------------------------------------------------------------------------------------
+#r "paket: groupref Main //"
+#load "./.fake/build.fsx/intellisense.fsx"
-#I "packages/FAKE/tools"
-#r "packages/FAKE/tools/FakeLib.dll"
open System
open System.IO
-open Fake
-open Fake.AppVeyor
-open Fake.ReleaseNotesHelper
-
-#if MONO
-// prevent incorrect output encoding (e.g. https://github.com/fsharp/FAKE/issues/1196)
-System.Console.OutputEncoding <- System.Text.Encoding.UTF8
-CleanDir (__SOURCE_DIRECTORY__ + "/../artifacts/TestResults")
-File.WriteAllText(__SOURCE_DIRECTORY__ + "/../artifacts/TestResults/notestsyet.txt","No tests yet")
-let isMono = true
-#else
-let isMono = false
-#endif
-
-
-let dotnetExePath =
+open Fake.BuildServer
+open Fake.Core
+open Fake.DotNet
+open Fake.IO
+
+BuildServer.install [ AppVeyor.Installer ]
+// --------------------------------------------------------------------------------------
+// Utilities
+// --------------------------------------------------------------------------------------
+
+let withDotnetExe =
// Build.cmd normally downloads a dotnet cli to: \artifacts\toolset\dotnet
// check if there is one there to avoid downloading an additional one here
let pathToCli = Path.Combine(__SOURCE_DIRECTORY__, @"..\artifacts\toolset\dotnet\dotnet.exe")
if File.Exists(pathToCli) then
- pathToCli
+ (fun opts -> { opts with DotNet.Options.DotNetCliPath = pathToCli })
else
- DotNetCli.InstallDotNetSDK "3.0.100"
-
-let runDotnet workingDir args =
- let result =
- ExecProcess (fun info ->
- info.FileName <- dotnetExePath
- info.WorkingDirectory <- workingDir
- info.Arguments <- args) TimeSpan.MaxValue
-
- if result <> 0 then failwithf "dotnet %s failed" args
-
-let assertExitCodeZero x = if x = 0 then () else failwithf "Command failed with exit code %i" x
-
-let runCmdIn workDir (exe:string) = Printf.ksprintf (fun (args:string) ->
-#if MONO
- let exe = exe.Replace("\\","/")
- let args = args.Replace("\\","/")
- printfn "[%s] mono %s %s" workDir exe args
- Shell.Exec("mono", sprintf "%s %s" exe args, workDir)
-#else
- printfn "[%s] %s %s" workDir exe args
- Shell.Exec(exe, args, workDir)
-#endif
- |> assertExitCodeZero
-)
+ DotNet.install (fun cliOpts -> { cliOpts with Version = DotNet.CliVersion.GlobalJson })
+
+let runDotnet workingDir command args =
+ let result = DotNet.exec (DotNet.Options.withWorkingDirectory workingDir >> withDotnetExe) command args
+
+ if result.ExitCode <> 0 then failwithf "dotnet %s failed with errors: %s" args (result.Errors |> String.concat "\n")
// --------------------------------------------------------------------------------------
// The rest of the code is standard F# build script
@@ -61,77 +37,68 @@ let runCmdIn workDir (exe:string) = Printf.ksprintf (fun (args:string) ->
let releaseDir = Path.Combine(__SOURCE_DIRECTORY__, "../artifacts/bin/fcs/Release")
// Read release notes & version info from RELEASE_NOTES.md
-let release = LoadReleaseNotes (__SOURCE_DIRECTORY__ + "/RELEASE_NOTES.md")
-let isAppVeyorBuild = buildServer = BuildServer.AppVeyor
-let isJenkinsBuild = buildServer = BuildServer.Jenkins
+let release = ReleaseNotes.load (__SOURCE_DIRECTORY__ + "/RELEASE_NOTES.md")
+let isAppVeyorBuild = AppVeyor.detect()
let isVersionTag (tag: string) = Version.TryParse tag |> fst
-let hasRepoVersionTag = isAppVeyorBuild && AppVeyorEnvironment.RepoTag && isVersionTag AppVeyorEnvironment.RepoTagName
-let assemblyVersion = if hasRepoVersionTag then AppVeyorEnvironment.RepoTagName else release.NugetVersion
+let hasRepoVersionTag = isAppVeyorBuild && AppVeyor.Environment.RepoTag && isVersionTag AppVeyor.Environment.RepoTagName
+let assemblyVersion = if hasRepoVersionTag then AppVeyor.Environment.RepoTagName else release.NugetVersion
let buildVersion =
if hasRepoVersionTag then assemblyVersion
- else if isAppVeyorBuild then sprintf "%s-b%s" assemblyVersion AppVeyorEnvironment.BuildNumber
+ else if isAppVeyorBuild then sprintf "%s-b%s" assemblyVersion AppVeyor.Environment.BuildNumber
else assemblyVersion
-Target "Clean" (fun _ ->
- CleanDir releaseDir
+Target.create "Clean" (fun _ ->
+ Shell.cleanDir releaseDir
)
-Target "Restore" (fun _ ->
+Target.create "Restore" (fun _ ->
// We assume a paket restore has already been run
- runDotnet __SOURCE_DIRECTORY__ "restore ../src/buildtools/buildtools.proj -v n"
- runDotnet __SOURCE_DIRECTORY__ "restore FSharp.Compiler.Service.sln -v n"
+ runDotnet __SOURCE_DIRECTORY__ "restore" "../src/buildtools/buildtools.proj -v n"
+ runDotnet __SOURCE_DIRECTORY__ "restore" "FSharp.Compiler.Service.sln -v n"
)
-Target "BuildVersion" (fun _ ->
+Target.create "BuildVersion" (fun _ ->
Shell.Exec("appveyor", sprintf "UpdateBuild -Version \"%s\"" buildVersion) |> ignore
)
-Target "Build" (fun _ ->
- runDotnet __SOURCE_DIRECTORY__ "build ../src/buildtools/buildtools.proj -v n -c Proto"
+Target.create "Build" (fun _ ->
+ runDotnet __SOURCE_DIRECTORY__ "build" "../src/buildtools/buildtools.proj -v n -c Proto"
let fslexPath = __SOURCE_DIRECTORY__ + "/../artifacts/bin/fslex/Proto/netcoreapp2.1/fslex.dll"
let fsyaccPath = __SOURCE_DIRECTORY__ + "/../artifacts/bin/fsyacc/Proto/netcoreapp2.1/fsyacc.dll"
- runDotnet __SOURCE_DIRECTORY__ (sprintf "build FSharp.Compiler.Service.sln -v n -c Release /p:FsLexPath=%s /p:FsYaccPath=%s /p:VersionPrefix=%s" fslexPath fsyaccPath assemblyVersion)
+ runDotnet __SOURCE_DIRECTORY__ "build" (sprintf "FSharp.Compiler.Service.sln -v n -c Release /p:FsLexPath=%s /p:FsYaccPath=%s" fslexPath fsyaccPath)
)
-Target "Test" (fun _ ->
+Target.create "Test" (fun _ ->
// This project file is used for the netcoreapp2.0 tests to work out reference sets
- runDotnet __SOURCE_DIRECTORY__ "build ../tests/projects/Sample_NETCoreSDK_FSharp_Library_netstandard2_0/Sample_NETCoreSDK_FSharp_Library_netstandard2_0.fsproj -v n /restore /p:DisableCompilerRedirection=true"
+ runDotnet __SOURCE_DIRECTORY__ "build" "../tests/projects/Sample_NETCoreSDK_FSharp_Library_netstandard2_0/Sample_NETCoreSDK_FSharp_Library_netstandard2_0.fsproj -v n /restore /p:DisableCompilerRedirection=true"
// Now run the tests
let logFilePath = Path.Combine(__SOURCE_DIRECTORY__, "..", "artifacts", "TestResults", "Release", "FSharp.Compiler.Service.Test.xml")
- runDotnet __SOURCE_DIRECTORY__ (sprintf "test FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj --no-restore --no-build -v n -c Release --test-adapter-path . --logger \"nunit;LogFilePath=%s\"" logFilePath)
+ runDotnet __SOURCE_DIRECTORY__ "test" (sprintf "FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj --no-restore --no-build -v n -c Release --test-adapter-path . --logger \"nunit;LogFilePath=%s\"" logFilePath)
)
-// escape a string's content so that it can be passed on the command line
-let escapeString (s: string) =
- let replaced = s.Replace("\"", "\\\"")
- sprintf "\"%s\"" replaced
-
-Target "NuGet" (fun _ ->
- let props =
- [ "VersionPrefix", release.NugetVersion
- "PackageReleaseNotes", release.Notes |> String.concat "\n"]
- |> Seq.map (fun (prop, value) -> sprintf "-p:%s=%s" prop (escapeString value))
- |> String.concat " "
-
- runDotnet __SOURCE_DIRECTORY__ (sprintf "pack FSharp.Compiler.Service.sln --no-build -v n -c Release %s" props)
+Target.create "NuGet" (fun _ ->
+ DotNet.pack (fun packOpts ->
+ { packOpts with
+ Configuration = DotNet.BuildConfiguration.Release
+ Common = packOpts.Common |> withDotnetExe |> DotNet.Options.withVerbosity (Some DotNet.Verbosity.Normal)
+ MSBuildParams = { packOpts.MSBuildParams with
+ Properties = packOpts.MSBuildParams.Properties @ [ "Version", assemblyVersion; "PackageReleaseNotes", release.Notes |> String.concat "\n" ] }
+ }) "FSharp.Compiler.Service.sln"
)
-Target "GenerateDocsEn" (fun _ ->
- executeFSIWithArgs "docsrc/tools" "generate.fsx" [] [] |> ignore
+Target.create "GenerateDocsEn" (fun _ ->
+ runDotnet "docsrc/tools" "fake" "run generate.fsx"
)
-Target "GenerateDocsJa" (fun _ ->
- executeFSIWithArgs "docsrc/tools" "generate.ja.fsx" [] [] |> ignore
+Target.create "GenerateDocsJa" (fun _ ->
+ runDotnet "docsrc/tools" "fake" "run generate.ja.fsx"
)
-Target "PublishNuGet" (fun _ ->
- Paket.Push (fun p ->
- let apikey =
- match getBuildParam "nuget-apikey" with
- | s when not (String.IsNullOrWhiteSpace s) -> s
- | _ -> getUserInput "Nuget API Key: "
+Target.create "PublishNuGet" (fun _ ->
+ let apikey = Environment.environVarOrDefault "nuget-apikey" (UserInput.getUserPassword "Nuget API Key: ")
+ Paket.push (fun p ->
{ p with
ApiKey = apikey
WorkingDir = releaseDir })
@@ -140,10 +107,12 @@ Target "PublishNuGet" (fun _ ->
// --------------------------------------------------------------------------------------
// Run all targets by default. Invoke 'build ' to override
-Target "Start" DoNothing
-Target "Release" DoNothing
-Target "GenerateDocs" DoNothing
-Target "TestAndNuGet" DoNothing
+Target.create "Start" ignore
+Target.create "Release" ignore
+Target.create "GenerateDocs" ignore
+Target.create "TestAndNuGet" ignore
+
+open Fake.Core.TargetOperators
"Start"
=?> ("BuildVersion", isAppVeyorBuild)
@@ -161,21 +130,21 @@ Target "TestAndNuGet" DoNothing
"NuGet"
==> "TestAndNuGet"
-
+
"Build"
==> "NuGet"
==> "PublishNuGet"
==> "Release"
"Build"
- ==> "GenerateDocsEn"
+ // ==> "GenerateDocsEn"
==> "GenerateDocs"
"Build"
- ==> "GenerateDocsJa"
+ // ==> "GenerateDocsJa"
==> "GenerateDocs"
"GenerateDocs"
==> "Release"
-RunTargetOrDefault "Build"
+Target.runOrDefaultWithArguments "Build"
diff --git a/fcs/build.sh b/fcs/build.sh
index 424d78d477..4c4819aca7 100755
--- a/fcs/build.sh
+++ b/fcs/build.sh
@@ -1,24 +1,17 @@
#!/bin/bash
-if test "$OS" = "Windows_NT"
-then
- # use .Net
- cmd fcs/build.cmd $@
-else
- if [[ "$PWD" != *fcs ]]; then
- cd fcs
- fi
- # use mono
- if [[ ! -e ~/.config/.mono/certs ]]; then
- mozroots --import --sync --quiet
- fi
+# bail out as soon as any single command errors
+set -e
- ./download-paket.sh
- mono .paket/paket.exe restore
- exit_code=$?
- if [ $exit_code -ne 0 ]; then
- exit $exit_code
- fi
-
- mono packages/FAKE/tools/FAKE.exe $@ --fsiargs -d:MONO build.fsx
-fi
+start_pwd=$PWD
+
+# dotnet tools look in certain paths by default that Just Work when we're in the fcs dir,
+# so let's force that here:
+cd $(dirname ${BASH_SOURCE[0]})
+
+dotnet tool restore
+dotnet paket restore
+dotnet fake build -t $@
+
+# but we'll be nice and go back to the start dir at the end
+cd $start_pwd
\ No newline at end of file
diff --git a/fcs/cibuild.sh b/fcs/cibuild.sh
deleted file mode 100755
index ddc49d8ff3..0000000000
--- a/fcs/cibuild.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/bash
-
-# note: expects to run from top directory
-./mono/latest-mono-stable.sh
-./fcs/build.sh NuGet
diff --git a/fcs/docsrc/tools/generate.fsx b/fcs/docsrc/tools/generate.fsx
index c5f7589b23..09fa803a2f 100644
--- a/fcs/docsrc/tools/generate.fsx
+++ b/fcs/docsrc/tools/generate.fsx
@@ -3,6 +3,9 @@
// (the generated documentation is stored in the 'docs' directory)
// --------------------------------------------------------------------------------------
+#r "paket: groupref generate //"
+#load "./.fake/generate.fsx/intellisense.fsx"
+
// Binaries that have XML documentation (in a corresponding generated XML file)
let referenceBinaries = [ "FSharp.Compiler.Service.dll" ]
// Web site location for the generated documentation
@@ -20,15 +23,12 @@ let info =
// For typical project, no changes are needed below
// --------------------------------------------------------------------------------------
-#load "../../packages/FSharp.Formatting/FSharp.Formatting.fsx"
-#I "../../packages/FAKE/tools"
-#r "../../packages/FAKE/tools/FakeLib.dll"
open Fake
open System.IO
-open Fake.FileHelper
+open Fake.IO.FileSystemOperators
+open Fake.IO
+open Fake.Core
open FSharp.Literate
-open FSharp.MetadataFormat
-open FSharp.Formatting.Razor
let root = "."
@@ -49,17 +49,18 @@ let layoutRoots =
// Copy static files and CSS + JS from F# Formatting
let copyFiles () =
- CopyRecursive files output true |> Log "Copying file: "
- ensureDirectory (output @@ "content")
- CopyRecursive (formatting @@ "styles") (output @@ "content") true
- |> Log "Copying styles and scripts: "
+ Shell.copyRecursive files output true
+ |> Trace.tracefn "Copying file: %A"
+ Directory.ensure (output @@ "content")
+ Shell.copyRecursive (formatting @@ "styles") (output @@ "content") true
+ |> Trace.tracefn "Copying styles and scripts: %A"
let clr = System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory()
let fsfmt = __SOURCE_DIRECTORY__ @@ ".." @@ ".." @@ @"packages" @@ "FSharp.Formatting" @@ "lib" @@ "net40"
// Build API reference from XML comments
let buildReference () =
- CleanDir (output @@ "reference")
+ Shell.cleanDir (output @@ "reference")
for lib in referenceBinaries do
RazorMetadataFormat.Generate
( bin @@ lib, output @@ "reference", layoutRoots,
diff --git a/fcs/download-paket.ps1 b/fcs/download-paket.ps1
deleted file mode 100644
index 4541168012..0000000000
--- a/fcs/download-paket.ps1
+++ /dev/null
@@ -1,15 +0,0 @@
-$paketurl="https://github.com/fsprojects/Paket/releases/download/5.215.0/paket.exe"
-$paketdir = Join-Path $PSScriptRoot ".paket"
-$paketpath = Join-Path $paketdir "paket.exe"
-
-# Enable TLS 1.2 and TLS 1.1 as Security Protocols
-[Net.ServicePointManager]::SecurityProtocol = `
- [Net.SecurityProtocolType]::Tls12,
- [Net.SecurityProtocolType]::Tls11;
-
-if (-not (Test-Path "$paketpath")) {
- if (-not (Test-Path "$paketdir")) {
- mkdir "$paketdir"
- }
- Invoke-WebRequest -Uri $paketurl -OutFile "$paketpath"
-}
diff --git a/fcs/download-paket.sh b/fcs/download-paket.sh
deleted file mode 100755
index 2825ac4d5a..0000000000
--- a/fcs/download-paket.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/env bash
-
-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 )"
-
-paketurl=https://github.com/fsprojects/Paket/releases/download/5.215.0/paket.exe
-paketdir=$scriptroot/.paket
-paketpath=$paketdir/paket.exe
-if [ ! -e "$paketpath" ]; then
- if [ ! -e "$paketdir" ]; then
- mkdir "$paketdir"
- fi
- curl -o "$paketpath" -L $paketurl
-fi
diff --git a/fcs/global.json b/fcs/global.json
new file mode 100644
index 0000000000..2223a05e31
--- /dev/null
+++ b/fcs/global.json
@@ -0,0 +1,5 @@
+{
+ "sdk": {
+ "version": "3.0.100"
+ }
+}
\ No newline at end of file
diff --git a/fcs/paket.dependencies b/fcs/paket.dependencies
index d23e0010e7..c3d2f47304 100644
--- a/fcs/paket.dependencies
+++ b/fcs/paket.dependencies
@@ -1,6 +1,29 @@
-framework: net461
+source https://api.nuget.org/v3/index.json
-source https://www.nuget.org/api/v2/
+storage: none
+framework: netstandard2.0
-nuget FAKE 5.8.4
-nuget FSharp.Formatting
+nuget FSharp.Core ~> 4.7
+nuget Fake.BuildServer.AppVeyor
+nuget Fake.Core
+nuget Fake.Core.Environment
+nuget Fake.Core.Process
+nuget Fake.Core.ReleaseNotes
+nuget Fake.Core.Target
+nuget Fake.Core.UserInput
+nuget Fake.DotNet.Cli
+nuget Fake.DotNet.Fsi
+nuget Fake.DotNet.Paket
+
+group generate
+
+source https://api.nuget.org/v3/index.json
+
+storage: none
+framework: netstandard2.0
+
+nuget FSharp.Core
+nuget Fake.Core
+nuget Fake.IO.FileSystem
+nuget Fake.Core.Trace
+nuget FSharp.Literate
diff --git a/fcs/paket.lock b/fcs/paket.lock
index 85f5ff5efe..13fe5c84cc 100644
--- a/fcs/paket.lock
+++ b/fcs/paket.lock
@@ -1,19 +1,1089 @@
-RESTRICTION: == net461
+STORAGE: NONE
+RESTRICTION: == netstandard2.0
NUGET
- remote: https://www.nuget.org/api/v2
- FAKE (5.8.4)
+ remote: https://api.nuget.org/v3/index.json
+ BlackFox.VsWhere (1.0)
+ FSharp.Core (>= 4.2.3)
+ Fake.BuildServer.AppVeyor (5.18.3)
+ Fake.Core.Environment (>= 5.18.3)
+ Fake.Core.Process (>= 5.18.3)
+ Fake.Core.String (>= 5.18.3)
+ Fake.Core.Trace (>= 5.18.3)
+ Fake.IO.FileSystem (>= 5.18.3)
+ Fake.Net.Http (>= 5.18.3)
+ FSharp.Core (>= 4.7)
+ System.Diagnostics.FileVersionInfo (>= 4.3)
+ System.Diagnostics.Process (>= 4.3)
+ System.IO.FileSystem.Watcher (>= 4.3)
+ System.Net.Http (>= 4.3.4)
+ System.Xml.ReaderWriter (>= 4.3.1)
+ System.Xml.XDocument (>= 4.3)
+ System.Xml.XmlDocument (>= 4.3)
+ System.Xml.XPath (>= 4.3)
+ System.Xml.XPath.XDocument (>= 4.3)
+ System.Xml.XPath.XmlDocument (>= 4.3)
+ Fake.Core (5.16)
+ Fake.Core.CommandLineParsing (5.18.3)
+ FParsec (>= 1.0.3)
+ FSharp.Core (>= 4.7)
+ Fake.Core.Context (5.18.3)
+ FSharp.Core (>= 4.7)
+ Fake.Core.Environment (5.18.3)
+ FSharp.Core (>= 4.7)
+ Fake.Core.FakeVar (5.18.3)
+ Fake.Core.Context (>= 5.18.3)
+ FSharp.Core (>= 4.7)
+ Fake.Core.Process (5.18.3)
+ Fake.Core.Environment (>= 5.18.3)
+ Fake.Core.FakeVar (>= 5.18.3)
+ Fake.Core.String (>= 5.18.3)
+ Fake.Core.Trace (>= 5.18.3)
+ Fake.IO.FileSystem (>= 5.18.3)
+ FSharp.Core (>= 4.7)
+ System.Diagnostics.Process (>= 4.3)
+ Fake.Core.ReleaseNotes (5.18.3)
+ Fake.Core.SemVer (>= 5.18.3)
+ Fake.Core.String (>= 5.18.3)
+ FSharp.Core (>= 4.7)
+ Fake.Core.SemVer (5.18.3)
+ FSharp.Core (>= 4.7)
+ System.Runtime.Numerics (>= 4.3)
+ Fake.Core.String (5.18.3)
+ FSharp.Core (>= 4.7)
+ Fake.Core.Target (5.18.3)
+ Fake.Core.CommandLineParsing (>= 5.18.3)
+ Fake.Core.Context (>= 5.18.3)
+ Fake.Core.Environment (>= 5.18.3)
+ Fake.Core.FakeVar (>= 5.18.3)
+ Fake.Core.Process (>= 5.18.3)
+ Fake.Core.String (>= 5.18.3)
+ Fake.Core.Trace (>= 5.18.3)
+ FSharp.Control.Reactive (>= 4.2)
+ FSharp.Core (>= 4.7)
+ System.Reactive.Compatibility (>= 4.2)
+ Fake.Core.Tasks (5.18.3)
+ Fake.Core.Trace (>= 5.18.3)
+ FSharp.Core (>= 4.7)
+ Fake.Core.Trace (5.18.3)
+ Fake.Core.Environment (>= 5.18.3)
+ Fake.Core.FakeVar (>= 5.18.3)
+ FSharp.Core (>= 4.7)
+ Fake.Core.UserInput (5.18.3)
+ FSharp.Core (>= 4.7)
+ Fake.Core.Xml (5.18.3)
+ Fake.Core.String (>= 5.18.3)
+ FSharp.Core (>= 4.7)
+ System.Xml.ReaderWriter (>= 4.3.1)
+ System.Xml.XDocument (>= 4.3)
+ System.Xml.XPath (>= 4.3)
+ System.Xml.XPath.XDocument (>= 4.3)
+ System.Xml.XPath.XmlDocument (>= 4.3)
+ Fake.DotNet.Cli (5.18.3)
+ Fake.Core.Environment (>= 5.18.3)
+ Fake.Core.Process (>= 5.18.3)
+ Fake.Core.String (>= 5.18.3)
+ Fake.Core.Trace (>= 5.18.3)
+ Fake.DotNet.MSBuild (>= 5.18.3)
+ Fake.DotNet.NuGet (>= 5.18.3)
+ Fake.IO.FileSystem (>= 5.18.3)
+ FSharp.Core (>= 4.7)
+ Mono.Posix.NETStandard (>= 1.0)
+ Newtonsoft.Json (>= 12.0.2)
+ Fake.DotNet.Fsi (5.18.3)
+ Fake.Core.Environment (>= 5.18.3)
+ Fake.Core.Process (>= 5.18.3)
+ Fake.Core.String (>= 5.18.3)
+ Fake.Core.Trace (>= 5.18.3)
+ Fake.DotNet.MSBuild (>= 5.18.3)
+ Fake.IO.FileSystem (>= 5.18.3)
+ Fake.Tools.Git (>= 5.18.3)
+ FSharp.Compiler.Service (>= 32.0)
+ FSharp.Core (>= 4.7)
+ Fake.DotNet.MSBuild (5.18.3)
+ BlackFox.VsWhere (>= 1.0)
+ Fake.Core.Environment (>= 5.18.3)
+ Fake.Core.Process (>= 5.18.3)
+ Fake.Core.String (>= 5.18.3)
+ Fake.Core.Trace (>= 5.18.3)
+ Fake.IO.FileSystem (>= 5.18.3)
+ FSharp.Core (>= 4.7)
+ MSBuild.StructuredLogger (>= 2.0.110)
+ Fake.DotNet.NuGet (5.18.3)
+ Fake.Core.Environment (>= 5.18.3)
+ Fake.Core.Process (>= 5.18.3)
+ Fake.Core.SemVer (>= 5.18.3)
+ Fake.Core.String (>= 5.18.3)
+ Fake.Core.Tasks (>= 5.18.3)
+ Fake.Core.Trace (>= 5.18.3)
+ Fake.Core.Xml (>= 5.18.3)
+ Fake.IO.FileSystem (>= 5.18.3)
+ Fake.Net.Http (>= 5.18.3)
+ FSharp.Core (>= 4.7)
+ Newtonsoft.Json (>= 12.0.2)
+ NuGet.Protocol (>= 4.9.4)
+ System.Net.Http (>= 4.3.4)
+ Fake.DotNet.Paket (5.18.3)
+ Fake.Core.Process (>= 5.18.3)
+ Fake.Core.String (>= 5.18.3)
+ Fake.Core.Trace (>= 5.18.3)
+ Fake.DotNet.Cli (>= 5.18.3)
+ Fake.IO.FileSystem (>= 5.18.3)
+ FSharp.Core (>= 4.7)
+ Fake.IO.FileSystem (5.18.3)
+ Fake.Core.String (>= 5.18.3)
+ FSharp.Core (>= 4.7)
+ System.Diagnostics.FileVersionInfo (>= 4.3)
+ System.IO.FileSystem.Watcher (>= 4.3)
+ Fake.Net.Http (5.18.3)
+ Fake.Core.Trace (>= 5.18.3)
+ FSharp.Core (>= 4.7)
+ System.Net.Http (>= 4.3.4)
+ Fake.Tools.Git (5.18.3)
+ Fake.Core.Environment (>= 5.18.3)
+ Fake.Core.Process (>= 5.18.3)
+ Fake.Core.SemVer (>= 5.18.3)
+ Fake.Core.String (>= 5.18.3)
+ Fake.Core.Trace (>= 5.18.3)
+ Fake.IO.FileSystem (>= 5.18.3)
+ FSharp.Core (>= 4.7)
+ FParsec (1.0.3)
+ FSharp.Core (>= 4.2.3)
+ NETStandard.Library (>= 1.6.1)
+ FSharp.Compiler.Service (33.0)
+ FSharp.Core (>= 4.6.2)
+ System.Collections.Immutable (>= 1.5)
+ System.Diagnostics.Process (>= 4.1)
+ System.Diagnostics.TraceSource (>= 4.0)
+ System.Reflection.Emit (>= 4.3)
+ System.Reflection.Metadata (>= 1.6)
+ System.Reflection.TypeExtensions (>= 4.3)
+ System.Runtime.Loader (>= 4.0)
+ System.Security.Cryptography.Algorithms (>= 4.3)
+ FSharp.Control.Reactive (4.2)
+ FSharp.Core (>= 4.2.3)
+ System.Reactive (>= 4.0)
+ FSharp.Core (4.7)
+ Microsoft.Build (16.3)
+ Microsoft.Build.Framework (16.3)
+ System.Runtime.Serialization.Primitives (>= 4.1.1)
+ System.Threading.Thread (>= 4.0)
+ Microsoft.Build.Tasks.Core (16.3)
+ Microsoft.Build.Framework (>= 16.3)
+ Microsoft.Build.Utilities.Core (>= 16.3)
+ Microsoft.Win32.Registry (>= 4.3)
+ System.CodeDom (>= 4.4)
+ System.Collections.Immutable (>= 1.5)
+ System.Linq.Parallel (>= 4.0.1)
+ System.Net.Http (>= 4.3.4)
+ System.Reflection.Metadata (>= 1.6)
+ System.Reflection.TypeExtensions (>= 4.1)
+ System.Resources.Extensions (>= 4.6)
+ System.Resources.Writer (>= 4.0)
+ System.Threading.Tasks.Dataflow (>= 4.9)
+ Microsoft.Build.Utilities.Core (16.3)
+ Microsoft.Build.Framework (>= 16.3)
+ Microsoft.Win32.Registry (>= 4.3)
+ System.Collections.Immutable (>= 1.5)
+ System.Text.Encoding.CodePages (>= 4.0.1)
+ Microsoft.NETCore.Platforms (3.0)
+ Microsoft.NETCore.Targets (3.0)
+ Microsoft.Win32.Primitives (4.3)
+ Microsoft.NETCore.Platforms (>= 1.1)
+ Microsoft.NETCore.Targets (>= 1.1)
+ System.Runtime (>= 4.3)
+ Microsoft.Win32.Registry (4.6)
+ System.Buffers (>= 4.5)
+ System.Memory (>= 4.5.3)
+ System.Security.AccessControl (>= 4.6)
+ System.Security.Principal.Windows (>= 4.6)
+ Mono.Posix.NETStandard (1.0)
+ MSBuild.StructuredLogger (2.0.152)
+ Microsoft.Build (>= 15.8.166)
+ Microsoft.Build.Framework (>= 15.8.166)
+ Microsoft.Build.Tasks.Core (>= 15.8.166)
+ Microsoft.Build.Utilities.Core (>= 15.8.166)
+ NETStandard.Library (2.0.3)
+ Microsoft.NETCore.Platforms (>= 1.1)
+ Newtonsoft.Json (12.0.3)
+ NuGet.Common (5.3.1)
+ NuGet.Frameworks (>= 5.3.1)
+ System.Diagnostics.Process (>= 4.3)
+ System.Threading.Thread (>= 4.3)
+ NuGet.Configuration (5.3.1)
+ NuGet.Common (>= 5.3.1)
+ System.Security.Cryptography.ProtectedData (>= 4.3)
+ NuGet.Frameworks (5.3.1)
+ NuGet.Packaging (5.3.1)
+ Newtonsoft.Json (>= 9.0.1)
+ NuGet.Configuration (>= 5.3.1)
+ NuGet.Versioning (>= 5.3.1)
+ System.Dynamic.Runtime (>= 4.3)
+ NuGet.Protocol (5.3.1)
+ NuGet.Packaging (>= 5.3.1)
+ System.Dynamic.Runtime (>= 4.3)
+ NuGet.Versioning (5.3.1)
+ runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3)
+ runtime.debian.9-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3)
+ runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3)
+ runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3)
+ runtime.fedora.27-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3)
+ runtime.fedora.28-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3)
+ runtime.native.System (4.3.1)
+ Microsoft.NETCore.Platforms (>= 1.1.1)
+ Microsoft.NETCore.Targets (>= 1.1.3)
+ runtime.native.System.Net.Http (4.3.1)
+ Microsoft.NETCore.Platforms (>= 1.1.1)
+ Microsoft.NETCore.Targets (>= 1.1.3)
+ runtime.native.System.Security.Cryptography.Apple (4.3.1)
+ runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple (>= 4.3.1)
+ runtime.native.System.Security.Cryptography.OpenSsl (4.3.3)
+ runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3)
+ runtime.debian.9-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3)
+ runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3)
+ runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3)
+ runtime.fedora.27-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3)
+ runtime.fedora.28-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3)
+ runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3)
+ runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3)
+ runtime.opensuse.42.3-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3)
+ runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3)
+ runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3)
+ runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3)
+ runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3)
+ runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3)
+ runtime.ubuntu.18.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3)
+ runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3)
+ runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3)
+ runtime.opensuse.42.3-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3)
+ runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple (4.3.1)
+ runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3)
+ runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3)
+ runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3)
+ runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3)
+ runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3)
+ runtime.ubuntu.18.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3)
+ System.Buffers (4.5)
+ System.CodeDom (4.6)
+ System.Collections (4.3)
+ Microsoft.NETCore.Platforms (>= 1.1)
+ Microsoft.NETCore.Targets (>= 1.1)
+ System.Runtime (>= 4.3)
+ System.Collections.Concurrent (4.3)
+ System.Collections (>= 4.3)
+ System.Diagnostics.Debug (>= 4.3)
+ System.Diagnostics.Tracing (>= 4.3)
+ System.Globalization (>= 4.3)
+ System.Reflection (>= 4.3)
+ System.Resources.ResourceManager (>= 4.3)
+ System.Runtime (>= 4.3)
+ System.Runtime.Extensions (>= 4.3)
+ System.Threading (>= 4.3)
+ System.Threading.Tasks (>= 4.3)
+ System.Collections.Immutable (1.6)
+ System.Memory (>= 4.5.3)
+ System.Diagnostics.Debug (4.3)
+ Microsoft.NETCore.Platforms (>= 1.1)
+ Microsoft.NETCore.Targets (>= 1.1)
+ System.Runtime (>= 4.3)
+ System.Diagnostics.DiagnosticSource (4.6)
+ System.Memory (>= 4.5.3)
+ System.Diagnostics.FileVersionInfo (4.3)
+ Microsoft.NETCore.Platforms (>= 1.1)
+ System.Globalization (>= 4.3)
+ System.IO (>= 4.3)
+ System.IO.FileSystem (>= 4.3)
+ System.IO.FileSystem.Primitives (>= 4.3)
+ System.Reflection.Metadata (>= 1.4.1)
+ System.Runtime (>= 4.3)
+ System.Runtime.Extensions (>= 4.3)
+ System.Runtime.InteropServices (>= 4.3)
+ System.Diagnostics.Process (4.3)
+ Microsoft.NETCore.Platforms (>= 1.1)
+ Microsoft.Win32.Primitives (>= 4.3)
+ Microsoft.Win32.Registry (>= 4.3)
+ runtime.native.System (>= 4.3)
+ System.Collections (>= 4.3)
+ System.Diagnostics.Debug (>= 4.3)
+ System.Globalization (>= 4.3)
+ System.IO (>= 4.3)
+ System.IO.FileSystem (>= 4.3)
+ System.IO.FileSystem.Primitives (>= 4.3)
+ System.Resources.ResourceManager (>= 4.3)
+ System.Runtime (>= 4.3)
+ System.Runtime.Extensions (>= 4.3)
+ System.Runtime.Handles (>= 4.3)
+ System.Runtime.InteropServices (>= 4.3)
+ System.Text.Encoding (>= 4.3)
+ System.Text.Encoding.Extensions (>= 4.3)
+ System.Threading (>= 4.3)
+ System.Threading.Tasks (>= 4.3)
+ System.Threading.Thread (>= 4.3)
+ System.Threading.ThreadPool (>= 4.3)
+ System.Diagnostics.Tools (4.3)
+ Microsoft.NETCore.Platforms (>= 1.1)
+ Microsoft.NETCore.Targets (>= 1.1)
+ System.Runtime (>= 4.3)
+ System.Diagnostics.TraceSource (4.3)
+ Microsoft.NETCore.Platforms (>= 1.1)
+ runtime.native.System (>= 4.3)
+ System.Collections (>= 4.3)
+ System.Diagnostics.Debug (>= 4.3)
+ System.Globalization (>= 4.3)
+ System.Resources.ResourceManager (>= 4.3)
+ System.Runtime (>= 4.3)
+ System.Runtime.Extensions (>= 4.3)
+ System.Threading (>= 4.3)
+ System.Diagnostics.Tracing (4.3)
+ Microsoft.NETCore.Platforms (>= 1.1)
+ Microsoft.NETCore.Targets (>= 1.1)
+ System.Runtime (>= 4.3)
+ System.Dynamic.Runtime (4.3)
+ System.Collections (>= 4.3)
+ System.Diagnostics.Debug (>= 4.3)
+ System.Linq (>= 4.3)
+ System.Linq.Expressions (>= 4.3)
+ System.ObjectModel (>= 4.3)
+ System.Reflection (>= 4.3)
+ System.Reflection.Emit (>= 4.3)
+ System.Reflection.Emit.ILGeneration (>= 4.3)
+ System.Reflection.Primitives (>= 4.3)
+ System.Reflection.TypeExtensions (>= 4.3)
+ System.Resources.ResourceManager (>= 4.3)
+ System.Runtime (>= 4.3)
+ System.Runtime.Extensions (>= 4.3)
+ System.Threading (>= 4.3)
+ System.Globalization (4.3)
+ Microsoft.NETCore.Platforms (>= 1.1)
+ Microsoft.NETCore.Targets (>= 1.1)
+ System.Runtime (>= 4.3)
+ System.Globalization.Calendars (4.3)
+ Microsoft.NETCore.Platforms (>= 1.1)
+ Microsoft.NETCore.Targets (>= 1.1)
+ System.Globalization (>= 4.3)
+ System.Runtime (>= 4.3)
+ System.Globalization.Extensions (4.3)
+ Microsoft.NETCore.Platforms (>= 1.1)
+ System.Globalization (>= 4.3)
+ System.Resources.ResourceManager (>= 4.3)
+ System.Runtime (>= 4.3)
+ System.Runtime.Extensions (>= 4.3)
+ System.Runtime.InteropServices (>= 4.3)
+ System.IO (4.3)
+ Microsoft.NETCore.Platforms (>= 1.1)
+ Microsoft.NETCore.Targets (>= 1.1)
+ System.Runtime (>= 4.3)
+ System.Text.Encoding (>= 4.3)
+ System.Threading.Tasks (>= 4.3)
+ System.IO.FileSystem (4.3)
+ Microsoft.NETCore.Platforms (>= 1.1)
+ Microsoft.NETCore.Targets (>= 1.1)
+ System.IO (>= 4.3)
+ System.IO.FileSystem.Primitives (>= 4.3)
+ System.Runtime (>= 4.3)
+ System.Runtime.Handles (>= 4.3)
+ System.Text.Encoding (>= 4.3)
+ System.Threading.Tasks (>= 4.3)
+ System.IO.FileSystem.Primitives (4.3)
+ System.Runtime (>= 4.3)
+ System.IO.FileSystem.Watcher (4.3)
+ Microsoft.NETCore.Platforms (>= 1.1)
+ Microsoft.Win32.Primitives (>= 4.3)
+ runtime.native.System (>= 4.3)
+ System.Collections (>= 4.3)
+ System.IO.FileSystem (>= 4.3)
+ System.IO.FileSystem.Primitives (>= 4.3)
+ System.Resources.ResourceManager (>= 4.3)
+ System.Runtime (>= 4.3)
+ System.Runtime.Extensions (>= 4.3)
+ System.Runtime.Handles (>= 4.3)
+ System.Runtime.InteropServices (>= 4.3)
+ System.Text.Encoding (>= 4.3)
+ System.Threading (>= 4.3)
+ System.Threading.Overlapped (>= 4.3)
+ System.Threading.Tasks (>= 4.3)
+ System.Threading.Thread (>= 4.3)
+ System.Linq (4.3)
+ System.Collections (>= 4.3)
+ System.Diagnostics.Debug (>= 4.3)
+ System.Resources.ResourceManager (>= 4.3)
+ System.Runtime (>= 4.3)
+ System.Runtime.Extensions (>= 4.3)
+ System.Linq.Expressions (4.3)
+ System.Collections (>= 4.3)
+ System.Diagnostics.Debug (>= 4.3)
+ System.Globalization (>= 4.3)
+ System.IO (>= 4.3)
+ System.Linq (>= 4.3)
+ System.ObjectModel (>= 4.3)
+ System.Reflection (>= 4.3)
+ System.Reflection.Emit (>= 4.3)
+ System.Reflection.Emit.ILGeneration (>= 4.3)
+ System.Reflection.Emit.Lightweight (>= 4.3)
+ System.Reflection.Extensions (>= 4.3)
+ System.Reflection.Primitives (>= 4.3)
+ System.Reflection.TypeExtensions (>= 4.3)
+ System.Resources.ResourceManager (>= 4.3)
+ System.Runtime (>= 4.3)
+ System.Runtime.Extensions (>= 4.3)
+ System.Threading (>= 4.3)
+ System.Linq.Parallel (4.3)
+ System.Collections (>= 4.3)
+ System.Collections.Concurrent (>= 4.3)
+ System.Diagnostics.Debug (>= 4.3)
+ System.Diagnostics.Tracing (>= 4.3)
+ System.Linq (>= 4.3)
+ System.Resources.ResourceManager (>= 4.3)
+ System.Runtime (>= 4.3)
+ System.Runtime.Extensions (>= 4.3)
+ System.Threading (>= 4.3)
+ System.Threading.Tasks (>= 4.3)
+ System.Memory (4.5.3)
+ System.Buffers (>= 4.4)
+ System.Numerics.Vectors (>= 4.4)
+ System.Runtime.CompilerServices.Unsafe (>= 4.5.2)
+ System.Net.Http (4.3.4)
+ Microsoft.NETCore.Platforms (>= 1.1.1)
+ runtime.native.System (>= 4.3)
+ runtime.native.System.Net.Http (>= 4.3)
+ runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.2)
+ System.Collections (>= 4.3)
+ System.Diagnostics.Debug (>= 4.3)
+ System.Diagnostics.DiagnosticSource (>= 4.3)
+ System.Diagnostics.Tracing (>= 4.3)
+ System.Globalization (>= 4.3)
+ System.Globalization.Extensions (>= 4.3)
+ System.IO (>= 4.3)
+ System.IO.FileSystem (>= 4.3)
+ System.Net.Primitives (>= 4.3)
+ System.Resources.ResourceManager (>= 4.3)
+ System.Runtime (>= 4.3)
+ System.Runtime.Extensions (>= 4.3)
+ System.Runtime.Handles (>= 4.3)
+ System.Runtime.InteropServices (>= 4.3)
+ System.Security.Cryptography.Algorithms (>= 4.3)
+ System.Security.Cryptography.Encoding (>= 4.3)
+ System.Security.Cryptography.OpenSsl (>= 4.3)
+ System.Security.Cryptography.Primitives (>= 4.3)
+ System.Security.Cryptography.X509Certificates (>= 4.3)
+ System.Text.Encoding (>= 4.3)
+ System.Threading (>= 4.3)
+ System.Threading.Tasks (>= 4.3)
+ System.Net.Primitives (4.3.1)
+ Microsoft.NETCore.Platforms (>= 1.1.1)
+ Microsoft.NETCore.Targets (>= 1.1.3)
+ System.Runtime (>= 4.3.1)
+ System.Runtime.Handles (>= 4.3)
+ System.Numerics.Vectors (4.5)
+ System.ObjectModel (4.3)
+ System.Collections (>= 4.3)
+ System.Diagnostics.Debug (>= 4.3)
+ System.Resources.ResourceManager (>= 4.3)
+ System.Runtime (>= 4.3)
+ System.Threading (>= 4.3)
+ System.Reactive (4.2)
+ System.Runtime.InteropServices.WindowsRuntime (>= 4.3)
+ System.Threading.Tasks.Extensions (>= 4.5.3)
+ System.Reactive.Compatibility (4.2)
+ System.Reactive.Core (>= 4.2)
+ System.Reactive.Interfaces (>= 4.2)
+ System.Reactive.Linq (>= 4.2)
+ System.Reactive.PlatformServices (>= 4.2)
+ System.Reactive.Providers (>= 4.2)
+ System.Reactive.Core (4.2)
+ System.Reactive (>= 4.2)
+ System.Threading.Tasks.Extensions (>= 4.5.3)
+ System.Reactive.Interfaces (4.2)
+ System.Reactive (>= 4.2)
+ System.Threading.Tasks.Extensions (>= 4.5.3)
+ System.Reactive.Linq (4.2)
+ System.Reactive (>= 4.2)
+ System.Threading.Tasks.Extensions (>= 4.5.3)
+ System.Reactive.PlatformServices (4.2)
+ System.Reactive (>= 4.2)
+ System.Threading.Tasks.Extensions (>= 4.5.3)
+ System.Reactive.Providers (4.2)
+ System.Reactive (>= 4.2)
+ System.Threading.Tasks.Extensions (>= 4.5.3)
+ System.Reflection (4.3)
+ Microsoft.NETCore.Platforms (>= 1.1)
+ Microsoft.NETCore.Targets (>= 1.1)
+ System.IO (>= 4.3)
+ System.Reflection.Primitives (>= 4.3)
+ System.Runtime (>= 4.3)
+ System.Reflection.Emit (4.6)
+ System.Reflection.Emit.ILGeneration (>= 4.6)
+ System.Reflection.Emit.ILGeneration (4.6)
+ System.Reflection.Emit.Lightweight (4.6)
+ System.Reflection.Emit.ILGeneration (>= 4.6)
+ System.Reflection.Extensions (4.3)
+ Microsoft.NETCore.Platforms (>= 1.1)
+ Microsoft.NETCore.Targets (>= 1.1)
+ System.Reflection (>= 4.3)
+ System.Runtime (>= 4.3)
+ System.Reflection.Metadata (1.7)
+ System.Collections.Immutable (>= 1.6)
+ System.Reflection.Primitives (4.3)
+ Microsoft.NETCore.Platforms (>= 1.1)
+ Microsoft.NETCore.Targets (>= 1.1)
+ System.Runtime (>= 4.3)
+ System.Reflection.TypeExtensions (4.6)
+ System.Resources.Extensions (4.6)
+ System.Memory (>= 4.5.3)
+ System.Resources.ResourceManager (4.3)
+ Microsoft.NETCore.Platforms (>= 1.1)
+ Microsoft.NETCore.Targets (>= 1.1)
+ System.Globalization (>= 4.3)
+ System.Reflection (>= 4.3)
+ System.Runtime (>= 4.3)
+ System.Resources.Writer (4.3)
+ System.Collections (>= 4.3)
+ System.IO (>= 4.3)
+ System.Resources.ResourceManager (>= 4.3)
+ System.Runtime (>= 4.3)
+ System.Runtime.Extensions (>= 4.3)
+ System.Text.Encoding (>= 4.3)
+ System.Runtime (4.3.1)
+ Microsoft.NETCore.Platforms (>= 1.1.1)
+ Microsoft.NETCore.Targets (>= 1.1.3)
+ System.Runtime.CompilerServices.Unsafe (4.6)
+ System.Runtime.Extensions (4.3.1)
+ Microsoft.NETCore.Platforms (>= 1.1.1)
+ Microsoft.NETCore.Targets (>= 1.1.3)
+ System.Runtime (>= 4.3.1)
+ System.Runtime.Handles (4.3)
+ Microsoft.NETCore.Platforms (>= 1.1)
+ Microsoft.NETCore.Targets (>= 1.1)
+ System.Runtime (>= 4.3)
+ System.Runtime.InteropServices (4.3)
+ Microsoft.NETCore.Platforms (>= 1.1)
+ Microsoft.NETCore.Targets (>= 1.1)
+ System.Reflection (>= 4.3)
+ System.Reflection.Primitives (>= 4.3)
+ System.Runtime (>= 4.3)
+ System.Runtime.Handles (>= 4.3)
+ System.Runtime.InteropServices.WindowsRuntime (4.3)
+ System.Runtime (>= 4.3)
+ System.Runtime.Loader (4.3)
+ System.IO (>= 4.3)
+ System.Reflection (>= 4.3)
+ System.Runtime (>= 4.3)
+ System.Runtime.Numerics (4.3)
+ System.Globalization (>= 4.3)
+ System.Resources.ResourceManager (>= 4.3)
+ System.Runtime (>= 4.3)
+ System.Runtime.Extensions (>= 4.3)
+ System.Runtime.Serialization.Primitives (4.3)
+ System.Resources.ResourceManager (>= 4.3)
+ System.Runtime (>= 4.3)
+ System.Security.AccessControl (4.6)
+ System.Security.Principal.Windows (>= 4.6)
+ System.Security.Cryptography.Algorithms (4.3.1)
+ Microsoft.NETCore.Platforms (>= 1.1)
+ runtime.native.System.Security.Cryptography.Apple (>= 4.3.1)
+ runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.2)
+ System.Collections (>= 4.3)
+ System.IO (>= 4.3)
+ System.Resources.ResourceManager (>= 4.3)
+ System.Runtime (>= 4.3)
+ System.Runtime.Extensions (>= 4.3)
+ System.Runtime.Handles (>= 4.3)
+ System.Runtime.InteropServices (>= 4.3)
+ System.Runtime.Numerics (>= 4.3)
+ System.Security.Cryptography.Encoding (>= 4.3)
+ System.Security.Cryptography.Primitives (>= 4.3)
+ System.Text.Encoding (>= 4.3)
+ System.Security.Cryptography.Cng (4.6)
+ System.Security.Cryptography.Csp (4.3)
+ Microsoft.NETCore.Platforms (>= 1.1)
+ System.IO (>= 4.3)
+ System.Reflection (>= 4.3)
+ System.Resources.ResourceManager (>= 4.3)
+ System.Runtime (>= 4.3)
+ System.Runtime.Extensions (>= 4.3)
+ System.Runtime.Handles (>= 4.3)
+ System.Runtime.InteropServices (>= 4.3)
+ System.Security.Cryptography.Algorithms (>= 4.3)
+ System.Security.Cryptography.Encoding (>= 4.3)
+ System.Security.Cryptography.Primitives (>= 4.3)
+ System.Text.Encoding (>= 4.3)
+ System.Threading (>= 4.3)
+ System.Security.Cryptography.Encoding (4.3)
+ Microsoft.NETCore.Platforms (>= 1.1)
+ runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3)
+ System.Collections (>= 4.3)
+ System.Collections.Concurrent (>= 4.3)
+ System.Linq (>= 4.3)
+ System.Resources.ResourceManager (>= 4.3)
+ System.Runtime (>= 4.3)
+ System.Runtime.Extensions (>= 4.3)
+ System.Runtime.Handles (>= 4.3)
+ System.Runtime.InteropServices (>= 4.3)
+ System.Security.Cryptography.Primitives (>= 4.3)
+ System.Text.Encoding (>= 4.3)
+ System.Security.Cryptography.OpenSsl (4.6)
+ System.Security.Cryptography.Primitives (4.3)
+ System.Diagnostics.Debug (>= 4.3)
+ System.Globalization (>= 4.3)
+ System.IO (>= 4.3)
+ System.Resources.ResourceManager (>= 4.3)
+ System.Runtime (>= 4.3)
+ System.Threading (>= 4.3)
+ System.Threading.Tasks (>= 4.3)
+ System.Security.Cryptography.ProtectedData (4.6)
+ System.Memory (>= 4.5.3)
+ System.Security.Cryptography.X509Certificates (4.3.2)
+ Microsoft.NETCore.Platforms (>= 1.1)
+ runtime.native.System (>= 4.3)
+ runtime.native.System.Net.Http (>= 4.3)
+ runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.2)
+ System.Collections (>= 4.3)
+ System.Diagnostics.Debug (>= 4.3)
+ System.Globalization (>= 4.3)
+ System.Globalization.Calendars (>= 4.3)
+ System.IO (>= 4.3)
+ System.IO.FileSystem (>= 4.3)
+ System.IO.FileSystem.Primitives (>= 4.3)
+ System.Resources.ResourceManager (>= 4.3)
+ System.Runtime (>= 4.3)
+ System.Runtime.Extensions (>= 4.3)
+ System.Runtime.Handles (>= 4.3)
+ System.Runtime.InteropServices (>= 4.3)
+ System.Runtime.Numerics (>= 4.3)
+ System.Security.Cryptography.Algorithms (>= 4.3)
+ System.Security.Cryptography.Cng (>= 4.3)
+ System.Security.Cryptography.Csp (>= 4.3)
+ System.Security.Cryptography.Encoding (>= 4.3)
+ System.Security.Cryptography.OpenSsl (>= 4.3)
+ System.Security.Cryptography.Primitives (>= 4.3)
+ System.Text.Encoding (>= 4.3)
+ System.Threading (>= 4.3)
+ System.Security.Principal.Windows (4.6)
+ System.Text.Encoding (4.3)
+ Microsoft.NETCore.Platforms (>= 1.1)
+ Microsoft.NETCore.Targets (>= 1.1)
+ System.Runtime (>= 4.3)
+ System.Text.Encoding.CodePages (4.6)
+ System.Runtime.CompilerServices.Unsafe (>= 4.6)
+ System.Text.Encoding.Extensions (4.3)
+ Microsoft.NETCore.Platforms (>= 1.1)
+ Microsoft.NETCore.Targets (>= 1.1)
+ System.Runtime (>= 4.3)
+ System.Text.Encoding (>= 4.3)
+ System.Text.RegularExpressions (4.3.1)
+ System.Collections (>= 4.3)
+ System.Globalization (>= 4.3)
+ System.Resources.ResourceManager (>= 4.3)
+ System.Runtime (>= 4.3.1)
+ System.Runtime.Extensions (>= 4.3.1)
+ System.Threading (>= 4.3)
+ System.Threading (4.3)
+ System.Runtime (>= 4.3)
+ System.Threading.Tasks (>= 4.3)
+ System.Threading.Overlapped (4.3)
+ Microsoft.NETCore.Platforms (>= 1.1)
+ System.Resources.ResourceManager (>= 4.3)
+ System.Runtime (>= 4.3)
+ System.Runtime.Handles (>= 4.3)
+ System.Threading.Tasks (4.3)
+ Microsoft.NETCore.Platforms (>= 1.1)
+ Microsoft.NETCore.Targets (>= 1.1)
+ System.Runtime (>= 4.3)
+ System.Threading.Tasks.Dataflow (4.10)
+ System.Threading.Tasks.Extensions (4.5.3)
+ System.Runtime.CompilerServices.Unsafe (>= 4.5.2)
+ System.Threading.Thread (4.3)
+ System.Runtime (>= 4.3)
+ System.Threading.ThreadPool (4.3)
+ System.Runtime (>= 4.3)
+ System.Runtime.Handles (>= 4.3)
+ System.Xml.ReaderWriter (4.3.1)
+ System.Collections (>= 4.3)
+ System.Diagnostics.Debug (>= 4.3)
+ System.Globalization (>= 4.3)
+ System.IO (>= 4.3)
+ System.IO.FileSystem (>= 4.3)
+ System.IO.FileSystem.Primitives (>= 4.3)
+ System.Resources.ResourceManager (>= 4.3)
+ System.Runtime (>= 4.3)
+ System.Runtime.Extensions (>= 4.3)
+ System.Runtime.InteropServices (>= 4.3)
+ System.Text.Encoding (>= 4.3)
+ System.Text.Encoding.Extensions (>= 4.3)
+ System.Text.RegularExpressions (>= 4.3)
+ System.Threading.Tasks (>= 4.3)
+ System.Threading.Tasks.Extensions (>= 4.3)
+ System.Xml.XDocument (4.3)
+ System.Collections (>= 4.3)
+ System.Diagnostics.Debug (>= 4.3)
+ System.Diagnostics.Tools (>= 4.3)
+ System.Globalization (>= 4.3)
+ System.IO (>= 4.3)
+ System.Reflection (>= 4.3)
+ System.Resources.ResourceManager (>= 4.3)
+ System.Runtime (>= 4.3)
+ System.Runtime.Extensions (>= 4.3)
+ System.Text.Encoding (>= 4.3)
+ System.Threading (>= 4.3)
+ System.Xml.ReaderWriter (>= 4.3)
+ System.Xml.XmlDocument (4.3)
+ System.Collections (>= 4.3)
+ System.Diagnostics.Debug (>= 4.3)
+ System.Globalization (>= 4.3)
+ System.IO (>= 4.3)
+ System.Resources.ResourceManager (>= 4.3)
+ System.Runtime (>= 4.3)
+ System.Runtime.Extensions (>= 4.3)
+ System.Text.Encoding (>= 4.3)
+ System.Threading (>= 4.3)
+ System.Xml.ReaderWriter (>= 4.3)
+ System.Xml.XPath (4.3)
+ System.Collections (>= 4.3)
+ System.Diagnostics.Debug (>= 4.3)
+ System.Globalization (>= 4.3)
+ System.IO (>= 4.3)
+ System.Resources.ResourceManager (>= 4.3)
+ System.Runtime (>= 4.3)
+ System.Runtime.Extensions (>= 4.3)
+ System.Threading (>= 4.3)
+ System.Xml.ReaderWriter (>= 4.3)
+ System.Xml.XPath.XDocument (4.3)
+ System.Diagnostics.Debug (>= 4.3)
+ System.Linq (>= 4.3)
+ System.Resources.ResourceManager (>= 4.3)
+ System.Runtime (>= 4.3)
+ System.Runtime.Extensions (>= 4.3)
+ System.Threading (>= 4.3)
+ System.Xml.ReaderWriter (>= 4.3)
+ System.Xml.XDocument (>= 4.3)
+ System.Xml.XPath (>= 4.3)
+ System.Xml.XPath.XmlDocument (4.3)
+ System.Collections (>= 4.3)
+ System.Globalization (>= 4.3)
+ System.IO (>= 4.3)
+ System.Resources.ResourceManager (>= 4.3)
+ System.Runtime (>= 4.3)
+ System.Runtime.Extensions (>= 4.3)
+ System.Threading (>= 4.3)
+ System.Xml.ReaderWriter (>= 4.3)
+ System.Xml.XmlDocument (>= 4.3)
+ System.Xml.XPath (>= 4.3)
+
+GROUP generate
+STORAGE: NONE
+RESTRICTION: == netstandard2.0
+NUGET
+ remote: https://api.nuget.org/v3/index.json
+ Fake.Core (5.16)
+ Fake.Core.Context (5.18.3)
+ FSharp.Core (>= 4.7)
+ Fake.Core.Environment (5.18.3)
+ FSharp.Core (>= 4.7)
+ Fake.Core.FakeVar (5.18.3)
+ Fake.Core.Context (>= 5.18.3)
+ FSharp.Core (>= 4.7)
+ Fake.Core.String (5.18.3)
+ FSharp.Core (>= 4.7)
+ Fake.Core.Trace (5.18.3)
+ Fake.Core.Environment (>= 5.18.3)
+ Fake.Core.FakeVar (>= 5.18.3)
+ FSharp.Core (>= 4.7)
+ Fake.IO.FileSystem (5.18.3)
+ Fake.Core.String (>= 5.18.3)
+ FSharp.Core (>= 4.7)
+ System.Diagnostics.FileVersionInfo (>= 4.3)
+ System.IO.FileSystem.Watcher (>= 4.3)
FSharp.Compiler.Service (27.0.1)
FSharp.Core (>= 4.5.2)
System.Collections.Immutable (>= 1.5)
+ System.Diagnostics.Process (>= 4.1)
+ System.Diagnostics.TraceSource (>= 4.0)
+ System.Reflection.Emit (>= 4.3)
System.Reflection.Metadata (>= 1.6)
- System.ValueTuple (>= 4.4)
- FSharp.Core (4.6.2)
- FSharp.Formatting (3.1)
+ System.Reflection.TypeExtensions (>= 4.3)
+ System.Runtime.Loader (>= 4.0)
+ System.Security.Cryptography.Algorithms (>= 4.3)
+ FSharp.Core (4.7)
+ FSharp.Literate (3.1)
FSharp.Compiler.Service (>= 27.0.1 < 28.0)
- Microsoft.AspNet.Razor (>= 3.2.7 < 4.0)
System.ValueTuple (>= 4.5 < 5.0)
- Microsoft.AspNet.Razor (3.2.7)
- System.Collections.Immutable (1.5)
- System.Reflection.Metadata (1.6)
- System.Collections.Immutable (>= 1.5)
+ Microsoft.NETCore.Platforms (3.0)
+ Microsoft.NETCore.Targets (3.0)
+ Microsoft.Win32.Primitives (4.3)
+ Microsoft.NETCore.Platforms (>= 1.1)
+ Microsoft.NETCore.Targets (>= 1.1)
+ System.Runtime (>= 4.3)
+ Microsoft.Win32.Registry (4.6)
+ System.Buffers (>= 4.5)
+ System.Memory (>= 4.5.3)
+ System.Security.AccessControl (>= 4.6)
+ System.Security.Principal.Windows (>= 4.6)
+ runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3)
+ runtime.debian.9-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3)
+ runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3)
+ runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3)
+ runtime.fedora.27-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3)
+ runtime.fedora.28-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3)
+ runtime.native.System (4.3.1)
+ Microsoft.NETCore.Platforms (>= 1.1.1)
+ Microsoft.NETCore.Targets (>= 1.1.3)
+ runtime.native.System.Security.Cryptography.Apple (4.3.1)
+ runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple (>= 4.3.1)
+ runtime.native.System.Security.Cryptography.OpenSsl (4.3.3)
+ runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3)
+ runtime.debian.9-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3)
+ runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3)
+ runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3)
+ runtime.fedora.27-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3)
+ runtime.fedora.28-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3)
+ runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3)
+ runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3)
+ runtime.opensuse.42.3-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3)
+ runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3)
+ runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3)
+ runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3)
+ runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3)
+ runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3)
+ runtime.ubuntu.18.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3)
+ runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3)
+ runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3)
+ runtime.opensuse.42.3-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3)
+ runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple (4.3.1)
+ runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3)
+ runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3)
+ runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3)
+ runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3)
+ runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3)
+ runtime.ubuntu.18.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3)
+ System.Buffers (4.5)
+ System.Collections (4.3)
+ Microsoft.NETCore.Platforms (>= 1.1)
+ Microsoft.NETCore.Targets (>= 1.1)
+ System.Runtime (>= 4.3)
+ System.Collections.Concurrent (4.3)
+ System.Collections (>= 4.3)
+ System.Diagnostics.Debug (>= 4.3)
+ System.Diagnostics.Tracing (>= 4.3)
+ System.Globalization (>= 4.3)
+ System.Reflection (>= 4.3)
+ System.Resources.ResourceManager (>= 4.3)
+ System.Runtime (>= 4.3)
+ System.Runtime.Extensions (>= 4.3)
+ System.Threading (>= 4.3)
+ System.Threading.Tasks (>= 4.3)
+ System.Collections.Immutable (1.6)
+ System.Memory (>= 4.5.3)
+ System.Diagnostics.Debug (4.3)
+ Microsoft.NETCore.Platforms (>= 1.1)
+ Microsoft.NETCore.Targets (>= 1.1)
+ System.Runtime (>= 4.3)
+ System.Diagnostics.FileVersionInfo (4.3)
+ Microsoft.NETCore.Platforms (>= 1.1)
+ System.Globalization (>= 4.3)
+ System.IO (>= 4.3)
+ System.IO.FileSystem (>= 4.3)
+ System.IO.FileSystem.Primitives (>= 4.3)
+ System.Reflection.Metadata (>= 1.4.1)
+ System.Runtime (>= 4.3)
+ System.Runtime.Extensions (>= 4.3)
+ System.Runtime.InteropServices (>= 4.3)
+ System.Diagnostics.Process (4.3)
+ Microsoft.NETCore.Platforms (>= 1.1)
+ Microsoft.Win32.Primitives (>= 4.3)
+ Microsoft.Win32.Registry (>= 4.3)
+ runtime.native.System (>= 4.3)
+ System.Collections (>= 4.3)
+ System.Diagnostics.Debug (>= 4.3)
+ System.Globalization (>= 4.3)
+ System.IO (>= 4.3)
+ System.IO.FileSystem (>= 4.3)
+ System.IO.FileSystem.Primitives (>= 4.3)
+ System.Resources.ResourceManager (>= 4.3)
+ System.Runtime (>= 4.3)
+ System.Runtime.Extensions (>= 4.3)
+ System.Runtime.Handles (>= 4.3)
+ System.Runtime.InteropServices (>= 4.3)
+ System.Text.Encoding (>= 4.3)
+ System.Text.Encoding.Extensions (>= 4.3)
+ System.Threading (>= 4.3)
+ System.Threading.Tasks (>= 4.3)
+ System.Threading.Thread (>= 4.3)
+ System.Threading.ThreadPool (>= 4.3)
+ System.Diagnostics.TraceSource (4.3)
+ Microsoft.NETCore.Platforms (>= 1.1)
+ runtime.native.System (>= 4.3)
+ System.Collections (>= 4.3)
+ System.Diagnostics.Debug (>= 4.3)
+ System.Globalization (>= 4.3)
+ System.Resources.ResourceManager (>= 4.3)
+ System.Runtime (>= 4.3)
+ System.Runtime.Extensions (>= 4.3)
+ System.Threading (>= 4.3)
+ System.Diagnostics.Tracing (4.3)
+ Microsoft.NETCore.Platforms (>= 1.1)
+ Microsoft.NETCore.Targets (>= 1.1)
+ System.Runtime (>= 4.3)
+ System.Globalization (4.3)
+ Microsoft.NETCore.Platforms (>= 1.1)
+ Microsoft.NETCore.Targets (>= 1.1)
+ System.Runtime (>= 4.3)
+ System.IO (4.3)
+ Microsoft.NETCore.Platforms (>= 1.1)
+ Microsoft.NETCore.Targets (>= 1.1)
+ System.Runtime (>= 4.3)
+ System.Text.Encoding (>= 4.3)
+ System.Threading.Tasks (>= 4.3)
+ System.IO.FileSystem (4.3)
+ Microsoft.NETCore.Platforms (>= 1.1)
+ Microsoft.NETCore.Targets (>= 1.1)
+ System.IO (>= 4.3)
+ System.IO.FileSystem.Primitives (>= 4.3)
+ System.Runtime (>= 4.3)
+ System.Runtime.Handles (>= 4.3)
+ System.Text.Encoding (>= 4.3)
+ System.Threading.Tasks (>= 4.3)
+ System.IO.FileSystem.Primitives (4.3)
+ System.Runtime (>= 4.3)
+ System.IO.FileSystem.Watcher (4.3)
+ Microsoft.NETCore.Platforms (>= 1.1)
+ Microsoft.Win32.Primitives (>= 4.3)
+ runtime.native.System (>= 4.3)
+ System.Collections (>= 4.3)
+ System.IO.FileSystem (>= 4.3)
+ System.IO.FileSystem.Primitives (>= 4.3)
+ System.Resources.ResourceManager (>= 4.3)
+ System.Runtime (>= 4.3)
+ System.Runtime.Extensions (>= 4.3)
+ System.Runtime.Handles (>= 4.3)
+ System.Runtime.InteropServices (>= 4.3)
+ System.Text.Encoding (>= 4.3)
+ System.Threading (>= 4.3)
+ System.Threading.Overlapped (>= 4.3)
+ System.Threading.Tasks (>= 4.3)
+ System.Threading.Thread (>= 4.3)
+ System.Linq (4.3)
+ System.Collections (>= 4.3)
+ System.Diagnostics.Debug (>= 4.3)
+ System.Resources.ResourceManager (>= 4.3)
+ System.Runtime (>= 4.3)
+ System.Runtime.Extensions (>= 4.3)
+ System.Memory (4.5.3)
+ System.Buffers (>= 4.4)
+ System.Numerics.Vectors (>= 4.4)
+ System.Runtime.CompilerServices.Unsafe (>= 4.5.2)
+ System.Numerics.Vectors (4.5)
+ System.Reflection (4.3)
+ Microsoft.NETCore.Platforms (>= 1.1)
+ Microsoft.NETCore.Targets (>= 1.1)
+ System.IO (>= 4.3)
+ System.Reflection.Primitives (>= 4.3)
+ System.Runtime (>= 4.3)
+ System.Reflection.Emit (4.6)
+ System.Reflection.Emit.ILGeneration (>= 4.6)
+ System.Reflection.Emit.ILGeneration (4.6)
+ System.Reflection.Metadata (1.7)
+ System.Collections.Immutable (>= 1.6)
+ System.Reflection.Primitives (4.3)
+ Microsoft.NETCore.Platforms (>= 1.1)
+ Microsoft.NETCore.Targets (>= 1.1)
+ System.Runtime (>= 4.3)
+ System.Reflection.TypeExtensions (4.6)
+ System.Resources.ResourceManager (4.3)
+ Microsoft.NETCore.Platforms (>= 1.1)
+ Microsoft.NETCore.Targets (>= 1.1)
+ System.Globalization (>= 4.3)
+ System.Reflection (>= 4.3)
+ System.Runtime (>= 4.3)
+ System.Runtime (4.3.1)
+ Microsoft.NETCore.Platforms (>= 1.1.1)
+ Microsoft.NETCore.Targets (>= 1.1.3)
+ System.Runtime.CompilerServices.Unsafe (4.6)
+ System.Runtime.Extensions (4.3.1)
+ Microsoft.NETCore.Platforms (>= 1.1.1)
+ Microsoft.NETCore.Targets (>= 1.1.3)
+ System.Runtime (>= 4.3.1)
+ System.Runtime.Handles (4.3)
+ Microsoft.NETCore.Platforms (>= 1.1)
+ Microsoft.NETCore.Targets (>= 1.1)
+ System.Runtime (>= 4.3)
+ System.Runtime.InteropServices (4.3)
+ Microsoft.NETCore.Platforms (>= 1.1)
+ Microsoft.NETCore.Targets (>= 1.1)
+ System.Reflection (>= 4.3)
+ System.Reflection.Primitives (>= 4.3)
+ System.Runtime (>= 4.3)
+ System.Runtime.Handles (>= 4.3)
+ System.Runtime.Loader (4.3)
+ System.IO (>= 4.3)
+ System.Reflection (>= 4.3)
+ System.Runtime (>= 4.3)
+ System.Runtime.Numerics (4.3)
+ System.Globalization (>= 4.3)
+ System.Resources.ResourceManager (>= 4.3)
+ System.Runtime (>= 4.3)
+ System.Runtime.Extensions (>= 4.3)
+ System.Security.AccessControl (4.6)
+ System.Security.Principal.Windows (>= 4.6)
+ System.Security.Cryptography.Algorithms (4.3.1)
+ Microsoft.NETCore.Platforms (>= 1.1)
+ runtime.native.System.Security.Cryptography.Apple (>= 4.3.1)
+ runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.2)
+ System.Collections (>= 4.3)
+ System.IO (>= 4.3)
+ System.Resources.ResourceManager (>= 4.3)
+ System.Runtime (>= 4.3)
+ System.Runtime.Extensions (>= 4.3)
+ System.Runtime.Handles (>= 4.3)
+ System.Runtime.InteropServices (>= 4.3)
+ System.Runtime.Numerics (>= 4.3)
+ System.Security.Cryptography.Encoding (>= 4.3)
+ System.Security.Cryptography.Primitives (>= 4.3)
+ System.Text.Encoding (>= 4.3)
+ System.Security.Cryptography.Encoding (4.3)
+ Microsoft.NETCore.Platforms (>= 1.1)
+ runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3)
+ System.Collections (>= 4.3)
+ System.Collections.Concurrent (>= 4.3)
+ System.Linq (>= 4.3)
+ System.Resources.ResourceManager (>= 4.3)
+ System.Runtime (>= 4.3)
+ System.Runtime.Extensions (>= 4.3)
+ System.Runtime.Handles (>= 4.3)
+ System.Runtime.InteropServices (>= 4.3)
+ System.Security.Cryptography.Primitives (>= 4.3)
+ System.Text.Encoding (>= 4.3)
+ System.Security.Cryptography.Primitives (4.3)
+ System.Diagnostics.Debug (>= 4.3)
+ System.Globalization (>= 4.3)
+ System.IO (>= 4.3)
+ System.Resources.ResourceManager (>= 4.3)
+ System.Runtime (>= 4.3)
+ System.Threading (>= 4.3)
+ System.Threading.Tasks (>= 4.3)
+ System.Security.Principal.Windows (4.6)
+ System.Text.Encoding (4.3)
+ Microsoft.NETCore.Platforms (>= 1.1)
+ Microsoft.NETCore.Targets (>= 1.1)
+ System.Runtime (>= 4.3)
+ System.Text.Encoding.Extensions (4.3)
+ Microsoft.NETCore.Platforms (>= 1.1)
+ Microsoft.NETCore.Targets (>= 1.1)
+ System.Runtime (>= 4.3)
+ System.Text.Encoding (>= 4.3)
+ System.Threading (4.3)
+ System.Runtime (>= 4.3)
+ System.Threading.Tasks (>= 4.3)
+ System.Threading.Overlapped (4.3)
+ Microsoft.NETCore.Platforms (>= 1.1)
+ System.Resources.ResourceManager (>= 4.3)
+ System.Runtime (>= 4.3)
+ System.Runtime.Handles (>= 4.3)
+ System.Threading.Tasks (4.3)
+ Microsoft.NETCore.Platforms (>= 1.1)
+ Microsoft.NETCore.Targets (>= 1.1)
+ System.Runtime (>= 4.3)
+ System.Threading.Thread (4.3)
+ System.Runtime (>= 4.3)
+ System.Threading.ThreadPool (4.3)
+ System.Runtime (>= 4.3)
+ System.Runtime.Handles (>= 4.3)
System.ValueTuple (4.5)
diff --git a/global.json b/global.json
index 964bb5e247..bbe81be30c 100644
--- a/global.json
+++ b/global.json
@@ -10,7 +10,7 @@
}
},
"msbuild-sdks": {
- "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.19557.20",
+ "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.19603.17",
"Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19069.2"
}
}
diff --git a/src/absil/ilread.fs b/src/absil/ilread.fs
index cc5c865515..de201333a0 100755
--- a/src/absil/ilread.fs
+++ b/src/absil/ilread.fs
@@ -14,6 +14,7 @@ open System.Collections.Concurrent
open System.Collections.Generic
open System.Diagnostics
open System.IO
+open System.IO.MemoryMappedFiles
open System.Runtime.InteropServices
open System.Text
open Internal.Utilities
@@ -184,124 +185,6 @@ type RawMemoryFile(fileName: string, obj: obj, addr: nativeint, length: int) =
interface BinaryFile with
override __.GetView() = view :>_
-/// Read from memory mapped files.
-module MemoryMapping =
-
- type HANDLE = nativeint
- type ADDR = nativeint
- type SIZE_T = nativeint
-
- []
- extern bool CloseHandle (HANDLE _handler)
-
- []
- extern HANDLE CreateFile (string _lpFileName,
- int _dwDesiredAccess,
- int _dwShareMode,
- HANDLE _lpSecurityAttributes,
- int _dwCreationDisposition,
- int _dwFlagsAndAttributes,
- HANDLE _hTemplateFile)
-
- []
- extern HANDLE CreateFileMapping (HANDLE _hFile,
- HANDLE _lpAttributes,
- int _flProtect,
- int _dwMaximumSizeLow,
- int _dwMaximumSizeHigh,
- string _lpName)
-
- []
- extern ADDR MapViewOfFile (HANDLE _hFileMappingObject,
- int _dwDesiredAccess,
- int _dwFileOffsetHigh,
- int _dwFileOffsetLow,
- SIZE_T _dwNumBytesToMap)
-
- []
- extern bool UnmapViewOfFile (ADDR _lpBaseAddress)
-
- let INVALID_HANDLE = new IntPtr(-1)
- let MAP_READ = 0x0004
- let GENERIC_READ = 0x80000000
- let NULL_HANDLE = IntPtr.Zero
- let FILE_SHARE_NONE = 0x0000
- let FILE_SHARE_READ = 0x0001
- let FILE_SHARE_WRITE = 0x0002
- let FILE_SHARE_READ_WRITE = 0x0003
- let CREATE_ALWAYS = 0x0002
- let OPEN_EXISTING = 0x0003
- let OPEN_ALWAYS = 0x0004
-
-/// A view over a raw pointer to memory given by a memory mapped file.
-/// NOTE: we should do more checking of validity here.
-type MemoryMapView(start: nativeint) =
- inherit BinaryView()
-
- override m.ReadByte i =
- Marshal.ReadByte(start + nativeint i)
-
- override m.ReadBytes i n =
- let res = Bytes.zeroCreate n
- Marshal.Copy(start + nativeint i, res, 0, n)
- res
-
- override m.ReadInt32 i =
- Marshal.ReadInt32(start + nativeint i)
-
- override m.ReadUInt16 i =
- uint16(Marshal.ReadInt16(start + nativeint i))
-
- override m.CountUtf8String i =
- let pStart = start + nativeint i
- let mutable p = start
- while Marshal.ReadByte p <> 0uy do
- p <- p + 1n
- int (p - pStart)
-
- override m.ReadUTF8String i =
- let n = m.CountUtf8String i
- System.Runtime.InteropServices.Marshal.PtrToStringAnsi(start + nativeint i, n)
-
-/// Memory maps a file and creates a single view over the entirety of its contents. The
-/// lock on the file is only released when the object is disposed.
-/// For memory mapping we currently take one view and never release it.
-[]
-type MemoryMapFile(fileName: string, view: MemoryMapView, hMap: MemoryMapping.HANDLE, hView: nativeint) =
-
- do stats.memoryMapFileOpenedCount <- stats.memoryMapFileOpenedCount + 1
- let mutable closed = false
- static member Create fileName =
- let hFile = MemoryMapping.CreateFile (fileName, MemoryMapping.GENERIC_READ, MemoryMapping.FILE_SHARE_READ_WRITE, IntPtr.Zero, MemoryMapping.OPEN_EXISTING, 0, IntPtr.Zero )
- if hFile.Equals MemoryMapping.INVALID_HANDLE then
- failwithf "CreateFile(0x%08x)" (Marshal.GetHRForLastWin32Error())
- let protection = 0x00000002
- let hMap = MemoryMapping.CreateFileMapping (hFile, IntPtr.Zero, protection, 0, 0, null )
- ignore(MemoryMapping.CloseHandle hFile)
- if hMap.Equals MemoryMapping.NULL_HANDLE then
- failwithf "CreateFileMapping(0x%08x)" (Marshal.GetHRForLastWin32Error())
-
- let hView = MemoryMapping.MapViewOfFile (hMap, MemoryMapping.MAP_READ, 0, 0, 0n)
-
- if hView.Equals IntPtr.Zero then
- failwithf "MapViewOfFile(0x%08x)" (Marshal.GetHRForLastWin32Error())
-
- let view = MemoryMapView hView
-
- MemoryMapFile(fileName, view, hMap, hView)
-
- member __.FileName = fileName
-
- member __.Close() =
- stats.memoryMapFileClosedCount <- stats.memoryMapFileClosedCount + 1
- if not closed then
- closed <- true
- MemoryMapping.UnmapViewOfFile hView |> ignore
- MemoryMapping.CloseHandle hMap |> ignore
-
- interface BinaryFile with
- override __.GetView() = (view :> BinaryView)
-
/// Read file from memory blocks
type ByteView(bytes: byte[]) =
inherit BinaryView()
@@ -3989,19 +3872,24 @@ let createByteFileChunk opts fileName chunk =
| Some (start, length) -> File.ReadBinaryChunk(fileName, start, length)
ByteFile(fileName, bytes) :> BinaryFile
-let tryMemoryMapWholeFile opts fileName =
- let file =
- try
- MemoryMapFile.Create fileName :> BinaryFile
- with _ ->
- createByteFileChunk opts fileName None
- let disposer =
- { new IDisposable with
- member __.Dispose() =
- match file with
- | :? MemoryMapFile as m -> m.Close() // Note that the PE file reader is not required after this point for metadata-only reading
- | _ -> () }
- disposer, file
+let createMemoryMapFile fileName =
+ let mmf, accessor, length =
+ let fileStream = File.Open(fileName, FileMode.Open, FileAccess.Read, FileShare.Read)
+ let length = fileStream.Length
+ let mmf = MemoryMappedFile.CreateFromFile(fileStream, null, length, MemoryMappedFileAccess.Read, HandleInheritability.None, leaveOpen=false)
+ mmf, mmf.CreateViewAccessor(0L, fileStream.Length, MemoryMappedFileAccess.Read), length
+ let safeHolder =
+ { new obj() with
+ override x.Finalize() =
+ (x :?> IDisposable).Dispose()
+ interface IDisposable with
+ member x.Dispose() =
+ GC.SuppressFinalize x
+ accessor.Dispose()
+ mmf.Dispose()
+ stats.memoryMapFileClosedCount <- stats.memoryMapFileClosedCount + 1 }
+ stats.memoryMapFileOpenedCount <- stats.memoryMapFileOpenedCount + 1
+ safeHolder, RawMemoryFile(fileName, safeHolder, accessor.SafeMemoryMappedViewHandle.DangerousGetHandle(), int length) :> BinaryFile
let OpenILModuleReaderFromBytes fileName bytes opts =
let pefile = ByteFile(fileName, bytes) :> BinaryFile
@@ -4067,7 +3955,7 @@ let OpenILModuleReader fileName opts =
// For metadata-only, always use a temporary, short-lived PE file reader, preferably over a memory mapped file.
// Then use the metadata blob as the long-lived memory resource.
- let disposer, pefileEager = tryMemoryMapWholeFile opts fullPath
+ let disposer, pefileEager = createMemoryMapFile fullPath
use _disposer = disposer
let (metadataPhysLoc, metadataSize, peinfo, pectxtEager, pevEager, _pdb) = openPEFileReader (fullPath, pefileEager, None, false)
let mdfile =
@@ -4106,7 +3994,7 @@ let OpenILModuleReader fileName opts =
// still use an in-memory ByteFile
let _disposer, pefile =
if alwaysMemoryMapFSC || stableFileHeuristicApplies fullPath then
- tryMemoryMapWholeFile opts fullPath
+ createMemoryMapFile fullPath
else
let pefile = createByteFileChunk opts fullPath None
let disposer = { new IDisposable with member __.Dispose() = () }
diff --git a/src/fsharp/CompileOps.fs b/src/fsharp/CompileOps.fs
index 8d06ce14f8..ab20bfcf13 100644
--- a/src/fsharp/CompileOps.fs
+++ b/src/fsharp/CompileOps.fs
@@ -2816,7 +2816,11 @@ type TcConfig private (data: TcConfigBuilder, validate: bool) =
let facades = Path.Combine(frameworkRootVersion, "Facades")
if Directory.Exists facades then
yield facades
- ]
+ match frameworkRefsPackDirectory with
+ | Some path when Directory.Exists(path) ->
+ yield path
+ | _ -> ()
+ ]
with e ->
errorRecovery e range0; []
diff --git a/src/fsharp/FSharp.Compiler.Private.Scripting/FSharpScript.fs b/src/fsharp/FSharp.Compiler.Private.Scripting/FSharpScript.fs
index a7d24b3c9c..d260bd2ccd 100644
--- a/src/fsharp/FSharp.Compiler.Private.Scripting/FSharpScript.fs
+++ b/src/fsharp/FSharp.Compiler.Private.Scripting/FSharpScript.fs
@@ -3,6 +3,9 @@
namespace FSharp.Compiler.Scripting
open System
+=======
+open System.Threading
+open FSharp.Compiler
open FSharp.Compiler.Interactive.Shell
type FSharpScript(?captureInput: bool, ?captureOutput: bool, ?additionalArgs: string[]) as this =
@@ -36,18 +39,37 @@ type FSharpScript(?captureInput: bool, ?captureOutput: bool, ?additionalArgs: st
member __.AssemblyReferenceAdded = fsi.AssemblyReferenceAdded
+ member __.ValueBound = fsi.ValueBound
+
member __.ProvideInput = stdin.ProvideInput
member __.OutputProduced = outputProduced.Publish
member __.ErrorProduced = errorProduced.Publish
- member __.Eval(code: string) =
- let ch, errors = fsi.EvalInteractionNonThrowing code
+ member __.Fsi = fsi
+
+ member __.Eval(code: string, ?cancellationToken: CancellationToken) =
+ let cancellationToken = defaultArg cancellationToken CancellationToken.None
+ let ch, errors = fsi.EvalInteractionNonThrowing(code, cancellationToken)
match ch with
| Choice1Of2 v -> Ok(v), errors
| Choice2Of2 ex -> Error(ex), errors
+ /// Get the available completion items from the code at the specified location.
+ ///
+ /// The input text on which completions will be calculated
+ /// The 1-based line index
+ /// The 0-based column index
+ member __.GetCompletionItems(text: string, line: int, column: int) =
+ async {
+ let! parseResults, checkResults, _projectResults = fsi.ParseAndCheckInteraction(text)
+ let lineText = text.Split('\n').[line - 1]
+ let partialName = QuickParse.GetPartialLongNameEx(lineText, column - 1)
+ let! declarationListInfos = checkResults.GetDeclarationListInfo(Some parseResults, line, lineText, partialName)
+ return declarationListInfos.Items
+ }
+
interface IDisposable with
member __.Dispose() =
if captureInput then
diff --git a/src/fsharp/FSharp.Core.nuget/FSharp.Core.nuget.csproj b/src/fsharp/FSharp.Core.nuget/FSharp.Core.nuget.csproj
index 4bc3e61c16..b55bc2feba 100644
--- a/src/fsharp/FSharp.Core.nuget/FSharp.Core.nuget.csproj
+++ b/src/fsharp/FSharp.Core.nuget/FSharp.Core.nuget.csproj
@@ -9,6 +9,10 @@
FSharp.Core redistributables from Visual F# Tools version $(FSPackageMajorVersion) For F# $(FSCoreMajorVersion). Contains code from the F# Software Foundation.
+
+
+
+
false
diff --git a/src/fsharp/FSharp.Core.nuget/icon.png b/src/fsharp/FSharp.Core.nuget/icon.png
new file mode 100644
index 0000000000..8a2b81b9eb
Binary files /dev/null and b/src/fsharp/FSharp.Core.nuget/icon.png differ
diff --git a/src/fsharp/FSharp.Core/async.fs b/src/fsharp/FSharp.Core/async.fs
index 1d4eb37ecc..b6ab88a16f 100644
--- a/src/fsharp/FSharp.Core/async.fs
+++ b/src/fsharp/FSharp.Core/async.fs
@@ -1250,31 +1250,28 @@ namespace Microsoft.FSharp.Control
|> unfake)
| Some maxDegreeOfParallelism ->
let mutable i = -1
- let worker = MakeAsync (fun _ ->
- while i < tasks.Length do
+ let rec worker (trampolineHolder : TrampolineHolder) =
+ if i < tasks.Length then
let j = Interlocked.Increment &i
if j < tasks.Length then
- let trampolineHolder = new TrampolineHolder()
- trampolineHolder.ExecuteWithTrampoline (fun () ->
- let ctxt =
+ if innerCTS.Token.IsCancellationRequested then
+ let cexn = new OperationCanceledException (innerCTS.Token)
+ recordFailure (Choice2Of2 cexn) |> unfake
+ worker trampolineHolder |> unfake
+ else
+ let taskCtxt =
AsyncActivation.Create
innerCTS.Token
trampolineHolder
- (fun res -> recordSuccess j res)
- (fun edi -> recordFailure (Choice1Of2 edi))
- (fun cexn -> recordFailure (Choice2Of2 cexn))
- tasks.[j].Invoke ctxt
- )
- |> unfake
+ (fun res -> recordSuccess j res |> unfake; worker trampolineHolder)
+ (fun edi -> recordFailure (Choice1Of2 edi) |> unfake; worker trampolineHolder)
+ (fun cexn -> recordFailure (Choice2Of2 cexn) |> unfake; worker trampolineHolder)
+ tasks.[j].Invoke taskCtxt |> unfake
fake()
- )
for x = 1 to maxDegreeOfParallelism do
- QueueAsync
- innerCTS.Token
- (fun _ -> fake())
- (fun edi -> recordFailure (Choice1Of2 edi))
- (fun cexn -> recordFailure (Choice2Of2 cexn))
- worker
+ let trampolineHolder = new TrampolineHolder()
+ trampolineHolder.QueueWorkItemWithTrampoline (fun () ->
+ worker trampolineHolder)
|> unfake
fake()))
@@ -1293,35 +1290,54 @@ namespace Microsoft.FSharp.Control
| Choice1Of2 computations ->
ProtectedCode ctxt (fun ctxt ->
let ctxtWithSync = DelimitSyncContext ctxt
- let noneCount = ref 0
- let exnCount = ref 0
+ let mutable count = computations.Length
+ let mutable noneCount = 0
+ let mutable someOrExnCount = 0
let innerCts = new LinkedSubSource(ctxtWithSync.token)
let scont (result: 'T option) =
- match result with
- | Some _ ->
- if Interlocked.Increment exnCount = 1 then
- innerCts.Cancel(); ctxtWithSync.trampolineHolder.ExecuteWithTrampoline (fun () -> ctxtWithSync.cont result)
+ let result =
+ match result with
+ | Some _ ->
+ if Interlocked.Increment &someOrExnCount = 1 then
+ innerCts.Cancel(); ctxtWithSync.trampolineHolder.ExecuteWithTrampoline (fun () -> ctxtWithSync.cont result)
+ else
+ fake()
+
+ | None ->
+ if Interlocked.Increment &noneCount = computations.Length then
+ innerCts.Cancel(); ctxtWithSync.trampolineHolder.ExecuteWithTrampoline (fun () -> ctxtWithSync.cont None)
+ else
+ fake()
+
+ if Interlocked.Decrement &count = 0 then
+ innerCts.Dispose()
+
+ result
+
+ let econt (exn: ExceptionDispatchInfo) =
+ let result =
+ if Interlocked.Increment &someOrExnCount = 1 then
+ innerCts.Cancel(); ctxtWithSync.trampolineHolder.ExecuteWithTrampoline (fun () -> ctxtWithSync.econt exn)
else
fake()
- | None ->
- if Interlocked.Increment noneCount = computations.Length then
- innerCts.Cancel(); ctxtWithSync.trampolineHolder.ExecuteWithTrampoline (fun () -> ctxtWithSync.cont None)
+ if Interlocked.Decrement &count = 0 then
+ innerCts.Dispose()
+
+ result
+
+ let ccont (exn: OperationCanceledException) =
+ let result =
+ if Interlocked.Increment &someOrExnCount = 1 then
+ innerCts.Cancel(); ctxtWithSync.trampolineHolder.ExecuteWithTrampoline (fun () -> ctxtWithSync.ccont exn)
else
fake()
- let econt (exn: ExceptionDispatchInfo) =
- if Interlocked.Increment exnCount = 1 then
- innerCts.Cancel(); ctxtWithSync.trampolineHolder.ExecuteWithTrampoline (fun () -> ctxtWithSync.econt exn)
- else
- fake()
+ if Interlocked.Decrement &count = 0 then
+ innerCts.Dispose()
- let ccont (exn: OperationCanceledException) =
- if Interlocked.Increment exnCount = 1 then
- innerCts.Cancel(); ctxtWithSync.trampolineHolder.ExecuteWithTrampoline (fun () -> ctxtWithSync.ccont exn)
- else
- fake()
+ result
for c in computations do
QueueAsync innerCts.Token scont econt ccont c |> unfake
diff --git a/src/fsharp/FSharp.Core/reflect.fs b/src/fsharp/FSharp.Core/reflect.fs
index f9e0a9daa8..0dd38fe225 100644
--- a/src/fsharp/FSharp.Core/reflect.fs
+++ b/src/fsharp/FSharp.Core/reflect.fs
@@ -353,7 +353,7 @@ module internal Impl =
//
// Historically the FSharp.Core reflection utilities get used on implementations of
// System.Type that don't have functionality such as .IsEnum and .FullName fully implemented.
- // This happens particularly over TypeBuilderInstantiation types in the ProvideTypes implementation of System.TYpe
+ // This happens particularly over TypeBuilderInstantiation types in the ProvideTypes implementation of System.Type
// used in F# type providers.
typ.IsGenericType &&
typ.Namespace = "System" &&
diff --git a/src/fsharp/LanguageFeatures.fs b/src/fsharp/LanguageFeatures.fs
index 8f6a873e20..0472582f1b 100644
--- a/src/fsharp/LanguageFeatures.fs
+++ b/src/fsharp/LanguageFeatures.fs
@@ -29,9 +29,8 @@ type LanguageFeature =
| ImplicitYield = 7
| OpenStaticClasses = 8
-
/// LanguageVersion management
-type LanguageVersion (specifiedVersion) =
+type LanguageVersion (specifiedVersionAsString) =
// When we increment language versions here preview is higher than current RTM version
static let languageVersion46 = 4.6m
@@ -44,30 +43,34 @@ type LanguageVersion (specifiedVersion) =
static let validOptions = [| "preview"; "default"; "latest"; "latestmajor" |]
static let languageVersions = set [| languageVersion46; languageVersion47 |]
- static let features = dict [|
- // Add new LanguageVersions here ...
- LanguageFeature.LanguageVersion46, languageVersion46
- LanguageFeature.LanguageVersion47, languageVersion47
- LanguageFeature.PreviewVersion, previewVersion
- LanguageFeature.SingleUnderscorePattern, languageVersion47
- LanguageFeature.WildCardInForLoop, languageVersion47
- LanguageFeature.RelaxWhitespace, languageVersion47
- LanguageFeature.NameOf, previewVersion
- LanguageFeature.ImplicitYield, languageVersion47
- LanguageFeature.OpenStaticClasses, previewVersion
- |]
+ static let features =
+ dict [
+ // Add new LanguageVersions here ...
+ LanguageFeature.LanguageVersion46, languageVersion46
+ LanguageFeature.LanguageVersion47, languageVersion47
+ LanguageFeature.PreviewVersion, previewVersion
+
+ // F# 4.7
+ LanguageFeature.SingleUnderscorePattern, languageVersion47
+ LanguageFeature.WildCardInForLoop, languageVersion47
+ LanguageFeature.RelaxWhitespace, languageVersion47
+ LanguageFeature.ImplicitYield, languageVersion47
+
+ // Add new Language Features here...
+ LanguageFeature.NameOf, previewVersion
+ LanguageFeature.OpenStaticClasses, previewVersion
+ ]
let specified =
- match specifiedVersion with
+ match specifiedVersionAsString with
| "?" -> 0m
| "preview" -> previewVersion
| "default" -> defaultVersion
| "latest" -> latestVersion
| "latestmajor" -> latestMajorVersion
- | _ ->
- match Decimal.TryParse(specifiedVersion) with
- | true, v -> v
- | _ -> 0m
+ | "4.6" -> languageVersion46
+ | "4.7" -> languageVersion47
+ | _ -> 0m
/// Check if this feature is supported by the selected langversion
member __.SupportsFeature featureId =
@@ -79,10 +82,7 @@ type LanguageVersion (specifiedVersion) =
member __.ContainsVersion version =
match version with
| "?" | "preview" | "default" | "latest" | "latestmajor" -> true
- | _ ->
- match Decimal.TryParse(specifiedVersion) with
- | true, v -> languageVersions.Contains v
- | _ -> false
+ | _ -> languageVersions.Contains specified
/// Get a list of valid strings for help text
member __.ValidOptions = validOptions
diff --git a/src/fsharp/PatternMatchCompilation.fs b/src/fsharp/PatternMatchCompilation.fs
index d3c49646c1..5a8eaa6534 100755
--- a/src/fsharp/PatternMatchCompilation.fs
+++ b/src/fsharp/PatternMatchCompilation.fs
@@ -1031,7 +1031,7 @@ let CompilePatternBasic
(isNil origInputValTypars &&
not origInputVal.IsMemberOrModuleBinding &&
not ucref.Tycon.IsStructRecordOrUnionTycon &&
- ucref.UnionCase.RecdFields.Length >= 1 &&
+ ucref.UnionCase.RecdFieldsArray.Length >= 1 &&
ucref.Tycon.UnionCasesArray.Length > 1) ->
let v, vExpr = mkCompGenLocal m "unionCase" (mkProvenUnionCaseTy ucref tinst)
diff --git a/src/fsharp/SignatureConformance.fs b/src/fsharp/SignatureConformance.fs
index b367987e17..0a84d3af5f 100644
--- a/src/fsharp/SignatureConformance.fs
+++ b/src/fsharp/SignatureConformance.fs
@@ -346,8 +346,8 @@ type Checker(g, amap, denv, remapInfo: SignatureRepackageInfo, checkingSig) =
sigUnionCase.OtherRangeOpt <- Some (implUnionCase.Range, true)
implUnionCase.OtherRangeOpt <- Some (sigUnionCase.Range, false)
if implUnionCase.Id.idText <> sigUnionCase.Id.idText then err FSComp.SR.ModuleContainsConstructorButNamesDiffer
- elif implUnionCase.RecdFields.Length <> sigUnionCase.RecdFields.Length then err FSComp.SR.ModuleContainsConstructorButDataFieldsDiffer
- elif not (List.forall2 (checkField aenv) implUnionCase.RecdFields sigUnionCase.RecdFields) then err FSComp.SR.ModuleContainsConstructorButTypesOfFieldsDiffer
+ elif implUnionCase.RecdFieldsArray.Length <> sigUnionCase.RecdFieldsArray.Length then err FSComp.SR.ModuleContainsConstructorButDataFieldsDiffer
+ elif not (Array.forall2 (checkField aenv) implUnionCase.RecdFieldsArray sigUnionCase.RecdFieldsArray) then err FSComp.SR.ModuleContainsConstructorButTypesOfFieldsDiffer
elif isLessAccessible implUnionCase.Accessibility sigUnionCase.Accessibility then err FSComp.SR.ModuleContainsConstructorButAccessibilityDiffers
else checkAttribs aenv implUnionCase.Attribs sigUnionCase.Attribs (fun attribs -> implUnionCase.Attribs <- attribs)
diff --git a/src/fsharp/TastPickle.fs b/src/fsharp/TastPickle.fs
index 4f9d8c6b61..d04a049be9 100644
--- a/src/fsharp/TastPickle.fs
+++ b/src/fsharp/TastPickle.fs
@@ -581,8 +581,7 @@ let u_array_ext extraf f st =
extraItem, arr
let u_list_core f n st =
- [ for _ in 1..n do
- yield f st ]
+ List.init n (fun _ -> f st)
let u_list f st =
let n = u_int st
@@ -1305,11 +1304,23 @@ let u_ILInstr st =
// Pickle/unpickle for F# types and module signatures
//---------------------------------------------------------------------------
-let p_Map pk pv = p_wrap Map.toList (p_list (p_tup2 pk pv))
+let p_Map_core pk pv xs st =
+ xs |> Map.iter (fun k v -> pk k st; pv v st)
+
+let p_Map pk pv x st =
+ p_int (Map.count x) st
+ p_Map_core pk pv x st
+
let p_qlist pv = p_wrap QueueList.toList (p_list pv)
let p_namemap p = p_Map p_string p
-let u_Map uk uv = u_wrap Map.ofList (u_list (u_tup2 uk uv))
+let u_Map_core uk uv n st =
+ Map.ofSeq (seq { for _ in 1..n -> (uk st, uv st) })
+
+let u_Map uk uv st =
+ let n = u_int st
+ u_Map_core uk uv n st
+
let u_qlist uv = u_wrap QueueList.ofList (u_list uv)
let u_namemap u = u_Map u_string u
diff --git a/src/fsharp/TcGlobals.fs b/src/fsharp/TcGlobals.fs
index 38b1e7d1d6..339e8b4b7f 100755
--- a/src/fsharp/TcGlobals.fs
+++ b/src/fsharp/TcGlobals.fs
@@ -26,7 +26,7 @@ open FSharp.Compiler.Features
open Internal.Utilities
-let internal DummyFileNameForRangesWithoutASpecificLocation = "startup"
+let internal DummyFileNameForRangesWithoutASpecificLocation = startupFileName
let private envRange = rangeN DummyFileNameForRangesWithoutASpecificLocation 0
/// Represents an intrinsic value from FSharp.Core known to the compiler
diff --git a/src/fsharp/fscmain.fs b/src/fsharp/fscmain.fs
index 73e578f3de..f4c6b87c28 100644
--- a/src/fsharp/fscmain.fs
+++ b/src/fsharp/fscmain.fs
@@ -77,7 +77,6 @@ let main(argv) =
System.Runtime.GCSettings.LatencyMode <- System.Runtime.GCLatencyMode.Batch
use unwindBuildPhase = PushThreadBuildPhaseUntilUnwind BuildPhase.Parameter
- if not runningOnMono then Lib.UnmanagedProcessExecutionOptions.EnableHeapTerminationOnCorruption() (* SDL recommendation *)
Lib.UnmanagedProcessExecutionOptions.EnableHeapTerminationOnCorruption() (* SDL recommendation *)
try
diff --git a/src/fsharp/fsi/fsi.fs b/src/fsharp/fsi/fsi.fs
index 78b142bd51..c5e71384f1 100644
--- a/src/fsharp/fsi/fsi.fs
+++ b/src/fsharp/fsi/fsi.fs
@@ -950,6 +950,7 @@ type internal FsiDynamicCompiler
let assemblyName = "FSI-ASSEMBLY"
let assemblyReferenceAddedEvent = Control.Event()
+ let valueBoundEvent = Control.Event<_>()
let mutable fragmentId = 0
let mutable prevIt : ValRef option = None
@@ -1155,6 +1156,10 @@ type internal FsiDynamicCompiler
if v.CompiledName = "it" then
itValue <- fsiValueOpt
+ match fsiValueOpt with
+ | Some fsiValue -> valueBoundEvent.Trigger(fsiValue.ReflectionValue, fsiValue.ReflectionType, v.CompiledName)
+ | None -> ()
+
let symbol = FSharpSymbol.Create(cenv, v.Item)
let symbolUse = FSharpSymbolUse(tcGlobals, newState.tcState.TcEnvFromImpls.DisplayEnv, symbol, ItemOccurence.Binding, v.DeclarationLocation)
fsi.TriggerEvaluation (fsiValueOpt, symbolUse, decl)
@@ -1331,6 +1336,8 @@ type internal FsiDynamicCompiler
member __.AssemblyReferenceAdded = assemblyReferenceAddedEvent.Publish
+ member __.ValueBound = valueBoundEvent.Publish
+
//----------------------------------------------------------------------------
// ctrl-c handling
//----------------------------------------------------------------------------
@@ -2222,7 +2229,6 @@ type internal FsiInteractionProcessor
let fsiInteractiveChecker = FsiInteractiveChecker(legacyReferenceResolver, checker, tcConfig, istate.tcGlobals, istate.tcImports, istate.tcState)
fsiInteractiveChecker.ParseAndCheckInteraction(ctok, SourceText.ofString text)
-
//----------------------------------------------------------------------------
// Server mode:
//----------------------------------------------------------------------------
@@ -2630,6 +2636,9 @@ type FsiEvaluationSession (fsi: FsiEvaluationSessionHostConfig, argv:string[], i
/// Event fires every time an assembly reference is added to the execution environment, e.g., via `#r`.
member __.AssemblyReferenceAdded = fsiDynamicCompiler.AssemblyReferenceAdded
+
+ /// Event fires when a root-level value is bound to an identifier, e.g., via `let x = ...`.
+ member __.ValueBound = fsiDynamicCompiler.ValueBound
/// Performs these steps:
/// - Load the dummy interaction, if any
diff --git a/src/fsharp/fsi/fsi.fsi b/src/fsharp/fsi/fsi.fsi
index bed1b74e61..c576a33fbd 100644
--- a/src/fsharp/fsi/fsi.fsi
+++ b/src/fsharp/fsi/fsi.fsi
@@ -237,6 +237,9 @@ type FsiEvaluationSession =
/// Event fires every time an assembly reference is added to the execution environment, e.g., via `#r`.
member AssemblyReferenceAdded : IEvent
+ /// Event fires when a root-level value is bound to an identifier, e.g., via `let x = ...`.
+ member ValueBound : IEvent
+
/// Load the dummy interaction, load the initial files, and,
/// if interacting, start the background thread to read the standard input.
///
diff --git a/src/fsharp/lib.fs b/src/fsharp/lib.fs
index 7ed3521ca3..fba1c975e8 100755
--- a/src/fsharp/lib.fs
+++ b/src/fsharp/lib.fs
@@ -4,6 +4,7 @@ module internal FSharp.Compiler.Lib
open System.IO
open System.Collections.Generic
+open System.Runtime.InteropServices
open Internal.Utilities
open FSharp.Compiler.AbstractIL.Internal
open FSharp.Compiler.AbstractIL.Internal.Library
@@ -518,7 +519,7 @@ module UnmanagedProcessExecutionOptions =
// Translation of C# from http://swikb/v1/DisplayOnlineDoc.aspx?entryID=826 and copy in bug://5018
[]
let EnableHeapTerminationOnCorruption() =
- if (System.Environment.OSVersion.Version.Major >= 6 && // If OS is Vista or higher
+ if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && System.Environment.OSVersion.Version.Major >= 6 && // If OS is Vista or higher
System.Environment.Version.Major < 3) then // and CLR not 3.0 or higher
// "The flag HeapSetInformation sets is available in Windows XP SP3 and later.
// The data structure used for heap information is available on earlier versions of Windows.
@@ -547,4 +548,4 @@ module StackGuard =
let EnsureSufficientExecutionStack recursionDepth =
if recursionDepth > MaxUncheckedRecursionDepth then
- RuntimeHelpers.EnsureSufficientExecutionStack ()
\ No newline at end of file
+ RuntimeHelpers.EnsureSufficientExecutionStack ()
diff --git a/src/fsharp/pars.fsy b/src/fsharp/pars.fsy
index 8a4988935c..749c8dd5e3 100644
--- a/src/fsharp/pars.fsy
+++ b/src/fsharp/pars.fsy
@@ -788,7 +788,7 @@ optLiteralValueSpfn:
| EQUALS declExpr
{ Some($2) }
- | EQUALS OBLOCKBEGIN declExpr oblockend
+ | EQUALS OBLOCKBEGIN declExpr oblockend opt_ODECLEND
{ Some($3) }
diff --git a/src/fsharp/range.fs b/src/fsharp/range.fs
index e9b44a6397..2de5498d55 100755
--- a/src/fsharp/range.fs
+++ b/src/fsharp/range.fs
@@ -200,6 +200,10 @@ let fileOfFileIndex idx = fileIndexTable.IndexToFile idx
let mkPos l c = pos (l, c)
+let unknownFileName = "unknown"
+let startupFileName = "startup"
+let commandLineArgsFileName = "commandLineArgs"
+
[]
#if DEBUG
[ {DebugCode}")>]
@@ -249,6 +253,9 @@ type range(code1:int64, code2: int64) =
#if DEBUG
member r.DebugCode =
+ let name = r.FileName
+ if name = unknownFileName || name = startupFileName || name = commandLineArgsFileName then name else
+
try
let endCol = r.EndColumn - 1
let startCol = r.StartColumn - 1
@@ -323,11 +330,11 @@ let rangeN filename line = mkRange filename (mkPos line 0) (mkPos line 0)
let pos0 = mkPos 1 0
-let range0 = rangeN "unknown" 1
+let range0 = rangeN unknownFileName 1
-let rangeStartup = rangeN "startup" 1
+let rangeStartup = rangeN startupFileName 1
-let rangeCmdArgs = rangeN "commandLineArgs" 0
+let rangeCmdArgs = rangeN commandLineArgsFileName 0
let trimRangeToLine (r:range) =
let startL, startC = r.StartLine, r.StartColumn
diff --git a/src/fsharp/range.fsi b/src/fsharp/range.fsi
index 6bc7ddf5b7..fdb63ec2a2 100755
--- a/src/fsharp/range.fsi
+++ b/src/fsharp/range.fsi
@@ -44,6 +44,10 @@ val mkPos : line:int -> column:int -> pos
/// Ordering on positions
val posOrder : IComparer
+val unknownFileName: string
+val startupFileName: string
+val commandLineArgsFileName: string
+
/// Represents a range within a known file
[]
type range =
diff --git a/src/fsharp/service/FSharpCheckerResults.fs b/src/fsharp/service/FSharpCheckerResults.fs
index c3990eb132..ab8ee3d216 100644
--- a/src/fsharp/service/FSharpCheckerResults.fs
+++ b/src/fsharp/service/FSharpCheckerResults.fs
@@ -2209,7 +2209,7 @@ type FsiInteractiveChecker(legacyReferenceResolver,
let backgroundDiagnostics = [| |]
let reduceMemoryUsage = ReduceMemoryFlag.Yes
- let assumeDotNetFramework = true
+ let assumeDotNetFramework = tcConfig.primaryAssembly = PrimaryAssembly.Mscorlib
let applyCompilerOptions tcConfigB =
let fsiCompilerOptions = CompileOptions.GetCoreFsiCompilerOptions tcConfigB
diff --git a/src/fsharp/symbols/Symbols.fs b/src/fsharp/symbols/Symbols.fs
index add09769d6..d46313cb37 100755
--- a/src/fsharp/symbols/Symbols.fs
+++ b/src/fsharp/symbols/Symbols.fs
@@ -781,9 +781,13 @@ and FSharpUnionCase(cenv, v: UnionCaseRef) =
checkIsResolved()
v.Range
+ member __.HasFields =
+ if isUnresolved() then false else
+ v.UnionCase.RecdFieldsArray.Length <> 0
+
member __.UnionCaseFields =
if isUnresolved() then makeReadOnlyCollection [] else
- v.UnionCase.RecdFields |> List.mapi (fun i _ -> FSharpField(cenv, FSharpFieldData.Union (v, i))) |> makeReadOnlyCollection
+ v.UnionCase.RecdFieldsArray |> Array.mapi (fun i _ -> FSharpField(cenv, FSharpFieldData.Union (v, i))) |> makeReadOnlyCollection
member __.ReturnType =
checkIsResolved()
diff --git a/src/fsharp/symbols/Symbols.fsi b/src/fsharp/symbols/Symbols.fsi
index 19df3cd26a..6893097ed9 100644
--- a/src/fsharp/symbols/Symbols.fsi
+++ b/src/fsharp/symbols/Symbols.fsi
@@ -382,6 +382,9 @@ and [] public FSharpUnionCase =
/// Get the range of the name of the case
member DeclarationLocation : range
+ /// Indicates if the union case has field definitions
+ member HasFields: bool
+
/// Get the data carried by the case.
member UnionCaseFields: IList
diff --git a/tests/FSharp.Compiler.Private.Scripting.UnitTests/CompletionTests.fs b/tests/FSharp.Compiler.Private.Scripting.UnitTests/CompletionTests.fs
new file mode 100644
index 0000000000..cd7da3c7d3
--- /dev/null
+++ b/tests/FSharp.Compiler.Private.Scripting.UnitTests/CompletionTests.fs
@@ -0,0 +1,71 @@
+// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
+
+namespace FSharp.Compiler.Scripting.UnitTests
+
+open System
+open System.Threading.Tasks
+open FSharp.Compiler.Scripting
+open NUnit.Framework
+
+[]
+type CompletionTests() =
+
+ []
+ member _.``Instance completions in the same submission``() =
+ async {
+ use script = new FSharpScript()
+ let lines = [ "let x = 1"
+ "x." ]
+ let! completions = script.GetCompletionItems(String.Join("\n", lines), 2, 2)
+ let matchingCompletions = completions |> Array.filter (fun d -> d.Name = "CompareTo")
+ Assert.AreEqual(1, matchingCompletions.Length)
+ } |> Async.StartAsTask :> Task
+
+ []
+ member _.``Instance completions from a previous submission``() =
+ async {
+ use script = new FSharpScript()
+ script.Eval("let x = 1") |> ignoreValue
+ let! completions = script.GetCompletionItems("x.", 1, 2)
+ let matchingCompletions = completions |> Array.filter (fun d -> d.Name = "CompareTo")
+ Assert.AreEqual(1, matchingCompletions.Length)
+ } |> Async.StartAsTask :> Task
+
+ []
+ member _.``Static member completions``() =
+ async {
+ use script = new FSharpScript()
+ let! completions = script.GetCompletionItems("System.String.", 1, 14)
+ let matchingCompletions = completions |> Array.filter (fun d -> d.Name = "Join")
+ Assert.GreaterOrEqual(matchingCompletions.Length, 1)
+ } |> Async.StartAsTask :> Task
+
+ []
+ member _.``Type completions from namespace``() =
+ async {
+ use script = new FSharpScript()
+ let! completions = script.GetCompletionItems("System.", 1, 7)
+ let matchingCompletions = completions |> Array.filter (fun d -> d.Name = "String")
+ Assert.GreaterOrEqual(matchingCompletions.Length, 1)
+ } |> Async.StartAsTask :> Task
+
+ []
+ member _.``Namespace completions``() =
+ async {
+ use script = new FSharpScript()
+ let! completions = script.GetCompletionItems("System.", 1, 7)
+ let matchingCompletions = completions |> Array.filter (fun d -> d.Name = "Collections")
+ Assert.AreEqual(1, matchingCompletions.Length)
+ } |> Async.StartAsTask :> Task
+
+ []
+ member _.``Extension method completions``() =
+ async {
+ use script = new FSharpScript()
+ let lines = [ "open System.Linq"
+ "let list = new System.Collections.Generic.List()"
+ "list." ]
+ let! completions = script.GetCompletionItems(String.Join("\n", lines), 3, 5)
+ let matchingCompletions = completions |> Array.filter (fun d -> d.Name = "Select")
+ Assert.AreEqual(1, matchingCompletions.Length)
+ } |> Async.StartAsTask :> Task
diff --git a/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharp.Compiler.Private.Scripting.UnitTests.fsproj b/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharp.Compiler.Private.Scripting.UnitTests.fsproj
index 51beecf2af..7ecca98b7c 100644
--- a/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharp.Compiler.Private.Scripting.UnitTests.fsproj
+++ b/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharp.Compiler.Private.Scripting.UnitTests.fsproj
@@ -11,7 +11,9 @@
+
+
diff --git a/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharpScriptTests.fs b/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharpScriptTests.fs
index dfd66473f0..5a57392031 100644
--- a/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharpScriptTests.fs
+++ b/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharpScriptTests.fs
@@ -7,21 +7,11 @@ open System.IO
open System.Threading
open FSharp.Compiler.Interactive.Shell
open FSharp.Compiler.Scripting
-open FSharp.Compiler.SourceCodeServices
open NUnit.Framework
[]
type InteractiveTests() =
- let getValue ((value: Result), (errors: FSharpErrorInfo[])) =
- if errors.Length > 0 then
- failwith <| sprintf "Evaluation returned %d errors:\r\n\t%s" errors.Length (String.Join("\r\n\t", errors))
- match value with
- | Ok(value) -> value
- | Error ex -> raise ex
-
- let ignoreValue = getValue >> ignore
-
[]
member __.``Eval object value``() =
use script = new FSharpScript()
@@ -82,3 +72,89 @@ type InteractiveTests() =
let _result, errors = script.Eval(sprintf "#r \"%s\"" testAssembly)
Assert.AreEqual(1, errors.Length)
Assert.False(foundAssemblyReference)
+
+ []
+ member _.``Compilation errors report a specific exception``() =
+ use script = new FSharpScript()
+ let result, _errors = script.Eval("abc")
+ match result with
+ | Ok(_) -> Assert.Fail("expected a failure")
+ | Error(ex) -> Assert.IsInstanceOf(ex)
+
+ []
+ member _.``Runtime exceptions are propagated``() =
+ use script = new FSharpScript()
+ let result, errors = script.Eval("System.IO.File.ReadAllText(\"not-a-file-path-that-can-be-found-on-disk.txt\")")
+ Assert.IsEmpty(errors)
+ match result with
+ | Ok(_) -> Assert.Fail("expected a failure")
+ | Error(ex) -> Assert.IsInstanceOf(ex)
+
+ []
+ member _.``Evaluation can be cancelled``() =
+ use script = new FSharpScript()
+ let sleepTime = 10000
+ let mutable result = None
+ let mutable wasCancelled = false
+ use tokenSource = new CancellationTokenSource()
+ let eval () =
+ try
+ result <- Some(script.Eval(sprintf "System.Threading.Thread.Sleep(%d)\n2" sleepTime, tokenSource.Token))
+ // if execution gets here (which it shouldn't), the value `2` will be returned
+ with
+ | :? OperationCanceledException -> wasCancelled <- true
+ let sw = Stopwatch.StartNew()
+ let evalTask = Task.Run(eval)
+ // cancel and wait for finish
+ tokenSource.Cancel()
+ evalTask.GetAwaiter().GetResult()
+ // ensure we cancelled and didn't complete the sleep or evaluation
+ Assert.True(wasCancelled)
+ Assert.LessOrEqual(sw.ElapsedMilliseconds, sleepTime)
+ Assert.AreEqual(None, result)
+
+ []
+ member _.``Values bound at the root trigger an event``() =
+ let mutable foundX = false
+ let mutable foundY = false
+ let mutable foundCount = 0
+ use script = new FSharpScript()
+ script.ValueBound
+ |> Event.add (fun (value, typ, name) ->
+ foundX <- foundX || (name = "x" && typ = typeof && value :?> int = 1)
+ foundY <- foundY || (name = "y" && typ = typeof && value :?> int = 2)
+ foundCount <- foundCount + 1)
+ let code = @"
+let x = 1
+let y = 2
+"
+ script.Eval(code) |> ignoreValue
+ Assert.True(foundX)
+ Assert.True(foundY)
+ Assert.AreEqual(2, foundCount)
+
+ []
+ member _.``Values re-bound trigger an event``() =
+ let mutable foundXCount = 0
+ use script = new FSharpScript()
+ script.ValueBound
+ |> Event.add (fun (_value, typ, name) ->
+ if name = "x" && typ = typeof then foundXCount <- foundXCount + 1)
+ script.Eval("let x = 1") |> ignoreValue
+ script.Eval("let x = 2") |> ignoreValue
+ Assert.AreEqual(2, foundXCount)
+
+ []
+ member _.``Nested let bindings don't trigger event``() =
+ let mutable foundInner = false
+ use script = new FSharpScript()
+ script.ValueBound
+ |> Event.add (fun (_value, _typ, name) ->
+ foundInner <- foundInner || name = "inner")
+ let code = @"
+let x =
+ let inner = 1
+ ()
+"
+ script.Eval(code) |> ignoreValue
+ Assert.False(foundInner)
diff --git a/tests/FSharp.Compiler.Private.Scripting.UnitTests/TestHelpers.fs b/tests/FSharp.Compiler.Private.Scripting.UnitTests/TestHelpers.fs
new file mode 100644
index 0000000000..9238ff490a
--- /dev/null
+++ b/tests/FSharp.Compiler.Private.Scripting.UnitTests/TestHelpers.fs
@@ -0,0 +1,19 @@
+// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
+
+namespace FSharp.Compiler.Scripting.UnitTests
+
+open System
+open FSharp.Compiler.Interactive.Shell
+open FSharp.Compiler.SourceCodeServices
+
+[]
+module TestHelpers =
+
+ let getValue ((value: Result), (errors: FSharpErrorInfo[])) =
+ if errors.Length > 0 then
+ failwith <| sprintf "Evaluation returned %d errors:\r\n\t%s" errors.Length (String.Join("\r\n\t", errors))
+ match value with
+ | Ok(value) -> value
+ | Error ex -> raise ex
+
+ let ignoreValue = getValue >> ignore
diff --git a/tests/fsharp/typecheck/sigs/pos33.fs b/tests/fsharp/typecheck/sigs/pos33.fs
new file mode 100644
index 0000000000..716dfc54a3
--- /dev/null
+++ b/tests/fsharp/typecheck/sigs/pos33.fs
@@ -0,0 +1,11 @@
+module Pos33
+
+let x = 1
+[]
+let y = 1
+let z = 1
+[]
+let w = "w"
+let q = "q"
+[]
+let u = "u"
\ No newline at end of file
diff --git a/tests/fsharp/typecheck/sigs/pos33.fsi b/tests/fsharp/typecheck/sigs/pos33.fsi
new file mode 100644
index 0000000000..3ba98f32d9
--- /dev/null
+++ b/tests/fsharp/typecheck/sigs/pos33.fsi
@@ -0,0 +1,12 @@
+module Pos33
+
+val x : int
+[]
+val y : int = 1
+val z : int
+[]
+val w : string = "w"
+val q : string
+[]
+val u : string =
+ "u"
\ No newline at end of file