Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge release/dev16.3 to release/fsharp47 #7105

Merged
34 commits merged into from
Jul 4, 2019
Merged
Changes from 2 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
08061bc
Merge pull request #6990 from dotnet/merges/release/dev16.2-to-releas…
brettfo Jun 12, 2019
d445116
update version number for VS 16.3 (#6991)
brettfo Jun 13, 2019
fd17050
Merge pull request #7005 from dotnet/merges/master-to-release/dev16.3
brettfo Jun 17, 2019
27d65e4
Merge pull request #7004 from dotnet/merges/release/dev16.2-to-releas…
brettfo Jun 17, 2019
ce98492
properly fail the build on unix failures (#7015)
brettfo Jun 18, 2019
cb880d5
Fixed line directive ranges when not applying a line directive (#7011)
TIHan Jun 18, 2019
b900968
Remove IVTs to legacy language service (#7001)
cartermp Jun 19, 2019
66a209a
[master] Update dependencies from dotnet/arcade (#7013)
dotnet-maestro[bot] Jun 19, 2019
51684d4
Add get/set to item description tooltip (#7016)
cartermp Jun 20, 2019
fa5ef91
[master] Update dependencies from dotnet/arcade (#7023)
dotnet-maestro[bot] Jun 21, 2019
1a1ae4b
Merge pull request #7029 from dotnet/merges/master-to-release/dev16.3
Jun 21, 2019
5289eb0
Merge pull request #7028 from dotnet/merges/release/dev16.2-to-releas…
Jun 21, 2019
4d15e56
update package versions for 16.1 (#6994)
brettfo Jun 22, 2019
7ee0b8c
Merge pull request #7042 from dotnet/merges/master-to-release/dev16.3
brettfo Jun 22, 2019
6633abe
Update dependencies from https://github.com/dotnet/arcade build 20190…
dotnet-maestro[bot] Jun 22, 2019
4f6aecc
Update dependencies from https://github.com/dotnet/arcade build 20190…
Jun 23, 2019
5e68e76
Update dependencies from https://github.com/dotnet/arcade build 20190…
Jun 24, 2019
0de649d
Ignore ionide (#7059)
forki Jun 25, 2019
e2693ce
Merge pull request #7053 from dotnet/darc-master-ee187335-5c39-4328-9…
KevinRansom Jun 25, 2019
108428b
Update several links (#7055)
milbrandt Jun 25, 2019
6d69922
Remove dead code (#7068)
forki Jun 27, 2019
86f8b17
Avoid allocating in IsOperatorName (#7061)
forki Jun 27, 2019
c3b6dff
Fix build GenerateDocs (#7054)
milbrandt Jun 27, 2019
6af64a7
List.transpose should throw error when given jagged array (#6908) (#6…
PatrickMcDonald Jun 27, 2019
010bd00
Added -noVisualStudio flag for build.cmd. (#7071)
TIHan Jun 28, 2019
5a8f454
Use a MaxBuffer for Suggestions (#7060)
forki Jun 28, 2019
459162b
Merge pull request #7084 from dotnet/merges/master-to-release/dev16.3
Jul 1, 2019
5306722
Update dependencies from https://github.com/dotnet/arcade build 20190…
dotnet-maestro[bot] Jul 1, 2019
787d4c5
Merge pull request #7092 from dotnet/merges/master-to-release/dev16.3
Jul 2, 2019
4d724f2
Reorder and clarify devguide (#7082)
cartermp Jul 2, 2019
d7cee80
Merge pull request #7094 from dotnet/merges/master-to-release/dev16.3
Jul 2, 2019
f878da6
Update dependencies from https://github.com/dotnet/arcade build 20190…
dotnet-maestro[bot] Jul 2, 2019
d51ae07
Merge pull request #7100 from dotnet/merges/master-to-release/dev16.3
Jul 3, 2019
7891cbd
Merge branch 'release/fsharp47' into merges/release/dev16.3-to-releas…
KevinRansom Jul 3, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion NuGet.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<solution>
<add key="disableSourceControlIntegration" value="true" />
4 changes: 2 additions & 2 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
@@ -3,9 +3,9 @@
<ProductDependencies>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19323.4">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19330.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>9946534da4f73e6242ca105f6798ab58119c9ab0</Sha>
<Sha>89fab80685c91024c8f9e21f1c37f62580f648f8</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>
28 changes: 28 additions & 0 deletions eng/common/post-build/nuget-validation.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This script validates NuGet package metadata information using this
# tool: https://github.com/NuGet/NuGetGallery/tree/jver-verify/src/VerifyMicrosoftPackage

param(
[Parameter(Mandatory=$true)][string] $PackagesPath, # Path to where the packages to be validated are
[Parameter(Mandatory=$true)][string] $ToolDestinationPath # Where the validation tool should be downloaded to
)

$ErrorActionPreference = "Stop"
Set-StrictMode -Version 2.0

. $PSScriptRoot\..\tools.ps1

try {
$url = "https://raw.githubusercontent.com/NuGet/NuGetGallery/jver-verify/src/VerifyMicrosoftPackage/verify.ps1"

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
ExitWithExitCode 1
}
53 changes: 53 additions & 0 deletions eng/common/post-build/promote-build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
param(
[Parameter(Mandatory=$true)][int] $BuildId,
[Parameter(Mandatory=$true)][int] $ChannelId,
[Parameter(Mandatory=$true)][string] $BarToken,
[string] $MaestroEndpoint = "https://maestro-prod.westus2.cloudapp.azure.com",
[string] $ApiVersion = "2019-01-16"
)

$ErrorActionPreference = "Stop"
Set-StrictMode -Version 2.0

. $PSScriptRoot\..\tools.ps1

function Get-Headers([string]$accept, [string]$barToken) {
$headers = New-Object 'System.Collections.Generic.Dictionary[[String],[String]]'
$headers.Add('Accept',$accept)
$headers.Add('Authorization',"Bearer $barToken")
return $headers
}

try {
$maestroHeaders = Get-Headers 'application/json' $BarToken

# Get info about which channels the build has already been promoted to
$getBuildApiEndpoint = "$MaestroEndpoint/api/builds/${BuildId}?api-version=$ApiVersion"
$buildInfo = Invoke-WebRequest -Method Get -Uri $getBuildApiEndpoint -Headers $maestroHeaders | ConvertFrom-Json

if (!$buildInfo) {
Write-Host "Build with BAR ID $BuildId was not found in BAR!"
ExitWithExitCode 1
}

# Find whether the build is already assigned to the channel or not
if ($buildInfo.channels) {
foreach ($channel in $buildInfo.channels) {
if ($channel.Id -eq $ChannelId) {
Write-Host "The build with BAR ID $BuildId is already on channel $ChannelId!"
ExitWithExitCode 0
}
}
}

Write-Host "Build not present in channel $ChannelId. Promoting build ... "

$promoteBuildApiEndpoint = "$maestroEndpoint/api/channels/${ChannelId}/builds/${BuildId}?api-version=$ApiVersion"
Invoke-WebRequest -Method Post -Uri $promoteBuildApiEndpoint -Headers $maestroHeaders
Write-Host "done."
}
catch {
Write-Host "There was an error while trying to promote build '$BuildId' to channel '$ChannelId'"
Write-Host $_
Write-Host $_.ScriptStackTrace
}
28 changes: 14 additions & 14 deletions eng/common/post-build/sourcelink-validation.ps1
Original file line number Diff line number Diff line change
@@ -11,13 +11,13 @@ Set-StrictMode -Version 2.0

. $PSScriptRoot\..\tools.ps1

# Cache/HashMap (File -> Exist flag) used to consult whether a file exist
# 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(
param(
[string] $PackagePath # Full path to a Symbols.NuGet package
)

@@ -32,7 +32,7 @@ $ValidatePackage = {
# 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)
@@ -46,13 +46,13 @@ $ValidatePackage = {
try {
$zip = [System.IO.Compression.ZipFile]::OpenRead($PackagePath)

$zip.Entries |
$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
$TargetFile = Join-Path -Path $ExtractPath -ChildPath $FakeName

# We ignore resource DLLs
if ($FileName.EndsWith(".resources.dll")) {
@@ -62,7 +62,7 @@ $ValidatePackage = {
[System.IO.Compression.ZipFileExtensions]::ExtractToFile($_, $TargetFile, $true)

$ValidateFile = {
param(
param(
[string] $FullPath, # Full path to the module that has to be checked
[string] $RealPath,
[ref] $FailedFiles
@@ -83,15 +83,15 @@ $ValidatePackage = {
ForEach-Object {
$Link = $_
$CommitUrl = "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" -or $Uri.Host -match "githubusercontent")) {
$Status = (Invoke-WebRequest -Uri $Link -UseBasicParsing -Method HEAD -TimeoutSec 5).StatusCode
@@ -128,15 +128,15 @@ $ValidatePackage = {
}
}
}

&$ValidateFile $TargetFile $FileName ([ref]$FailedFiles)
}
}
catch {

}
finally {
$zip.Dispose()
$zip.Dispose()
}

if ($FailedFiles -eq 0) {
@@ -163,13 +163,13 @@ function ValidateSourceLinkLinks {
ExitWithExitCode 1
}

$RepoTreeURL = -Join("https://api.github.com/repos/", $GHRepoName, "/git/trees/", $GHCommit, "?recursive=1")
$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
$Data = Invoke-WebRequest $RepoTreeURL -UseBasicParsing | ConvertFrom-Json | Select-Object -ExpandProperty tree

foreach ($file in $Data) {
$Extension = [System.IO.Path]::GetExtension($file.path)

@@ -183,7 +183,7 @@ function ValidateSourceLinkLinks {
Write-Host $_
ExitWithExitCode 1
}

if (Test-Path $ExtractPath) {
Remove-Item $ExtractPath -Force -Recurse -ErrorAction SilentlyContinue
}
69 changes: 69 additions & 0 deletions eng/common/post-build/trigger-subscriptions.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
param(
[Parameter(Mandatory=$true)][string] $SourceRepo,
[Parameter(Mandatory=$true)][int] $ChannelId,
[string] $MaestroEndpoint = "https://maestro-prod.westus2.cloudapp.azure.com",
[string] $BarToken,
[string] $ApiVersion = "2019-01-16"
)

$ErrorActionPreference = "Stop"
Set-StrictMode -Version 2.0

. $PSScriptRoot\..\tools.ps1

function Get-Headers([string]$accept, [string]$barToken) {
$headers = New-Object 'System.Collections.Generic.Dictionary[[String],[String]]'
$headers.Add('Accept',$accept)
$headers.Add('Authorization',"Bearer $barToken")
return $headers
}

# Get all the $SourceRepo subscriptions
$normalizedSurceRepo = $SourceRepo.Replace('dnceng@', '')
$getSubscriptionsApiEndpoint = "$maestroEndpoint/api/subscriptions?sourceRepository=$normalizedSurceRepo&api-version=$apiVersion"
$headers = Get-Headers 'application/json' $barToken

$subscriptions = Invoke-WebRequest -Uri $getSubscriptionsApiEndpoint -Headers $headers | ConvertFrom-Json

if (!$subscriptions) {
Write-Host "No subscriptions found for source repo '$normalizedSurceRepo' in channel '$ChannelId'"
return
}

$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 "$subscription.id"
[void]$subscriptionsToTrigger.Add($subscription.id)
}
}

foreach ($subscriptionToTrigger in $subscriptionsToTrigger) {
try {
$triggerSubscriptionApiEndpoint = "$maestroEndpoint/api/subscriptions/$subscriptionToTrigger/trigger?api-version=$apiVersion"
$headers = Get-Headers 'application/json' $BarToken

Write-Host "Triggering subscription '$subscriptionToTrigger'..."

Invoke-WebRequest -Uri $triggerSubscriptionApiEndpoint -Headers $headers -Method Post

Write-Host "Subscription '$subscriptionToTrigger' triggered!"
}
catch
{
Write-Host "There was an error while triggering subscription '$subscriptionToTrigger'"
Write-Host $_
Write-Host $_.ScriptStackTrace
$failedTriggeredSubscription = $true
}
}

if ($failedTriggeredSubscription) {
Write-Host "At least one subscription failed to be triggered..."
ExitWithExitCode 1
}

Write-Host "All subscriptions were triggered successfully!"
70 changes: 70 additions & 0 deletions eng/common/sdl/extract-artifact-packages.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
param(
[Parameter(Mandatory=$true)][string] $InputPath, # Full path to directory where artifact packages are stored
[Parameter(Mandatory=$true)][string] $ExtractPath # Full path to directory where the packages will be extracted
)

$ErrorActionPreference = "Stop"
Set-StrictMode -Version 2.0
$ExtractPackage = {
param(
[string] $PackagePath # Full path to a NuGet package
)

if (!(Test-Path $PackagePath)) {
Write-PipelineTaskError "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 {

}
finally {
$zip.Dispose()
}
}
function ExtractArtifacts {
if (!(Test-Path $InputPath)) {
Write-Host "Input Path does not exist: $InputPath"
ExitWithExitCode 0
}
$Jobs = @()
Get-ChildItem "$InputPath\*.nupkg" |
ForEach-Object {
$Jobs += Start-Job -ScriptBlock $ExtractPackage -ArgumentList $_.FullName
}

foreach ($Job in $Jobs) {
Wait-Job -Id $Job.Id | Receive-Job
}
}

try {
Measure-Command { ExtractArtifacts }
}
catch {
Write-Host $_
Write-Host $_.Exception
Write-Host $_.ScriptStackTrace
ExitWithExitCode 1
}
2 changes: 1 addition & 1 deletion eng/common/sdl/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Guardian.Cli" version="0.3.2"/>
<package id="Microsoft.Guardian.Cli" version="0.6.0"/>
</packages>
12 changes: 11 additions & 1 deletion eng/common/templates/job/execute-sdl.yml
Original file line number Diff line number Diff line change
@@ -20,6 +20,16 @@ jobs:
downloadType: specific files
matchingPattern: "**"
downloadPath: $(Build.SourcesDirectory)\artifacts
- powershell: eng/common/sdl/extract-artifact-packages.ps1
-InputPath $(Build.SourcesDirectory)\artifacts\BlobArtifacts
-ExtractPath $(Build.SourcesDirectory)\artifacts\BlobArtifacts
displayName: Extract Blob Artifacts
continueOnError: ${{ parameters.continueOnError }}
- powershell: eng/common/sdl/extract-artifact-packages.ps1
-InputPath $(Build.SourcesDirectory)\artifacts\PackageArtifacts
-ExtractPath $(Build.SourcesDirectory)\artifacts\PackageArtifacts
displayName: Extract Package Artifacts
continueOnError: ${{ parameters.continueOnError }}
- task: NuGetToolInstaller@1
displayName: 'Install NuGet.exe'
- task: NuGetCommand@2
@@ -36,7 +46,7 @@ jobs:
continueOnError: ${{ parameters.continueOnError }}
- ${{ if eq(parameters.overrideParameters, '') }}:
- powershell: eng/common/sdl/execute-all-sdl-tools.ps1
-GuardianPackageName Microsoft.Guardian.Cli.0.3.2
-GuardianPackageName Microsoft.Guardian.Cli.0.6.0
-NugetPackageDirectory $(Build.SourcesDirectory)\.packages
-AzureDevOpsAccessToken $(dn-bot-dotnet-build-rw-code-rw)
${{ parameters.additionalParameters }}
1 change: 0 additions & 1 deletion eng/common/templates/job/publish-build-assets.yml
Original file line number Diff line number Diff line change
@@ -66,7 +66,6 @@ jobs:
script: |
Add-Content -Path "$(Build.StagingDirectory)/ReleaseConfigs.txt" -Value $(BARBuildId)
Add-Content -Path "$(Build.StagingDirectory)/ReleaseConfigs.txt" -Value "$(DefaultChannels)"
Add-Content -Path "$(Build.StagingDirectory)/ReleaseConfigs.txt" -Value $(IsInternalBuild)
Add-Content -Path "$(Build.StagingDirectory)/ReleaseConfigs.txt" -Value $(IsStableBuild)
- task: PublishBuildArtifacts@1
displayName: Publish ReleaseConfigs Artifact
Loading