[release/6.0.1xx] Update dependencies from dotnet/arcade (#20128)
[release/6.0.1xx] Update dependencies from dotnet/arcade
This commit is contained in:
parent
4aac028331
commit
ab988850e4
25 changed files with 262 additions and 346 deletions
32
NuGet.config
32
NuGet.config
|
@ -8,9 +8,16 @@
|
||||||
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
|
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
|
||||||
<!-- Begin: Package sources from dotnet-aspnetcore -->
|
<!-- Begin: Package sources from dotnet-aspnetcore -->
|
||||||
<add key="darc-int-dotnet-aspnetcore-f0f9de5" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-aspnetcore-f0f9de56/nuget/v3/index.json" />
|
<add key="darc-int-dotnet-aspnetcore-f0f9de5" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-aspnetcore-f0f9de56/nuget/v3/index.json" />
|
||||||
|
<add key="darc-int-dotnet-aspnetcore-f0f9de5-5" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-aspnetcore-f0f9de56-5/nuget/v3/index.json" />
|
||||||
<!-- End: Package sources from dotnet-aspnetcore -->
|
<!-- End: Package sources from dotnet-aspnetcore -->
|
||||||
<!-- Begin: Package sources from dotnet-emsdk -->
|
<!-- Begin: Package sources from dotnet-emsdk -->
|
||||||
<add key="darc-pub-dotnet-emsdk-849e1a6" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-849e1a63/nuget/v3/index.json" />
|
<add key="darc-pub-dotnet-emsdk-849e1a6" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-849e1a63/nuget/v3/index.json" />
|
||||||
|
<add key="darc-pub-dotnet-emsdk-849e1a6-9" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-849e1a63-9/nuget/v3/index.json" />
|
||||||
|
<add key="darc-pub-dotnet-emsdk-849e1a6-8" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-849e1a63-8/nuget/v3/index.json" />
|
||||||
|
<add key="darc-pub-dotnet-emsdk-849e1a6-7" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-849e1a63-7/nuget/v3/index.json" />
|
||||||
|
<add key="darc-pub-dotnet-emsdk-849e1a6-6" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-849e1a63-6/nuget/v3/index.json" />
|
||||||
|
<add key="darc-pub-dotnet-emsdk-849e1a6-5" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-849e1a63-5/nuget/v3/index.json" />
|
||||||
|
<add key="darc-pub-dotnet-emsdk-849e1a6-4" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-849e1a63-4/nuget/v3/index.json" />
|
||||||
<add key="darc-pub-dotnet-emsdk-849e1a6-3" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-849e1a63-3/nuget/v3/index.json" />
|
<add key="darc-pub-dotnet-emsdk-849e1a6-3" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-849e1a63-3/nuget/v3/index.json" />
|
||||||
<add key="darc-pub-dotnet-emsdk-849e1a6-2" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-849e1a63-2/nuget/v3/index.json" />
|
<add key="darc-pub-dotnet-emsdk-849e1a6-2" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-849e1a63-2/nuget/v3/index.json" />
|
||||||
<add key="darc-pub-dotnet-emsdk-849e1a6-1" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-849e1a63-1/nuget/v3/index.json" />
|
<add key="darc-pub-dotnet-emsdk-849e1a6-1" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-849e1a63-1/nuget/v3/index.json" />
|
||||||
|
@ -23,12 +30,24 @@
|
||||||
<!-- End: Package sources from dotnet-runtime -->
|
<!-- End: Package sources from dotnet-runtime -->
|
||||||
<!-- Begin: Package sources from dotnet-templating -->
|
<!-- Begin: Package sources from dotnet-templating -->
|
||||||
<add key="darc-int-dotnet-templating-2fdb78d" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-templating-2fdb78d3/nuget/v3/index.json" />
|
<add key="darc-int-dotnet-templating-2fdb78d" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-templating-2fdb78d3/nuget/v3/index.json" />
|
||||||
|
<add key="darc-int-dotnet-templating-2fdb78d-9" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-templating-2fdb78d3-9/nuget/v3/index.json" />
|
||||||
|
<add key="darc-int-dotnet-templating-2fdb78d-8" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-templating-2fdb78d3-8/nuget/v3/index.json" />
|
||||||
|
<add key="darc-int-dotnet-templating-2fdb78d-7" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-templating-2fdb78d3-7/nuget/v3/index.json" />
|
||||||
|
<add key="darc-int-dotnet-templating-2fdb78d-6" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-templating-2fdb78d3-6/nuget/v3/index.json" />
|
||||||
|
<add key="darc-int-dotnet-templating-2fdb78d-5" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-templating-2fdb78d3-5/nuget/v3/index.json" />
|
||||||
|
<add key="darc-int-dotnet-templating-2fdb78d-4" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-templating-2fdb78d3-4/nuget/v3/index.json" />
|
||||||
<add key="darc-int-dotnet-templating-2fdb78d-3" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-templating-2fdb78d3-3/nuget/v3/index.json" />
|
<add key="darc-int-dotnet-templating-2fdb78d-3" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-templating-2fdb78d3-3/nuget/v3/index.json" />
|
||||||
<add key="darc-int-dotnet-templating-2fdb78d-2" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-templating-2fdb78d3-2/nuget/v3/index.json" />
|
<add key="darc-int-dotnet-templating-2fdb78d-2" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-templating-2fdb78d3-2/nuget/v3/index.json" />
|
||||||
<add key="darc-int-dotnet-templating-2fdb78d-1" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-templating-2fdb78d3-1/nuget/v3/index.json" />
|
<add key="darc-int-dotnet-templating-2fdb78d-1" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-templating-2fdb78d3-1/nuget/v3/index.json" />
|
||||||
<!-- End: Package sources from dotnet-templating -->
|
<!-- End: Package sources from dotnet-templating -->
|
||||||
<!-- Begin: Package sources from dotnet-windowsdesktop -->
|
<!-- Begin: Package sources from dotnet-windowsdesktop -->
|
||||||
<add key="darc-int-dotnet-windowsdesktop-db4e5a3" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-windowsdesktop-db4e5a36/nuget/v3/index.json" />
|
<add key="darc-int-dotnet-windowsdesktop-db4e5a3" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-windowsdesktop-db4e5a36/nuget/v3/index.json" />
|
||||||
|
<add key="darc-int-dotnet-windowsdesktop-db4e5a3-9" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-windowsdesktop-db4e5a36-9/nuget/v3/index.json" />
|
||||||
|
<add key="darc-int-dotnet-windowsdesktop-db4e5a3-8" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-windowsdesktop-db4e5a36-8/nuget/v3/index.json" />
|
||||||
|
<add key="darc-int-dotnet-windowsdesktop-db4e5a3-7" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-windowsdesktop-db4e5a36-7/nuget/v3/index.json" />
|
||||||
|
<add key="darc-int-dotnet-windowsdesktop-db4e5a3-6" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-windowsdesktop-db4e5a36-6/nuget/v3/index.json" />
|
||||||
|
<add key="darc-int-dotnet-windowsdesktop-db4e5a3-5" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-windowsdesktop-db4e5a36-5/nuget/v3/index.json" />
|
||||||
|
<add key="darc-int-dotnet-windowsdesktop-db4e5a3-4" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-windowsdesktop-db4e5a36-4/nuget/v3/index.json" />
|
||||||
<add key="darc-int-dotnet-windowsdesktop-db4e5a3-3" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-windowsdesktop-db4e5a36-3/nuget/v3/index.json" />
|
<add key="darc-int-dotnet-windowsdesktop-db4e5a3-3" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-windowsdesktop-db4e5a36-3/nuget/v3/index.json" />
|
||||||
<add key="darc-int-dotnet-windowsdesktop-db4e5a3-2" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-windowsdesktop-db4e5a36-2/nuget/v3/index.json" />
|
<add key="darc-int-dotnet-windowsdesktop-db4e5a3-2" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-windowsdesktop-db4e5a36-2/nuget/v3/index.json" />
|
||||||
<add key="darc-int-dotnet-windowsdesktop-db4e5a3-1" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-windowsdesktop-db4e5a36-1/nuget/v3/index.json" />
|
<add key="darc-int-dotnet-windowsdesktop-db4e5a3-1" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-windowsdesktop-db4e5a36-1/nuget/v3/index.json" />
|
||||||
|
@ -52,6 +71,7 @@
|
||||||
<disabledPackageSources>
|
<disabledPackageSources>
|
||||||
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
|
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
|
||||||
<!-- Begin: Package sources from dotnet-aspnetcore -->
|
<!-- Begin: Package sources from dotnet-aspnetcore -->
|
||||||
|
<add key="darc-int-dotnet-aspnetcore-f0f9de5-5" value="true" />
|
||||||
<add key="darc-int-dotnet-aspnetcore-f0f9de5" value="true" />
|
<add key="darc-int-dotnet-aspnetcore-f0f9de5" value="true" />
|
||||||
<!-- Begin: Package sources from DotNet-msbuild-Trusted -->
|
<!-- Begin: Package sources from DotNet-msbuild-Trusted -->
|
||||||
<!-- End: Package sources from DotNet-msbuild-Trusted -->
|
<!-- End: Package sources from DotNet-msbuild-Trusted -->
|
||||||
|
@ -62,12 +82,24 @@
|
||||||
<add key="darc-int-dotnet-templating-2fdb78d-1" value="true" />
|
<add key="darc-int-dotnet-templating-2fdb78d-1" value="true" />
|
||||||
<add key="darc-int-dotnet-templating-2fdb78d-2" value="true" />
|
<add key="darc-int-dotnet-templating-2fdb78d-2" value="true" />
|
||||||
<add key="darc-int-dotnet-templating-2fdb78d-3" value="true" />
|
<add key="darc-int-dotnet-templating-2fdb78d-3" value="true" />
|
||||||
|
<add key="darc-int-dotnet-templating-2fdb78d-4" value="true" />
|
||||||
|
<add key="darc-int-dotnet-templating-2fdb78d-5" value="true" />
|
||||||
|
<add key="darc-int-dotnet-templating-2fdb78d-6" value="true" />
|
||||||
|
<add key="darc-int-dotnet-templating-2fdb78d-7" value="true" />
|
||||||
|
<add key="darc-int-dotnet-templating-2fdb78d-8" value="true" />
|
||||||
|
<add key="darc-int-dotnet-templating-2fdb78d-9" value="true" />
|
||||||
<add key="darc-int-dotnet-templating-2fdb78d" value="true" />
|
<add key="darc-int-dotnet-templating-2fdb78d" value="true" />
|
||||||
<!-- End: Package sources from dotnet-templating -->
|
<!-- End: Package sources from dotnet-templating -->
|
||||||
<!-- Begin: Package sources from dotnet-windowsdesktop -->
|
<!-- Begin: Package sources from dotnet-windowsdesktop -->
|
||||||
<add key="darc-int-dotnet-windowsdesktop-db4e5a3-1" value="true" />
|
<add key="darc-int-dotnet-windowsdesktop-db4e5a3-1" value="true" />
|
||||||
<add key="darc-int-dotnet-windowsdesktop-db4e5a3-2" value="true" />
|
<add key="darc-int-dotnet-windowsdesktop-db4e5a3-2" value="true" />
|
||||||
<add key="darc-int-dotnet-windowsdesktop-db4e5a3-3" value="true" />
|
<add key="darc-int-dotnet-windowsdesktop-db4e5a3-3" value="true" />
|
||||||
|
<add key="darc-int-dotnet-windowsdesktop-db4e5a3-4" value="true" />
|
||||||
|
<add key="darc-int-dotnet-windowsdesktop-db4e5a3-5" value="true" />
|
||||||
|
<add key="darc-int-dotnet-windowsdesktop-db4e5a3-6" value="true" />
|
||||||
|
<add key="darc-int-dotnet-windowsdesktop-db4e5a3-7" value="true" />
|
||||||
|
<add key="darc-int-dotnet-windowsdesktop-db4e5a3-8" value="true" />
|
||||||
|
<add key="darc-int-dotnet-windowsdesktop-db4e5a3-9" value="true" />
|
||||||
<add key="darc-int-dotnet-windowsdesktop-db4e5a3" value="true" />
|
<add key="darc-int-dotnet-windowsdesktop-db4e5a3" value="true" />
|
||||||
<!-- End: Package sources from dotnet-windowsdesktop -->
|
<!-- End: Package sources from dotnet-windowsdesktop -->
|
||||||
<!-- End: Package sources from dotnet-runtime -->
|
<!-- End: Package sources from dotnet-runtime -->
|
||||||
|
|
|
@ -197,19 +197,19 @@
|
||||||
</Dependency>
|
</Dependency>
|
||||||
</ProductDependencies>
|
</ProductDependencies>
|
||||||
<ToolsetDependencies>
|
<ToolsetDependencies>
|
||||||
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.24367.5">
|
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.24459.5">
|
||||||
<Uri>https://github.com/dotnet/arcade</Uri>
|
<Uri>https://github.com/dotnet/arcade</Uri>
|
||||||
<Sha>3ea644036738781aff3b55f57a16bc99a6b82c4c</Sha>
|
<Sha>685008547318b269dbbb82cfc9ca968126301bbe</Sha>
|
||||||
<SourceBuild RepoName="arcade" ManagedOnly="true" />
|
<SourceBuild RepoName="arcade" ManagedOnly="true" />
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.DotNet.CMake.Sdk" Version="6.0.0-beta.24367.5">
|
<Dependency Name="Microsoft.DotNet.CMake.Sdk" Version="6.0.0-beta.24459.5">
|
||||||
<Uri>https://github.com/dotnet/arcade</Uri>
|
<Uri>https://github.com/dotnet/arcade</Uri>
|
||||||
<Sha>3ea644036738781aff3b55f57a16bc99a6b82c4c</Sha>
|
<Sha>685008547318b269dbbb82cfc9ca968126301bbe</Sha>
|
||||||
<SourceBuild RepoName="arcade" ManagedOnly="true" />
|
<SourceBuild RepoName="arcade" ManagedOnly="true" />
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="6.0.0-beta.24367.5">
|
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="6.0.0-beta.24459.5">
|
||||||
<Uri>https://github.com/dotnet/arcade</Uri>
|
<Uri>https://github.com/dotnet/arcade</Uri>
|
||||||
<Sha>3ea644036738781aff3b55f57a16bc99a6b82c4c</Sha>
|
<Sha>685008547318b269dbbb82cfc9ca968126301bbe</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-reference-packages" Version="6.0.0-servicing.24266.3">
|
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-reference-packages" Version="6.0.0-servicing.24266.3">
|
||||||
<Uri>https://github.com/dotnet/source-build-reference-packages</Uri>
|
<Uri>https://github.com/dotnet/source-build-reference-packages</Uri>
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<!-- Dependency from https://github.com/dotnet/arcade -->
|
<!-- Dependency from https://github.com/dotnet/arcade -->
|
||||||
<MicrosoftDotNetBuildTasksInstallersPackageVersion>6.0.0-beta.24367.5</MicrosoftDotNetBuildTasksInstallersPackageVersion>
|
<MicrosoftDotNetBuildTasksInstallersPackageVersion>6.0.0-beta.24459.5</MicrosoftDotNetBuildTasksInstallersPackageVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<!-- Dependency from https://github.com/dotnet/winforms -->
|
<!-- Dependency from https://github.com/dotnet/winforms -->
|
||||||
|
|
|
@ -1,48 +0,0 @@
|
||||||
param(
|
|
||||||
[Parameter(Mandatory=$true)][int] $BuildId,
|
|
||||||
[Parameter(Mandatory=$true)][int] $ChannelId,
|
|
||||||
[Parameter(Mandatory=$true)][string] $MaestroApiAccessToken,
|
|
||||||
[Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = 'https://maestro.dot.net',
|
|
||||||
[Parameter(Mandatory=$false)][string] $MaestroApiVersion = '2019-01-16'
|
|
||||||
)
|
|
||||||
|
|
||||||
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-PipelineTelemetryCategory -Category 'PromoteBuild' -Message "Channel with BAR ID $ChannelId was not found in BAR!"
|
|
||||||
ExitWithExitCode 1
|
|
||||||
}
|
|
||||||
|
|
||||||
# Get info about which channel(s) the build has already been promoted to
|
|
||||||
$buildInfo = Get-MaestroBuild -BuildId $BuildId
|
|
||||||
|
|
||||||
if (!$buildInfo) {
|
|
||||||
Write-PipelineTelemetryError -Category 'PromoteBuild' -Message "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 "Promoting build '$BuildId' to channel '$ChannelId'."
|
|
||||||
|
|
||||||
Assign-BuildToChannel -BuildId $BuildId -ChannelId $ChannelId
|
|
||||||
|
|
||||||
Write-Host 'done.'
|
|
||||||
}
|
|
||||||
catch {
|
|
||||||
Write-Host $_
|
|
||||||
Write-PipelineTelemetryError -Category 'PromoteBuild' -Message "There was an error while trying to promote build '$BuildId' to channel '$ChannelId'"
|
|
||||||
ExitWithExitCode 1
|
|
||||||
}
|
|
|
@ -4,7 +4,15 @@ param(
|
||||||
)
|
)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
. $PSScriptRoot\post-build-utils.ps1
|
$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
|
||||||
|
|
||||||
if ($PromoteToChannels -eq "") {
|
if ($PromoteToChannels -eq "") {
|
||||||
Write-PipelineTaskError -Type 'warning' -Message "This build won't publish assets as it's not configured to any Maestro channel. If that wasn't intended use Darc to configure a default channel using add-default-channel for this branch or to promote it to a channel using add-build-to-channel. See https://github.com/dotnet/arcade/blob/master/Documentation/Darc.md#assigning-an-individual-build-to-a-channel for more info."
|
Write-PipelineTaskError -Type 'warning' -Message "This build won't publish assets as it's not configured to any Maestro channel. If that wasn't intended use Darc to configure a default channel using add-default-channel for this branch or to promote it to a channel using add-build-to-channel. See https://github.com/dotnet/arcade/blob/master/Documentation/Darc.md#assigning-an-individual-build-to-a-channel for more info."
|
||||||
|
|
|
@ -2,20 +2,11 @@
|
||||||
# tool: https://github.com/NuGet/NuGetGallery/tree/jver-verify/src/VerifyMicrosoftPackage
|
# tool: https://github.com/NuGet/NuGetGallery/tree/jver-verify/src/VerifyMicrosoftPackage
|
||||||
|
|
||||||
param(
|
param(
|
||||||
[Parameter(Mandatory=$true)][string] $PackagesPath, # Path to where the packages to be validated are
|
[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
|
|
||||||
)
|
)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
. $PSScriptRoot\post-build-utils.ps1
|
& $PSScriptRoot\nuget-verification.ps1 ${PackagesPath}\*.nupkg
|
||||||
|
|
||||||
$url = 'https://raw.githubusercontent.com/NuGet/NuGetGallery/3e25ad135146676bcab0050a516939d9958bfa5d/src/VerifyMicrosoftPackage/verify.ps1'
|
|
||||||
|
|
||||||
New-Item -ItemType 'directory' -Path ${ToolDestinationPath} -Force
|
|
||||||
|
|
||||||
Invoke-WebRequest $url -OutFile ${ToolDestinationPath}\verify.ps1
|
|
||||||
|
|
||||||
& ${ToolDestinationPath}\verify.ps1 ${PackagesPath}\*.nupkg
|
|
||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
Write-Host $_.ScriptStackTrace
|
Write-Host $_.ScriptStackTrace
|
||||||
|
|
121
eng/common/post-build/nuget-verification.ps1
Normal file
121
eng/common/post-build/nuget-verification.ps1
Normal file
|
@ -0,0 +1,121 @@
|
||||||
|
<#
|
||||||
|
.SYNOPSIS
|
||||||
|
Verifies that Microsoft NuGet packages have proper metadata.
|
||||||
|
.DESCRIPTION
|
||||||
|
Downloads a verification tool and runs metadata validation on the provided NuGet packages. This script writes an
|
||||||
|
error if any of the provided packages fail validation. All arguments provided to this PowerShell script that do not
|
||||||
|
match PowerShell parameters are passed on to the verification tool downloaded during the execution of this script.
|
||||||
|
.PARAMETER NuGetExePath
|
||||||
|
The path to the nuget.exe binary to use. If not provided, nuget.exe will be downloaded into the -DownloadPath
|
||||||
|
directory.
|
||||||
|
.PARAMETER PackageSource
|
||||||
|
The package source to use to download the verification tool. If not provided, nuget.org will be used.
|
||||||
|
.PARAMETER DownloadPath
|
||||||
|
The directory path to download the verification tool and nuget.exe to. If not provided,
|
||||||
|
%TEMP%\NuGet.VerifyNuGetPackage will be used.
|
||||||
|
.PARAMETER args
|
||||||
|
Arguments that will be passed to the verification tool.
|
||||||
|
.EXAMPLE
|
||||||
|
PS> .\verify.ps1 *.nupkg
|
||||||
|
Verifies the metadata of all .nupkg files in the currect working directory.
|
||||||
|
.EXAMPLE
|
||||||
|
PS> .\verify.ps1 --help
|
||||||
|
Displays the help text of the downloaded verifiction tool.
|
||||||
|
.LINK
|
||||||
|
https://github.com/NuGet/NuGetGallery/blob/master/src/VerifyMicrosoftPackage/README.md
|
||||||
|
#>
|
||||||
|
|
||||||
|
# This script was copied from https://github.com/NuGet/NuGetGallery/blob/3e25ad135146676bcab0050a516939d9958bfa5d/src/VerifyMicrosoftPackage/verify.ps1
|
||||||
|
|
||||||
|
[CmdletBinding(PositionalBinding = $false)]
|
||||||
|
param(
|
||||||
|
[string]$NuGetExePath,
|
||||||
|
[string]$PackageSource = "https://api.nuget.org/v3/index.json",
|
||||||
|
[string]$DownloadPath,
|
||||||
|
[Parameter(ValueFromRemainingArguments = $true)]
|
||||||
|
[string[]]$args
|
||||||
|
)
|
||||||
|
|
||||||
|
# The URL to download nuget.exe.
|
||||||
|
$nugetExeUrl = "https://dist.nuget.org/win-x86-commandline/v4.9.4/nuget.exe"
|
||||||
|
|
||||||
|
# The package ID of the verification tool.
|
||||||
|
$packageId = "NuGet.VerifyMicrosoftPackage"
|
||||||
|
|
||||||
|
# The location that nuget.exe and the verification tool will be downloaded to.
|
||||||
|
if (!$DownloadPath) {
|
||||||
|
$DownloadPath = (Join-Path $env:TEMP "NuGet.VerifyMicrosoftPackage")
|
||||||
|
}
|
||||||
|
|
||||||
|
$fence = New-Object -TypeName string -ArgumentList '=', 80
|
||||||
|
|
||||||
|
# Create the download directory, if it doesn't already exist.
|
||||||
|
if (!(Test-Path $DownloadPath)) {
|
||||||
|
New-Item -ItemType Directory $DownloadPath | Out-Null
|
||||||
|
}
|
||||||
|
Write-Host "Using download path: $DownloadPath"
|
||||||
|
|
||||||
|
if ($NuGetExePath) {
|
||||||
|
$nuget = $NuGetExePath
|
||||||
|
} else {
|
||||||
|
$downloadedNuGetExe = Join-Path $DownloadPath "nuget.exe"
|
||||||
|
|
||||||
|
# Download nuget.exe, if it doesn't already exist.
|
||||||
|
if (!(Test-Path $downloadedNuGetExe)) {
|
||||||
|
Write-Host "Downloading nuget.exe from $nugetExeUrl..."
|
||||||
|
$ProgressPreference = 'SilentlyContinue'
|
||||||
|
try {
|
||||||
|
Invoke-WebRequest $nugetExeUrl -OutFile $downloadedNuGetExe
|
||||||
|
$ProgressPreference = 'Continue'
|
||||||
|
} catch {
|
||||||
|
$ProgressPreference = 'Continue'
|
||||||
|
Write-Error $_
|
||||||
|
Write-Error "nuget.exe failed to download."
|
||||||
|
exit
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$nuget = $downloadedNuGetExe
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "Using nuget.exe path: $nuget"
|
||||||
|
Write-Host " "
|
||||||
|
|
||||||
|
# Download the latest version of the verification tool.
|
||||||
|
Write-Host "Downloading the latest version of $packageId from $packageSource..."
|
||||||
|
Write-Host $fence
|
||||||
|
& $nuget install $packageId `
|
||||||
|
-Prerelease `
|
||||||
|
-OutputDirectory $DownloadPath `
|
||||||
|
-Source $PackageSource
|
||||||
|
Write-Host $fence
|
||||||
|
Write-Host " "
|
||||||
|
|
||||||
|
if ($LASTEXITCODE -ne 0) {
|
||||||
|
Write-Error "nuget.exe failed to fetch the verify tool."
|
||||||
|
exit
|
||||||
|
}
|
||||||
|
|
||||||
|
# Find the most recently downloaded tool
|
||||||
|
Write-Host "Finding the most recently downloaded verification tool."
|
||||||
|
$verifyProbePath = Join-Path $DownloadPath "$packageId.*"
|
||||||
|
$verifyPath = Get-ChildItem -Path $verifyProbePath -Directory `
|
||||||
|
| Sort-Object -Property LastWriteTime -Descending `
|
||||||
|
| Select-Object -First 1
|
||||||
|
$verify = Join-Path $verifyPath "tools\NuGet.VerifyMicrosoftPackage.exe"
|
||||||
|
Write-Host "Using verification tool: $verify"
|
||||||
|
Write-Host " "
|
||||||
|
|
||||||
|
# Execute the verification tool.
|
||||||
|
Write-Host "Executing the verify tool..."
|
||||||
|
Write-Host $fence
|
||||||
|
& $verify $args
|
||||||
|
Write-Host $fence
|
||||||
|
Write-Host " "
|
||||||
|
|
||||||
|
# Respond to the exit code.
|
||||||
|
if ($LASTEXITCODE -ne 0) {
|
||||||
|
Write-Error "The verify tool found some problems."
|
||||||
|
} else {
|
||||||
|
Write-Output "The verify tool succeeded."
|
||||||
|
}
|
|
@ -1,91 +0,0 @@
|
||||||
# Most of the functions in this file require the variables `MaestroApiEndPoint`,
|
|
||||||
# `MaestroApiVersion` and `MaestroApiAccessToken` to be globally available.
|
|
||||||
|
|
||||||
$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
|
|
||||||
|
|
||||||
function Create-MaestroApiRequestHeaders([string]$ContentType = 'application/json') {
|
|
||||||
Validate-MaestroVars
|
|
||||||
|
|
||||||
$headers = New-Object 'System.Collections.Generic.Dictionary[[String],[String]]'
|
|
||||||
$headers.Add('Accept', $ContentType)
|
|
||||||
$headers.Add('Authorization',"Bearer $MaestroApiAccessToken")
|
|
||||||
return $headers
|
|
||||||
}
|
|
||||||
|
|
||||||
function Get-MaestroChannel([int]$ChannelId) {
|
|
||||||
Validate-MaestroVars
|
|
||||||
|
|
||||||
$apiHeaders = Create-MaestroApiRequestHeaders
|
|
||||||
$apiEndpoint = "$MaestroApiEndPoint/api/channels/${ChannelId}?api-version=$MaestroApiVersion"
|
|
||||||
|
|
||||||
$result = try { Invoke-WebRequest -Method Get -Uri $apiEndpoint -Headers $apiHeaders | ConvertFrom-Json } catch { Write-Host "Error: $_" }
|
|
||||||
return $result
|
|
||||||
}
|
|
||||||
|
|
||||||
function Get-MaestroBuild([int]$BuildId) {
|
|
||||||
Validate-MaestroVars
|
|
||||||
|
|
||||||
$apiHeaders = Create-MaestroApiRequestHeaders -AuthToken $MaestroApiAccessToken
|
|
||||||
$apiEndpoint = "$MaestroApiEndPoint/api/builds/${BuildId}?api-version=$MaestroApiVersion"
|
|
||||||
|
|
||||||
$result = try { return Invoke-WebRequest -Method Get -Uri $apiEndpoint -Headers $apiHeaders | ConvertFrom-Json } catch { Write-Host "Error: $_" }
|
|
||||||
return $result
|
|
||||||
}
|
|
||||||
|
|
||||||
function Get-MaestroSubscriptions([string]$SourceRepository, [int]$ChannelId) {
|
|
||||||
Validate-MaestroVars
|
|
||||||
|
|
||||||
$SourceRepository = [System.Web.HttpUtility]::UrlEncode($SourceRepository)
|
|
||||||
$apiHeaders = Create-MaestroApiRequestHeaders -AuthToken $MaestroApiAccessToken
|
|
||||||
$apiEndpoint = "$MaestroApiEndPoint/api/subscriptions?sourceRepository=$SourceRepository&channelId=$ChannelId&api-version=$MaestroApiVersion"
|
|
||||||
|
|
||||||
$result = try { Invoke-WebRequest -Method Get -Uri $apiEndpoint -Headers $apiHeaders | ConvertFrom-Json } catch { Write-Host "Error: $_" }
|
|
||||||
return $result
|
|
||||||
}
|
|
||||||
|
|
||||||
function Assign-BuildToChannel([int]$BuildId, [int]$ChannelId) {
|
|
||||||
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
|
|
||||||
}
|
|
||||||
|
|
||||||
function Trigger-Subscription([string]$SubscriptionId) {
|
|
||||||
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
|
|
||||||
}
|
|
||||||
|
|
||||||
function Validate-MaestroVars {
|
|
||||||
try {
|
|
||||||
Get-Variable MaestroApiEndPoint | Out-Null
|
|
||||||
Get-Variable MaestroApiVersion | Out-Null
|
|
||||||
Get-Variable MaestroApiAccessToken | Out-Null
|
|
||||||
|
|
||||||
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-PipelineTelemetryError -Category 'MaestroVars' -Message "MaestroApiVersion does not match a version string in the format yyyy-MM-DD. '$MaestroApiVersion'"
|
|
||||||
ExitWithExitCode 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch {
|
|
||||||
Write-PipelineTelemetryError -Category 'MaestroVars' -Message 'Error: Variables `MaestroApiEndPoint`, `MaestroApiVersion` and `MaestroApiAccessToken` are required while using this script.'
|
|
||||||
Write-Host $_
|
|
||||||
ExitWithExitCode 1
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -2,7 +2,6 @@ param(
|
||||||
[Parameter(Mandatory=$true)][int] $BuildId,
|
[Parameter(Mandatory=$true)][int] $BuildId,
|
||||||
[Parameter(Mandatory=$true)][int] $PublishingInfraVersion,
|
[Parameter(Mandatory=$true)][int] $PublishingInfraVersion,
|
||||||
[Parameter(Mandatory=$true)][string] $AzdoToken,
|
[Parameter(Mandatory=$true)][string] $AzdoToken,
|
||||||
[Parameter(Mandatory=$true)][string] $MaestroToken,
|
|
||||||
[Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = 'https://maestro.dot.net',
|
[Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = 'https://maestro.dot.net',
|
||||||
[Parameter(Mandatory=$true)][string] $WaitPublishingFinish,
|
[Parameter(Mandatory=$true)][string] $WaitPublishingFinish,
|
||||||
[Parameter(Mandatory=$false)][string] $ArtifactsPublishingAdditionalParameters,
|
[Parameter(Mandatory=$false)][string] $ArtifactsPublishingAdditionalParameters,
|
||||||
|
@ -10,7 +9,12 @@ param(
|
||||||
)
|
)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
. $PSScriptRoot\post-build-utils.ps1
|
# `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
|
||||||
|
|
||||||
$darc = Get-Darc
|
$darc = Get-Darc
|
||||||
|
|
||||||
|
@ -35,9 +39,9 @@ try {
|
||||||
--publishing-infra-version $PublishingInfraVersion `
|
--publishing-infra-version $PublishingInfraVersion `
|
||||||
--default-channels `
|
--default-channels `
|
||||||
--source-branch main `
|
--source-branch main `
|
||||||
--azdev-pat $AzdoToken `
|
--azdev-pat "$AzdoToken" `
|
||||||
--bar-uri $MaestroApiEndPoint `
|
--bar-uri "$MaestroApiEndPoint" `
|
||||||
--password $MaestroToken `
|
--ci `
|
||||||
@optionalParams
|
@optionalParams
|
||||||
|
|
||||||
if ($LastExitCode -ne 0) {
|
if ($LastExitCode -ne 0) {
|
||||||
|
|
|
@ -6,7 +6,15 @@ param(
|
||||||
[Parameter(Mandatory=$true)][string] $SourcelinkCliVersion # Version of SourceLink CLI to use
|
[Parameter(Mandatory=$true)][string] $SourcelinkCliVersion # Version of SourceLink CLI to use
|
||||||
)
|
)
|
||||||
|
|
||||||
. $PSScriptRoot\post-build-utils.ps1
|
$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
|
||||||
|
|
||||||
# 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
|
# in the repository at a specific commit point. This is populated by inserting
|
||||||
|
|
|
@ -299,8 +299,6 @@ function InstallDotnetSymbol {
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
. $PSScriptRoot\post-build-utils.ps1
|
|
||||||
|
|
||||||
InstallDotnetSymbol
|
InstallDotnetSymbol
|
||||||
|
|
||||||
foreach ($Job in @(Get-Job)) {
|
foreach ($Job in @(Get-Job)) {
|
||||||
|
|
|
@ -1,64 +0,0 @@
|
||||||
param(
|
|
||||||
[Parameter(Mandatory=$true)][string] $SourceRepo,
|
|
||||||
[Parameter(Mandatory=$true)][int] $ChannelId,
|
|
||||||
[Parameter(Mandatory=$true)][string] $MaestroApiAccessToken,
|
|
||||||
[Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = 'https://maestro.dot.net',
|
|
||||||
[Parameter(Mandatory=$false)][string] $MaestroApiVersion = '2019-01-16'
|
|
||||||
)
|
|
||||||
|
|
||||||
try {
|
|
||||||
. $PSScriptRoot\post-build-utils.ps1
|
|
||||||
|
|
||||||
# Get all the $SourceRepo subscriptions
|
|
||||||
$normalizedSourceRepo = $SourceRepo.Replace('dnceng@', '')
|
|
||||||
$subscriptions = Get-MaestroSubscriptions -SourceRepository $normalizedSourceRepo -ChannelId $ChannelId
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
# 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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
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!'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch {
|
|
||||||
Write-Host $_.ScriptStackTrace
|
|
||||||
Write-PipelineTelemetryError -Category 'TriggerSubscriptions' -Message $_
|
|
||||||
ExitWithExitCode 1
|
|
||||||
}
|
|
|
@ -61,19 +61,24 @@ jobs:
|
||||||
filePath: $(Build.SourcesDirectory)/eng/common/enable-cross-org-publishing.ps1
|
filePath: $(Build.SourcesDirectory)/eng/common/enable-cross-org-publishing.ps1
|
||||||
arguments: -token $(dn-bot-all-orgs-artifact-feeds-rw)
|
arguments: -token $(dn-bot-all-orgs-artifact-feeds-rw)
|
||||||
|
|
||||||
- task: PowerShell@2
|
- task: AzureCLI@2
|
||||||
displayName: Publish Build Assets
|
displayName: Publish Build Assets
|
||||||
|
condition: ${{ parameters.condition }}
|
||||||
|
continueOnError: ${{ parameters.continueOnError }}
|
||||||
inputs:
|
inputs:
|
||||||
filePath: eng\common\sdk-task.ps1
|
azureSubscription: "Darc: Maestro Production"
|
||||||
arguments: -task PublishBuildAssets -restore -msbuildEngine dotnet
|
scriptType: ps
|
||||||
|
scriptLocation: scriptPath
|
||||||
|
scriptPath: eng\common\sdk-task.ps1
|
||||||
|
arguments: >
|
||||||
|
-task PublishBuildAssets
|
||||||
|
-restore
|
||||||
|
-msbuildEngine dotnet
|
||||||
/p:ManifestsPath='$(Build.StagingDirectory)/Download/AssetManifests'
|
/p:ManifestsPath='$(Build.StagingDirectory)/Download/AssetManifests'
|
||||||
/p:BuildAssetRegistryToken=$(MaestroAccessToken)
|
|
||||||
/p:MaestroApiEndpoint=https://maestro.dot.net
|
/p:MaestroApiEndpoint=https://maestro.dot.net
|
||||||
/p:PublishUsingPipelines=${{ parameters.publishUsingPipelines }}
|
/p:PublishUsingPipelines=${{ parameters.publishUsingPipelines }}
|
||||||
/p:Configuration=$(_BuildConfig)
|
/p:Configuration=$(_BuildConfig)
|
||||||
/p:OfficialBuildId=$(Build.BuildNumber)
|
/p:OfficialBuildId=$(Build.BuildNumber)
|
||||||
condition: ${{ parameters.condition }}
|
|
||||||
continueOnError: ${{ parameters.continueOnError }}
|
|
||||||
|
|
||||||
- task: powershell@2
|
- task: powershell@2
|
||||||
displayName: Create ReleaseConfigs Artifact
|
displayName: Create ReleaseConfigs Artifact
|
||||||
|
|
|
@ -11,8 +11,6 @@ variables:
|
||||||
# Default Maestro++ API Endpoint and API Version
|
# Default Maestro++ API Endpoint and API Version
|
||||||
- name: MaestroApiEndPoint
|
- name: MaestroApiEndPoint
|
||||||
value: "https://maestro.dot.net"
|
value: "https://maestro.dot.net"
|
||||||
- name: MaestroApiAccessToken
|
|
||||||
value: $(MaestroAccessToken)
|
|
||||||
- name: MaestroApiVersion
|
- name: MaestroApiVersion
|
||||||
value: "2020-02-20"
|
value: "2020-02-20"
|
||||||
|
|
||||||
|
|
|
@ -128,7 +128,6 @@ stages:
|
||||||
inputs:
|
inputs:
|
||||||
filePath: $(Build.SourcesDirectory)/eng/common/post-build/nuget-validation.ps1
|
filePath: $(Build.SourcesDirectory)/eng/common/post-build/nuget-validation.ps1
|
||||||
arguments: -PackagesPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/
|
arguments: -PackagesPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/
|
||||||
-ToolDestinationPath $(Agent.BuildDirectory)/Extract/
|
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
displayName: Signing Validation
|
displayName: Signing Validation
|
||||||
|
@ -266,14 +265,16 @@ stages:
|
||||||
BARBuildId: ${{ parameters.BARBuildId }}
|
BARBuildId: ${{ parameters.BARBuildId }}
|
||||||
PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }}
|
PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }}
|
||||||
|
|
||||||
- task: PowerShell@2
|
- task: AzureCLI@2
|
||||||
displayName: Publish Using Darc
|
displayName: Publish Using Darc
|
||||||
inputs:
|
inputs:
|
||||||
filePath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1
|
azureSubscription: "Darc: Maestro Production"
|
||||||
|
scriptType: ps
|
||||||
|
scriptLocation: scriptPath
|
||||||
|
scriptPath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1
|
||||||
arguments: -BuildId $(BARBuildId)
|
arguments: -BuildId $(BARBuildId)
|
||||||
-PublishingInfraVersion ${{ parameters.publishingInfraVersion }}
|
-PublishingInfraVersion ${{ parameters.publishingInfraVersion }}
|
||||||
-AzdoToken '$(publishing-dnceng-devdiv-code-r-build-re)'
|
-AzdoToken '$(System.AccessToken)'
|
||||||
-MaestroToken '$(MaestroApiAccessToken)'
|
|
||||||
-WaitPublishingFinish true
|
-WaitPublishingFinish true
|
||||||
-ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}'
|
-ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}'
|
||||||
-SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}'
|
-SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}'
|
||||||
|
|
|
@ -11,13 +11,14 @@ steps:
|
||||||
artifactName: ReleaseConfigs
|
artifactName: ReleaseConfigs
|
||||||
checkDownloadedFiles: true
|
checkDownloadedFiles: true
|
||||||
|
|
||||||
- task: PowerShell@2
|
- task: AzureCLI@2
|
||||||
name: setReleaseVars
|
name: setReleaseVars
|
||||||
displayName: Set Release Configs Vars
|
displayName: Set Release Configs Vars
|
||||||
inputs:
|
inputs:
|
||||||
targetType: inline
|
azureSubscription: "Darc: Maestro Production"
|
||||||
pwsh: true
|
scriptType: pscore
|
||||||
script: |
|
scriptLocation: inlineScript
|
||||||
|
inlineScript: |
|
||||||
try {
|
try {
|
||||||
if (!$Env:PromoteToMaestroChannels -or $Env:PromoteToMaestroChannels.Trim() -eq '') {
|
if (!$Env:PromoteToMaestroChannels -or $Env:PromoteToMaestroChannels.Trim() -eq '') {
|
||||||
$Content = Get-Content $(Build.StagingDirectory)/ReleaseConfigs/ReleaseConfigs.txt
|
$Content = Get-Content $(Build.StagingDirectory)/ReleaseConfigs/ReleaseConfigs.txt
|
||||||
|
@ -31,15 +32,16 @@ steps:
|
||||||
$AzureDevOpsBuildId = $Env:Build_BuildId
|
$AzureDevOpsBuildId = $Env:Build_BuildId
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$buildApiEndpoint = "${Env:MaestroApiEndPoint}/api/builds/${Env:BARBuildId}?api-version=${Env:MaestroApiVersion}"
|
. $(Build.SourcesDirectory)\eng\common\tools.ps1
|
||||||
|
$darc = Get-Darc
|
||||||
|
$buildInfo = & $darc get-build `
|
||||||
|
--id ${{ parameters.BARBuildId }} `
|
||||||
|
--extended `
|
||||||
|
--output-format json `
|
||||||
|
--ci `
|
||||||
|
| convertFrom-Json
|
||||||
|
|
||||||
$apiHeaders = New-Object 'System.Collections.Generic.Dictionary[[String],[String]]'
|
$BarId = ${{ parameters.BARBuildId }}
|
||||||
$apiHeaders.Add('Accept', 'application/json')
|
|
||||||
$apiHeaders.Add('Authorization',"Bearer ${Env:MAESTRO_API_TOKEN}")
|
|
||||||
|
|
||||||
$buildInfo = try { Invoke-WebRequest -Method Get -Uri $buildApiEndpoint -Headers $apiHeaders | ConvertFrom-Json } catch { Write-Host "Error: $_" }
|
|
||||||
|
|
||||||
$BarId = $Env:BARBuildId
|
|
||||||
$Channels = $Env:PromoteToMaestroChannels -split ","
|
$Channels = $Env:PromoteToMaestroChannels -split ","
|
||||||
$Channels = $Channels -join "]["
|
$Channels = $Channels -join "]["
|
||||||
$Channels = "[$Channels]"
|
$Channels = "[$Channels]"
|
||||||
|
@ -65,6 +67,4 @@ steps:
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
env:
|
env:
|
||||||
MAESTRO_API_TOKEN: $(MaestroApiAccessToken)
|
|
||||||
BARBuildId: ${{ parameters.BARBuildId }}
|
|
||||||
PromoteToMaestroChannels: ${{ parameters.PromoteToChannelIds }}
|
PromoteToMaestroChannels: ${{ parameters.PromoteToChannelIds }}
|
||||||
|
|
|
@ -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)
|
|
|
@ -1,13 +0,0 @@
|
||||||
parameters:
|
|
||||||
ChannelId: 0
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- task: PowerShell@2
|
|
||||||
displayName: Add Build to Channel
|
|
||||||
inputs:
|
|
||||||
filePath: $(Build.SourcesDirectory)/eng/common/post-build/add-build-to-channel.ps1
|
|
||||||
arguments: -BuildId $(BARBuildId)
|
|
||||||
-ChannelId ${{ parameters.ChannelId }}
|
|
||||||
-MaestroApiAccessToken $(MaestroApiAccessToken)
|
|
||||||
-MaestroApiEndPoint $(MaestroApiEndPoint)
|
|
||||||
-MaestroApiVersion $(MaestroApiVersion)
|
|
|
@ -61,19 +61,24 @@ jobs:
|
||||||
filePath: $(Build.SourcesDirectory)/eng/common/enable-cross-org-publishing.ps1
|
filePath: $(Build.SourcesDirectory)/eng/common/enable-cross-org-publishing.ps1
|
||||||
arguments: -token $(dn-bot-all-orgs-artifact-feeds-rw)
|
arguments: -token $(dn-bot-all-orgs-artifact-feeds-rw)
|
||||||
|
|
||||||
- task: PowerShell@2
|
- task: AzureCLI@2
|
||||||
displayName: Publish Build Assets
|
displayName: Publish Build Assets
|
||||||
|
condition: ${{ parameters.condition }}
|
||||||
|
continueOnError: ${{ parameters.continueOnError }}
|
||||||
inputs:
|
inputs:
|
||||||
filePath: eng\common\sdk-task.ps1
|
azureSubscription: "Darc: Maestro Production"
|
||||||
arguments: -task PublishBuildAssets -restore -msbuildEngine dotnet
|
scriptType: ps
|
||||||
|
scriptLocation: scriptPath
|
||||||
|
scriptPath: eng\common\sdk-task.ps1
|
||||||
|
arguments: >
|
||||||
|
-task PublishBuildAssets
|
||||||
|
-restore
|
||||||
|
-msbuildEngine dotnet
|
||||||
/p:ManifestsPath='$(Build.StagingDirectory)/Download/AssetManifests'
|
/p:ManifestsPath='$(Build.StagingDirectory)/Download/AssetManifests'
|
||||||
/p:BuildAssetRegistryToken=$(MaestroAccessToken)
|
|
||||||
/p:MaestroApiEndpoint=https://maestro.dot.net
|
/p:MaestroApiEndpoint=https://maestro.dot.net
|
||||||
/p:PublishUsingPipelines=${{ parameters.publishUsingPipelines }}
|
/p:PublishUsingPipelines=${{ parameters.publishUsingPipelines }}
|
||||||
/p:Configuration=$(_BuildConfig)
|
/p:Configuration=$(_BuildConfig)
|
||||||
/p:OfficialBuildId=$(Build.BuildNumber)
|
/p:OfficialBuildId=$(Build.BuildNumber)
|
||||||
condition: ${{ parameters.condition }}
|
|
||||||
continueOnError: ${{ parameters.continueOnError }}
|
|
||||||
|
|
||||||
- task: powershell@2
|
- task: powershell@2
|
||||||
displayName: Create ReleaseConfigs Artifact
|
displayName: Create ReleaseConfigs Artifact
|
||||||
|
|
|
@ -11,8 +11,6 @@ variables:
|
||||||
# Default Maestro++ API Endpoint and API Version
|
# Default Maestro++ API Endpoint and API Version
|
||||||
- name: MaestroApiEndPoint
|
- name: MaestroApiEndPoint
|
||||||
value: "https://maestro.dot.net"
|
value: "https://maestro.dot.net"
|
||||||
- name: MaestroApiAccessToken
|
|
||||||
value: $(MaestroAccessToken)
|
|
||||||
- name: MaestroApiVersion
|
- name: MaestroApiVersion
|
||||||
value: "2020-02-20"
|
value: "2020-02-20"
|
||||||
|
|
||||||
|
|
|
@ -125,7 +125,6 @@ stages:
|
||||||
inputs:
|
inputs:
|
||||||
filePath: $(Build.SourcesDirectory)/eng/common/post-build/nuget-validation.ps1
|
filePath: $(Build.SourcesDirectory)/eng/common/post-build/nuget-validation.ps1
|
||||||
arguments: -PackagesPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/
|
arguments: -PackagesPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/
|
||||||
-ToolDestinationPath $(Agent.BuildDirectory)/Extract/
|
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
displayName: Signing Validation
|
displayName: Signing Validation
|
||||||
|
@ -262,14 +261,17 @@ stages:
|
||||||
BARBuildId: ${{ parameters.BARBuildId }}
|
BARBuildId: ${{ parameters.BARBuildId }}
|
||||||
PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }}
|
PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }}
|
||||||
|
|
||||||
- task: PowerShell@2
|
- task: AzureCLI@2
|
||||||
displayName: Publish Using Darc
|
displayName: Publish Using Darc
|
||||||
inputs:
|
inputs:
|
||||||
filePath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1
|
azureSubscription: "Darc: Maestro Production"
|
||||||
arguments: -BuildId $(BARBuildId)
|
scriptType: ps
|
||||||
|
scriptLocation: scriptPath
|
||||||
|
scriptPath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1
|
||||||
|
arguments: >
|
||||||
|
-BuildId $(BARBuildId)
|
||||||
-PublishingInfraVersion ${{ parameters.publishingInfraVersion }}
|
-PublishingInfraVersion ${{ parameters.publishingInfraVersion }}
|
||||||
-AzdoToken '$(publishing-dnceng-devdiv-code-r-build-re)'
|
-AzdoToken '$(System.AccessToken)'
|
||||||
-MaestroToken '$(MaestroApiAccessToken)'
|
|
||||||
-WaitPublishingFinish true
|
-WaitPublishingFinish true
|
||||||
-ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}'
|
-ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}'
|
||||||
-SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}'
|
-SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}'
|
||||||
|
|
|
@ -11,13 +11,14 @@ steps:
|
||||||
artifactName: ReleaseConfigs
|
artifactName: ReleaseConfigs
|
||||||
checkDownloadedFiles: true
|
checkDownloadedFiles: true
|
||||||
|
|
||||||
- task: PowerShell@2
|
- task: AzureCLI@2
|
||||||
name: setReleaseVars
|
name: setReleaseVars
|
||||||
displayName: Set Release Configs Vars
|
displayName: Set Release Configs Vars
|
||||||
inputs:
|
inputs:
|
||||||
targetType: inline
|
azureSubscription: "Darc: Maestro Production"
|
||||||
pwsh: true
|
scriptType: pscore
|
||||||
script: |
|
scriptLocation: inlineScript
|
||||||
|
inlineScript: |
|
||||||
try {
|
try {
|
||||||
if (!$Env:PromoteToMaestroChannels -or $Env:PromoteToMaestroChannels.Trim() -eq '') {
|
if (!$Env:PromoteToMaestroChannels -or $Env:PromoteToMaestroChannels.Trim() -eq '') {
|
||||||
$Content = Get-Content $(Build.StagingDirectory)/ReleaseConfigs/ReleaseConfigs.txt
|
$Content = Get-Content $(Build.StagingDirectory)/ReleaseConfigs/ReleaseConfigs.txt
|
||||||
|
@ -31,15 +32,16 @@ steps:
|
||||||
$AzureDevOpsBuildId = $Env:Build_BuildId
|
$AzureDevOpsBuildId = $Env:Build_BuildId
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$buildApiEndpoint = "${Env:MaestroApiEndPoint}/api/builds/${Env:BARBuildId}?api-version=${Env:MaestroApiVersion}"
|
. $(Build.SourcesDirectory)\eng\common\tools.ps1
|
||||||
|
$darc = Get-Darc
|
||||||
|
$buildInfo = & $darc get-build `
|
||||||
|
--id ${{ parameters.BARBuildId }} `
|
||||||
|
--extended `
|
||||||
|
--output-format json `
|
||||||
|
--ci `
|
||||||
|
| convertFrom-Json
|
||||||
|
|
||||||
$apiHeaders = New-Object 'System.Collections.Generic.Dictionary[[String],[String]]'
|
$BarId = ${{ parameters.BARBuildId }}
|
||||||
$apiHeaders.Add('Accept', 'application/json')
|
|
||||||
$apiHeaders.Add('Authorization',"Bearer ${Env:MAESTRO_API_TOKEN}")
|
|
||||||
|
|
||||||
$buildInfo = try { Invoke-WebRequest -Method Get -Uri $buildApiEndpoint -Headers $apiHeaders | ConvertFrom-Json } catch { Write-Host "Error: $_" }
|
|
||||||
|
|
||||||
$BarId = $Env:BARBuildId
|
|
||||||
$Channels = $Env:PromoteToMaestroChannels -split ","
|
$Channels = $Env:PromoteToMaestroChannels -split ","
|
||||||
$Channels = $Channels -join "]["
|
$Channels = $Channels -join "]["
|
||||||
$Channels = "[$Channels]"
|
$Channels = "[$Channels]"
|
||||||
|
@ -65,6 +67,4 @@ steps:
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
env:
|
env:
|
||||||
MAESTRO_API_TOKEN: $(MaestroApiAccessToken)
|
|
||||||
BARBuildId: ${{ parameters.BARBuildId }}
|
|
||||||
PromoteToMaestroChannels: ${{ parameters.PromoteToChannelIds }}
|
PromoteToMaestroChannels: ${{ parameters.PromoteToChannelIds }}
|
||||||
|
|
|
@ -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)
|
|
|
@ -1,13 +0,0 @@
|
||||||
parameters:
|
|
||||||
ChannelId: 0
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- task: PowerShell@2
|
|
||||||
displayName: Add Build to Channel
|
|
||||||
inputs:
|
|
||||||
filePath: $(Build.SourcesDirectory)/eng/common/post-build/add-build-to-channel.ps1
|
|
||||||
arguments: -BuildId $(BARBuildId)
|
|
||||||
-ChannelId ${{ parameters.ChannelId }}
|
|
||||||
-MaestroApiAccessToken $(MaestroApiAccessToken)
|
|
||||||
-MaestroApiEndPoint $(MaestroApiEndPoint)
|
|
||||||
-MaestroApiVersion $(MaestroApiVersion)
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"tools": {
|
"tools": {
|
||||||
"dotnet": "6.0.132",
|
"dotnet": "6.0.133",
|
||||||
"runtimes": {
|
"runtimes": {
|
||||||
"dotnet": [
|
"dotnet": [
|
||||||
"$(VSRedistCommonNetCoreSharedFrameworkx6460PackageVersion)"
|
"$(VSRedistCommonNetCoreSharedFrameworkx6460PackageVersion)"
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
"cmake": "3.16.4"
|
"cmake": "3.16.4"
|
||||||
},
|
},
|
||||||
"msbuild-sdks": {
|
"msbuild-sdks": {
|
||||||
"Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.24367.5",
|
"Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.24459.5",
|
||||||
"Microsoft.DotNet.CMake.Sdk": "6.0.0-beta.24367.5"
|
"Microsoft.DotNet.CMake.Sdk": "6.0.0-beta.24459.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue