diff options
author | dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com> | 2019-06-29 17:20:02 -0700 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2019-06-29 17:20:02 -0700 |
commit | 38062e08800bcff835aa1982e0d0f8de5779c748 (patch) | |
tree | e774486b0c524c5b6c7c8e25cb19b59bfc36ab35 | |
parent | 1254599f2be58e870a96aeda3fc2496f84af3b51 (diff) | |
download | coreclr-38062e08800bcff835aa1982e0d0f8de5779c748.tar.gz coreclr-38062e08800bcff835aa1982e0d0f8de5779c748.tar.bz2 coreclr-38062e08800bcff835aa1982e0d0f8de5779c748.zip |
[master] Update dependencies from dotnet/arcade (#25476)
- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19328.2
- Microsoft.DotNet.Build.Tasks.Feed - 2.2.0-beta.19328.2
- Microsoft.DotNet.Build.Tasks.Packaging - 1.0.0-beta.19328.2
- Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19328.2
-rw-r--r-- | eng/Version.Details.xml | 16 | ||||
-rw-r--r-- | eng/Versions.props | 4 | ||||
-rw-r--r-- | eng/common/post-build/nuget-validation.ps1 | 28 | ||||
-rw-r--r-- | eng/common/post-build/trigger-subscriptions.ps1 | 69 | ||||
-rw-r--r-- | eng/common/sdl/extract-artifact-packages.ps1 | 4 | ||||
-rw-r--r-- | eng/common/templates/post-build/channels/internal-servicing.yml | 9 | ||||
-rw-r--r-- | eng/common/templates/post-build/channels/public-release.yml | 5 | ||||
-rw-r--r-- | eng/common/templates/post-build/post-build.yml | 20 | ||||
-rw-r--r-- | eng/common/templates/post-build/trigger-subscription.yml | 11 | ||||
-rw-r--r-- | global.json | 4 |
10 files changed, 154 insertions, 16 deletions
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 72ca03ec54..ae098e6ecd 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -3,21 +3,21 @@ <ProductDependencies> </ProductDependencies> <ToolsetDependencies> - <Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19326.44"> + <Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19328.2"> <Uri>https://github.com/dotnet/arcade</Uri> - <Sha>d39a62deaf3aa4e03c0b7dadc320a517e0e00187</Sha> + <Sha>a68bcce61fa64598cbd30c00780b1f6ca8e7a9ef</Sha> </Dependency> - <Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="2.0.0-beta.19326.44"> + <Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="2.0.0-beta.19328.2"> <Uri>https://github.com/dotnet/arcade</Uri> - <Sha>d39a62deaf3aa4e03c0b7dadc320a517e0e00187</Sha> + <Sha>a68bcce61fa64598cbd30c00780b1f6ca8e7a9ef</Sha> </Dependency> - <Dependency Name="Microsoft.DotNet.Build.Tasks.Feed" Version="2.2.0-beta.19326.44"> + <Dependency Name="Microsoft.DotNet.Build.Tasks.Feed" Version="2.2.0-beta.19328.2"> <Uri>https://github.com/dotnet/arcade</Uri> - <Sha>d39a62deaf3aa4e03c0b7dadc320a517e0e00187</Sha> + <Sha>a68bcce61fa64598cbd30c00780b1f6ca8e7a9ef</Sha> </Dependency> - <Dependency Name="Microsoft.DotNet.Build.Tasks.Packaging" Version="1.0.0-beta.19326.44"> + <Dependency Name="Microsoft.DotNet.Build.Tasks.Packaging" Version="1.0.0-beta.19328.2"> <Uri>https://github.com/dotnet/arcade</Uri> - <Sha>d39a62deaf3aa4e03c0b7dadc320a517e0e00187</Sha> + <Sha>a68bcce61fa64598cbd30c00780b1f6ca8e7a9ef</Sha> </Dependency> <Dependency Name="Microsoft.Private.CoreFx.NETCoreApp" Version="4.6.0-preview8.19327.9"> <Uri>https://github.com/dotnet/corefx</Uri> diff --git a/eng/Versions.props b/eng/Versions.props index 6c7477435d..ad6ee9a1f0 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -14,8 +14,8 @@ <UsingToolXliff>false</UsingToolXliff> <!-- Package versions --> <!-- arcade --> - <MicrosoftDotNetBuildTasksFeedVersion>2.2.0-beta.19326.44</MicrosoftDotNetBuildTasksFeedVersion> - <MicrosoftDotNetBuildTasksPackagingVersion>1.0.0-beta.19326.44</MicrosoftDotNetBuildTasksPackagingVersion> + <MicrosoftDotNetBuildTasksFeedVersion>2.2.0-beta.19328.2</MicrosoftDotNetBuildTasksFeedVersion> + <MicrosoftDotNetBuildTasksPackagingVersion>1.0.0-beta.19328.2</MicrosoftDotNetBuildTasksPackagingVersion> <MicrosoftDotNetXUnitConsoleRunnerVersion>2.5.1-beta.19278.1</MicrosoftDotNetXUnitConsoleRunnerVersion> <!-- corefx --> <MicrosoftPrivateCoreFxNETCoreAppVersion>4.6.0-preview8.19327.9</MicrosoftPrivateCoreFxNETCoreAppVersion> diff --git a/eng/common/post-build/nuget-validation.ps1 b/eng/common/post-build/nuget-validation.ps1 new file mode 100644 index 0000000000..1bdced1e30 --- /dev/null +++ b/eng/common/post-build/nuget-validation.ps1 @@ -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 +} diff --git a/eng/common/post-build/trigger-subscriptions.ps1 b/eng/common/post-build/trigger-subscriptions.ps1 new file mode 100644 index 0000000000..db8a839457 --- /dev/null +++ b/eng/common/post-build/trigger-subscriptions.ps1 @@ -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!" diff --git a/eng/common/sdl/extract-artifact-packages.ps1 b/eng/common/sdl/extract-artifact-packages.ps1 index 0f6a6e49b9..1fdbb14329 100644 --- a/eng/common/sdl/extract-artifact-packages.ps1 +++ b/eng/common/sdl/extract-artifact-packages.ps1 @@ -44,6 +44,10 @@ $ExtractPackage = { } } function ExtractArtifacts { + if (!(Test-Path $InputPath)) { + Write-Host "Input Path does not exist: $InputPath" + ExitWithExitCode 0 + } $Jobs = @() Get-ChildItem "$InputPath\*.nupkg" | ForEach-Object { diff --git a/eng/common/templates/post-build/channels/internal-servicing.yml b/eng/common/templates/post-build/channels/internal-servicing.yml index 99cd59b198..808d46b17f 100644 --- a/eng/common/templates/post-build/channels/internal-servicing.yml +++ b/eng/common/templates/post-build/channels/internal-servicing.yml @@ -36,7 +36,7 @@ stages: /p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/' /p:Configuration=Release - - job: + - job: publish_assets displayName: Publish Assets dependsOn: setupMaestroVars variables: @@ -111,7 +111,10 @@ stages: -PersonalAccessToken $(dn-bot-dnceng-unviersal-packages-rw) enabled: false - + - template: ../trigger-subscription.yml + parameters: + ChannelId: ${{ variables.InternalServicing_30_Channel_Id }} + - stage: IS_PublishValidation displayName: Publish Validation variables: @@ -164,4 +167,4 @@ stages: - template: ../promote-build.yml parameters: - ChannelId: ${{ variables.InternalServicing_30_Channel_Id }} + ChannelId: ${{ variables.InternalServicing_30_Channel_Id }}
\ No newline at end of file diff --git a/eng/common/templates/post-build/channels/public-release.yml b/eng/common/templates/post-build/channels/public-release.yml index f23eb3f541..25923020df 100644 --- a/eng/common/templates/post-build/channels/public-release.yml +++ b/eng/common/templates/post-build/channels/public-release.yml @@ -36,7 +36,7 @@ stages: /p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/' /p:Configuration=Release - - job: + - job: publish_assets displayName: Publish Assets dependsOn: setupMaestroVars variables: @@ -111,6 +111,9 @@ stages: -PersonalAccessToken $(dn-bot-dnceng-unviersal-packages-rw) enabled: false + - template: ../trigger-subscription.yml + parameters: + ChannelId: ${{ variables.PublicRelease_30_Channel_Id }} - stage: PubRel_PublishValidation displayName: Publish Validation diff --git a/eng/common/templates/post-build/post-build.yml b/eng/common/templates/post-build/post-build.yml index 3d7e6776e6..daa799259c 100644 --- a/eng/common/templates/post-build/post-build.yml +++ b/eng/common/templates/post-build/post-build.yml @@ -2,6 +2,7 @@ parameters: enableSourceLinkValidation: true enableSigningValidation: true enableSymbolValidation: true + enableNugetValidation: true SDLValidationParameters: enable: false params: '' @@ -11,6 +12,25 @@ stages: dependsOn: build 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 diff --git a/eng/common/templates/post-build/trigger-subscription.yml b/eng/common/templates/post-build/trigger-subscription.yml new file mode 100644 index 0000000000..65259d4e68 --- /dev/null +++ b/eng/common/templates/post-build/trigger-subscription.yml @@ -0,0 +1,11 @@ +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 }} + -BarToken $(MaestroAccessTokenInt)
\ No newline at end of file diff --git a/global.json b/global.json index 317a7231d5..029672f832 100644 --- a/global.json +++ b/global.json @@ -7,8 +7,8 @@ "python": "2.7.15" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19326.44", - "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19326.44", + "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19328.2", + "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19328.2", "Microsoft.Build.NoTargets": "1.0.53", "Microsoft.Build.Traversal": "2.0.2" } |