[master] Update dependencies from dotnet/arcade (#3469)
* Update dependencies from https://github.com/dotnet/arcade build 20190725.15 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19375.15 * Update dependencies from https://github.com/dotnet/arcade build 20190726.18 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19376.18
This commit is contained in:
parent
fc791931b6
commit
cff0723064
34 changed files with 334 additions and 226 deletions
|
@ -65,9 +65,9 @@
|
||||||
</Dependency>
|
</Dependency>
|
||||||
</ProductDependencies>
|
</ProductDependencies>
|
||||||
<ToolsetDependencies>
|
<ToolsetDependencies>
|
||||||
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19373.6">
|
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19376.18">
|
||||||
<Uri>https://github.com/dotnet/arcade</Uri>
|
<Uri>https://github.com/dotnet/arcade</Uri>
|
||||||
<Sha>56b5e5a9debc87b98c5dd394e8a72c916099d9d5</Sha>
|
<Sha>316481e57ee5e6acbbf2401eb6778a1d3d48d25b</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
</ToolsetDependencies>
|
</ToolsetDependencies>
|
||||||
</Dependencies>
|
</Dependencies>
|
||||||
|
|
0
eng/common/cross/armel/tizen-build-rootfs.sh
Normal file → Executable file
0
eng/common/cross/armel/tizen-build-rootfs.sh
Normal file → Executable file
0
eng/common/cross/armel/tizen-fetch.sh
Normal file → Executable file
0
eng/common/cross/armel/tizen-fetch.sh
Normal file → Executable file
0
eng/common/cross/build-android-rootfs.sh
Normal file → Executable file
0
eng/common/cross/build-android-rootfs.sh
Normal file → Executable file
0
eng/common/cross/build-rootfs.sh
Normal file → Executable file
0
eng/common/cross/build-rootfs.sh
Normal file → Executable file
0
eng/common/dotnet-install.sh
vendored
Normal file → Executable file
0
eng/common/dotnet-install.sh
vendored
Normal file → Executable file
|
@ -98,7 +98,7 @@ try {
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Verbose "Installing $ToolName version $ToolVersion"
|
Write-Verbose "Installing $ToolName version $ToolVersion"
|
||||||
Write-Verbose "Executing '$InstallerPath $($LocalInstallerArguments.Keys.ForEach({"-$_ `"$($LocalInstallerArguments.$_)`""}) -join ' ')'"
|
Write-Verbose "Executing '$InstallerPath $($LocalInstallerArguments.Keys.ForEach({"-$_ '$($LocalInstallerArguments.$_)'"}) -join ' ')'"
|
||||||
& $InstallerPath @LocalInstallerArguments
|
& $InstallerPath @LocalInstallerArguments
|
||||||
if ($LASTEXITCODE -Ne "0") {
|
if ($LASTEXITCODE -Ne "0") {
|
||||||
$errMsg = "$ToolName installation failed"
|
$errMsg = "$ToolName installation failed"
|
||||||
|
|
0
eng/common/init-tools-native.sh
Normal file → Executable file
0
eng/common/init-tools-native.sh
Normal file → Executable file
0
eng/common/internal-feed-operations.sh
Normal file → Executable file
0
eng/common/internal-feed-operations.sh
Normal file → Executable file
|
@ -59,9 +59,38 @@ function DownloadAndExtract {
|
||||||
-Verbose:$Verbose
|
-Verbose:$Verbose
|
||||||
|
|
||||||
if ($UnzipStatus -Eq $False) {
|
if ($UnzipStatus -Eq $False) {
|
||||||
Write-Error "Unzip failed"
|
# Retry Download one more time with Force=true
|
||||||
return $False
|
$DownloadRetryStatus = CommonLibrary\Get-File -Uri $Uri `
|
||||||
|
-Path $TempToolPath `
|
||||||
|
-DownloadRetries 1 `
|
||||||
|
-RetryWaitTimeInSeconds $RetryWaitTimeInSeconds `
|
||||||
|
-Force:$True `
|
||||||
|
-Verbose:$Verbose
|
||||||
|
|
||||||
|
if ($DownloadRetryStatus -Eq $False) {
|
||||||
|
Write-Error "Last attempt of download failed as well"
|
||||||
|
return $False
|
||||||
|
}
|
||||||
|
|
||||||
|
# Retry unzip again one more time with Force=true
|
||||||
|
$UnzipRetryStatus = CommonLibrary\Expand-Zip -ZipPath $TempToolPath `
|
||||||
|
-OutputDirectory $InstallDirectory `
|
||||||
|
-Force:$True `
|
||||||
|
-Verbose:$Verbose
|
||||||
|
if ($UnzipRetryStatus -Eq $False)
|
||||||
|
{
|
||||||
|
Write-Error "Last attempt of unzip failed as well"
|
||||||
|
# Clean up partial zips and extracts
|
||||||
|
if (Test-Path $TempToolPath) {
|
||||||
|
Remove-Item $TempToolPath -Force
|
||||||
|
}
|
||||||
|
if (Test-Path $InstallDirectory) {
|
||||||
|
Remove-Item $InstallDirectory -Force -Recurse
|
||||||
|
}
|
||||||
|
return $False
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $True
|
return $True
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
0
eng/common/native/common-library.sh
Normal file → Executable file
0
eng/common/native/common-library.sh
Normal file → Executable file
0
eng/common/native/install-cmake.sh
Normal file → Executable file
0
eng/common/native/install-cmake.sh
Normal file → Executable file
0
eng/common/performance/performance-setup.sh
Normal file → Executable file
0
eng/common/performance/performance-setup.sh
Normal file → Executable file
0
eng/common/pipeline-logging-functions.sh
Normal file → Executable file
0
eng/common/pipeline-logging-functions.sh
Normal file → Executable file
35
eng/common/post-build/darc-gather-drop.ps1
Normal file
35
eng/common/post-build/darc-gather-drop.ps1
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
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
|
||||||
|
)
|
||||||
|
|
||||||
|
. $PSScriptRoot\post-build-utils.ps1
|
||||||
|
|
||||||
|
try {
|
||||||
|
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..."
|
||||||
|
ExitWithExitCode $exitCode
|
||||||
|
}
|
||||||
|
|
||||||
|
darc gather-drop --non-shipping `
|
||||||
|
--continue-on-error `
|
||||||
|
--id $BarBuildId `
|
||||||
|
--output-dir $DropLocation `
|
||||||
|
--bar-uri $MaestroApiEndpoint `
|
||||||
|
--password $MaestroApiAccessToken `
|
||||||
|
--latest-location
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
Write-Host $_
|
||||||
|
Write-Host $_.Exception
|
||||||
|
Write-Host $_.ScriptStackTrace
|
||||||
|
ExitWithExitCode 1
|
||||||
|
}
|
|
@ -6,10 +6,7 @@ param(
|
||||||
[Parameter(Mandatory=$true)][string] $ToolDestinationPath # Where the validation tool should be downloaded to
|
[Parameter(Mandatory=$true)][string] $ToolDestinationPath # Where the validation tool should be downloaded to
|
||||||
)
|
)
|
||||||
|
|
||||||
$ErrorActionPreference = "Stop"
|
. $PSScriptRoot\post-build-utils.ps1
|
||||||
Set-StrictMode -Version 2.0
|
|
||||||
|
|
||||||
. $PSScriptRoot\..\tools.ps1
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$url = "https://raw.githubusercontent.com/NuGet/NuGetGallery/jver-verify/src/VerifyMicrosoftPackage/verify.ps1"
|
$url = "https://raw.githubusercontent.com/NuGet/NuGetGallery/jver-verify/src/VerifyMicrosoftPackage/verify.ps1"
|
||||||
|
|
90
eng/common/post-build/post-build-utils.ps1
Normal file
90
eng/common/post-build/post-build-utils.ps1
Normal file
|
@ -0,0 +1,90 @@
|
||||||
|
# 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
|
||||||
|
. $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 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 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 Validate-MaestroVars {
|
||||||
|
try {
|
||||||
|
Get-Variable MaestroApiEndPoint -Scope Global | Out-Null
|
||||||
|
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'"
|
||||||
|
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'"
|
||||||
|
ExitWithExitCode 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
Write-PipelineTaskError "Error: Variables `MaestroApiEndPoint`, `MaestroApiVersion` and `MaestroApiAccessToken` are required while using this script."
|
||||||
|
Write-Host $_
|
||||||
|
ExitWithExitCode 1
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,30 +1,25 @@
|
||||||
param(
|
param(
|
||||||
[Parameter(Mandatory=$true)][int] $BuildId,
|
[Parameter(Mandatory=$true)][int] $BuildId,
|
||||||
[Parameter(Mandatory=$true)][int] $ChannelId,
|
[Parameter(Mandatory=$true)][int] $ChannelId,
|
||||||
[Parameter(Mandatory=$true)][string] $BarToken,
|
[Parameter(Mandatory=$true)][string] $MaestroApiAccessToken,
|
||||||
[string] $MaestroEndpoint = "https://maestro-prod.westus2.cloudapp.azure.com",
|
[Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = "https://maestro-prod.westus2.cloudapp.azure.com",
|
||||||
[string] $ApiVersion = "2019-01-16"
|
[Parameter(Mandatory=$false)][string] $MaestroApiVersion = "2019-01-16"
|
||||||
)
|
)
|
||||||
|
|
||||||
$ErrorActionPreference = "Stop"
|
. $PSScriptRoot\post-build-utils.ps1
|
||||||
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 {
|
try {
|
||||||
$maestroHeaders = Get-Headers 'application/json' $BarToken
|
# 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!"
|
||||||
|
ExitWithExitCode 1
|
||||||
|
}
|
||||||
|
|
||||||
# Get info about which channels the build has already been promoted to
|
# Get info about which channels the build has already been promoted to
|
||||||
$getBuildApiEndpoint = "$MaestroEndpoint/api/builds/${BuildId}?api-version=$ApiVersion"
|
$buildInfo = Get-MaestroBuild -BuildId $BuildId
|
||||||
$buildInfo = Invoke-WebRequest -Method Get -Uri $getBuildApiEndpoint -Headers $maestroHeaders | ConvertFrom-Json
|
|
||||||
|
|
||||||
if (!$buildInfo) {
|
if (!$buildInfo) {
|
||||||
Write-Host "Build with BAR ID $BuildId was not found in BAR!"
|
Write-Host "Build with BAR ID $BuildId was not found in BAR!"
|
||||||
ExitWithExitCode 1
|
ExitWithExitCode 1
|
||||||
|
@ -40,10 +35,10 @@ try {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Host "Build not present in channel $ChannelId. Promoting build ... "
|
Write-Host "Promoting build '$BuildId' to channel '$ChannelId'."
|
||||||
|
|
||||||
|
Assign-BuildToChannel -BuildId $BuildId -ChannelId $ChannelId
|
||||||
|
|
||||||
$promoteBuildApiEndpoint = "$maestroEndpoint/api/channels/${ChannelId}/builds/${BuildId}?api-version=$ApiVersion"
|
|
||||||
Invoke-WebRequest -Method Post -Uri $promoteBuildApiEndpoint -Headers $maestroHeaders
|
|
||||||
Write-Host "done."
|
Write-Host "done."
|
||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
|
|
26
eng/common/post-build/setup-maestro-vars.ps1
Normal file
26
eng/common/post-build/setup-maestro-vars.ps1
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
param(
|
||||||
|
[Parameter(Mandatory=$true)][string] $ReleaseConfigsPath # Full path to ReleaseConfigs.txt asset
|
||||||
|
)
|
||||||
|
|
||||||
|
. $PSScriptRoot\post-build-utils.ps1
|
||||||
|
|
||||||
|
try {
|
||||||
|
$Content = Get-Content $ReleaseConfigsPath
|
||||||
|
|
||||||
|
$BarId = $Content | Select -Index 0
|
||||||
|
|
||||||
|
$Channels = ""
|
||||||
|
$Content | Select -Index 1 | ForEach-Object { $Channels += "$_ ," }
|
||||||
|
|
||||||
|
$IsStableBuild = $Content | Select -Index 2
|
||||||
|
|
||||||
|
Write-PipelineSetVariable -Name 'BARBuildId' -Value $BarId
|
||||||
|
Write-PipelineSetVariable -Name 'InitialChannels' -Value "$Channels"
|
||||||
|
Write-PipelineSetVariable -Name 'IsStableBuild' -Value $IsStableBuild
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
Write-Host $_
|
||||||
|
Write-Host $_.Exception
|
||||||
|
Write-Host $_.ScriptStackTrace
|
||||||
|
ExitWithExitCode 1
|
||||||
|
}
|
|
@ -6,10 +6,7 @@ param(
|
||||||
[Parameter(Mandatory=$true)][string] $SourcelinkCliVersion # Version of SourceLink CLI to use
|
[Parameter(Mandatory=$true)][string] $SourcelinkCliVersion # Version of SourceLink CLI to use
|
||||||
)
|
)
|
||||||
|
|
||||||
$ErrorActionPreference = "Stop"
|
. $PSScriptRoot\post-build-utils.ps1
|
||||||
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
|
# in the repository at a specific commit point. This is populated by inserting
|
||||||
|
@ -200,21 +197,27 @@ function ValidateSourceLinkLinks {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function CheckExitCode ([string]$stage) {
|
function InstallSourcelinkCli {
|
||||||
$exitCode = $LASTEXITCODE
|
$sourcelinkCliPackageName = "sourcelink"
|
||||||
if ($exitCode -ne 0) {
|
|
||||||
Write-PipelineTaskError "Something failed while '$stage'. Check for errors above. Exiting now..."
|
$dotnetRoot = InitializeDotNetCli -install:$true
|
||||||
ExitWithExitCode $exitCode
|
$dotnet = "$dotnetRoot\dotnet.exe"
|
||||||
|
$toolList = & "$dotnet" tool list --global
|
||||||
|
|
||||||
|
if (($toolList -like "*$sourcelinkCliPackageName*") -and ($toolList -like "*$sourcelinkCliVersion*")) {
|
||||||
|
Write-Host "SourceLink CLI version $sourcelinkCliVersion is already installed."
|
||||||
|
}
|
||||||
|
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."
|
||||||
|
& "$dotnet" tool install $sourcelinkCliPackageName --version $sourcelinkCliVersion --verbosity "minimal" --global
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Write-Host "Installing SourceLink CLI..."
|
InstallSourcelinkCli
|
||||||
Get-Location
|
|
||||||
. $PSScriptRoot\sourcelink-cli-init.ps1 -sourcelinkCliVersion $SourcelinkCliVersion
|
|
||||||
CheckExitCode "Running sourcelink-cli-init"
|
|
||||||
|
|
||||||
Measure-Command { ValidateSourceLinkLinks }
|
ValidateSourceLinkLinks
|
||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
Write-Host $_
|
Write-Host $_
|
||||||
|
|
|
@ -4,10 +4,7 @@ param(
|
||||||
[Parameter(Mandatory=$true)][string] $DotnetSymbolVersion # Version of dotnet symbol to use
|
[Parameter(Mandatory=$true)][string] $DotnetSymbolVersion # Version of dotnet symbol to use
|
||||||
)
|
)
|
||||||
|
|
||||||
$ErrorActionPreference = "Stop"
|
. $PSScriptRoot\post-build-utils.ps1
|
||||||
Set-StrictMode -Version 2.0
|
|
||||||
|
|
||||||
. $PSScriptRoot\..\tools.ps1
|
|
||||||
|
|
||||||
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
||||||
|
|
||||||
|
@ -162,19 +159,25 @@ function CheckSymbolsAvailable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function CheckExitCode ([string]$stage) {
|
function Installdotnetsymbol {
|
||||||
$exitCode = $LASTEXITCODE
|
$dotnetsymbolPackageName = "dotnet-symbol"
|
||||||
if ($exitCode -ne 0) {
|
|
||||||
Write-PipelineTaskError "Something failed while '$stage'. Check for errors above. Exiting now..."
|
$dotnetRoot = InitializeDotNetCli -install:$true
|
||||||
ExitWithExitCode $exitCode
|
$dotnet = "$dotnetRoot\dotnet.exe"
|
||||||
|
$toolList = & "$dotnet" tool list --global
|
||||||
|
|
||||||
|
if (($toolList -like "*$dotnetsymbolPackageName*") -and ($toolList -like "*$dotnetsymbolVersion*")) {
|
||||||
|
Write-Host "dotnet-symbol version $dotnetsymbolVersion is already installed."
|
||||||
|
}
|
||||||
|
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."
|
||||||
|
& "$dotnet" tool install $dotnetsymbolPackageName --version $dotnetsymbolVersion --verbosity "minimal" --global
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Write-Host "Installing dotnet symbol ..."
|
Installdotnetsymbol
|
||||||
Get-Location
|
|
||||||
. $PSScriptRoot\dotnetsymbol-init.ps1 -dotnetsymbolVersion $DotnetSymbolVersion
|
|
||||||
CheckExitCode "Running dotnetsymbol-init"
|
|
||||||
|
|
||||||
CheckSymbolsAvailable
|
CheckSymbolsAvailable
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,33 +1,20 @@
|
||||||
param(
|
param(
|
||||||
[Parameter(Mandatory=$true)][string] $SourceRepo,
|
[Parameter(Mandatory=$true)][string] $SourceRepo,
|
||||||
[Parameter(Mandatory=$true)][int] $ChannelId,
|
[Parameter(Mandatory=$true)][int] $ChannelId,
|
||||||
[string] $MaestroEndpoint = "https://maestro-prod.westus2.cloudapp.azure.com",
|
[Parameter(Mandatory=$true)][string] $MaestroApiAccessToken,
|
||||||
[string] $BarToken,
|
[Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = "https://maestro-prod.westus2.cloudapp.azure.com",
|
||||||
[string] $ApiVersion = "2019-01-16"
|
[Parameter(Mandatory=$false)][string] $MaestroApiVersion = "2019-01-16"
|
||||||
)
|
)
|
||||||
|
|
||||||
$ErrorActionPreference = "Stop"
|
. $PSScriptRoot\post-build-utils.ps1
|
||||||
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
|
# Get all the $SourceRepo subscriptions
|
||||||
$normalizedSourceRepo = $SourceRepo.Replace('dnceng@', '')
|
$normalizedSourceRepo = $SourceRepo.Replace('dnceng@', '')
|
||||||
$getSubscriptionsApiEndpoint = "$maestroEndpoint/api/subscriptions?sourceRepository=$normalizedSourceRepo&api-version=$apiVersion"
|
$subscriptions = Get-MaestroSubscriptions -SourceRepository $normalizedSourceRepo -ChannelId $ChannelId
|
||||||
$headers = Get-Headers 'application/json' $barToken
|
|
||||||
|
|
||||||
$subscriptions = Invoke-WebRequest -Uri $getSubscriptionsApiEndpoint -Headers $headers | ConvertFrom-Json
|
|
||||||
|
|
||||||
if (!$subscriptions) {
|
if (!$subscriptions) {
|
||||||
Write-Host "No subscriptions found for source repo '$normalizedSourceRepo' in channel '$ChannelId'"
|
Write-Host "No subscriptions found for source repo '$normalizedSourceRepo' in channel '$ChannelId'"
|
||||||
return
|
ExitWithExitCode 0
|
||||||
}
|
}
|
||||||
|
|
||||||
$subscriptionsToTrigger = New-Object System.Collections.Generic.List[string]
|
$subscriptionsToTrigger = New-Object System.Collections.Generic.List[string]
|
||||||
|
@ -36,21 +23,18 @@ $failedTriggeredSubscription = $false
|
||||||
# Get all enabled subscriptions that need dependency flow on 'everyBuild'
|
# Get all enabled subscriptions that need dependency flow on 'everyBuild'
|
||||||
foreach ($subscription in $subscriptions) {
|
foreach ($subscription in $subscriptions) {
|
||||||
if ($subscription.enabled -and $subscription.policy.updateFrequency -like 'everyBuild' -and $subscription.channel.id -eq $ChannelId) {
|
if ($subscription.enabled -and $subscription.policy.updateFrequency -like 'everyBuild' -and $subscription.channel.id -eq $ChannelId) {
|
||||||
Write-Host "$subscription.id"
|
Write-Host "Should trigger this subscription: $subscription.id"
|
||||||
[void]$subscriptionsToTrigger.Add($subscription.id)
|
[void]$subscriptionsToTrigger.Add($subscription.id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($subscriptionToTrigger in $subscriptionsToTrigger) {
|
foreach ($subscriptionToTrigger in $subscriptionsToTrigger) {
|
||||||
try {
|
try {
|
||||||
$triggerSubscriptionApiEndpoint = "$maestroEndpoint/api/subscriptions/$subscriptionToTrigger/trigger?api-version=$apiVersion"
|
Write-Host "Triggering subscription '$subscriptionToTrigger'."
|
||||||
$headers = Get-Headers 'application/json' $BarToken
|
|
||||||
|
|
||||||
Write-Host "Triggering subscription '$subscriptionToTrigger'..."
|
|
||||||
|
|
||||||
Invoke-WebRequest -Uri $triggerSubscriptionApiEndpoint -Headers $headers -Method Post
|
Trigger-Subscription -SubscriptionId $subscriptionToTrigger
|
||||||
|
|
||||||
Write-Host "Subscription '$subscriptionToTrigger' triggered!"
|
Write-Host "done."
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
|
@ -61,9 +45,13 @@ foreach ($subscriptionToTrigger in $subscriptionsToTrigger) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($failedTriggeredSubscription) {
|
if ($subscriptionsToTrigger.Count -eq 0) {
|
||||||
|
Write-Host "No subscription matched source repo '$normalizedSourceRepo' and channel ID '$ChannelId'."
|
||||||
|
}
|
||||||
|
elseif ($failedTriggeredSubscription) {
|
||||||
Write-Host "At least one subscription failed to be triggered..."
|
Write-Host "At least one subscription failed to be triggered..."
|
||||||
ExitWithExitCode 1
|
ExitWithExitCode 1
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
Write-Host "All subscriptions were triggered successfully!"
|
Write-Host "All subscriptions were triggered successfully!"
|
||||||
|
}
|
||||||
|
|
|
@ -41,7 +41,6 @@ stages:
|
||||||
dependsOn: setupMaestroVars
|
dependsOn: setupMaestroVars
|
||||||
variables:
|
variables:
|
||||||
- group: DotNet-Blob-Feed
|
- group: DotNet-Blob-Feed
|
||||||
- group: Publish-Build-Assets
|
|
||||||
- group: AzureDevOps-Artifact-Feeds-Pats
|
- group: AzureDevOps-Artifact-Feeds-Pats
|
||||||
- name: BARBuildId
|
- name: BARBuildId
|
||||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
|
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
|
||||||
|
@ -87,8 +86,8 @@ stages:
|
||||||
/p:StaticInternalFeed=$(dotnetfeed-internal-nonstable-feed-url)
|
/p:StaticInternalFeed=$(dotnetfeed-internal-nonstable-feed-url)
|
||||||
/p:NugetPath=$(Agent.BuildDirectory)\Nuget\NuGet.exe
|
/p:NugetPath=$(Agent.BuildDirectory)\Nuget\NuGet.exe
|
||||||
/p:BARBuildId=$(BARBuildId)
|
/p:BARBuildId=$(BARBuildId)
|
||||||
/p:MaestroApiEndpoint='https://maestro-prod.westus2.cloudapp.azure.com'
|
/p:MaestroApiEndpoint='$(MaestroApiEndPoint)'
|
||||||
/p:BuildAssetRegistryToken='$(MaestroAccessToken)'
|
/p:BuildAssetRegistryToken='$(MaestroApiAccessToken)'
|
||||||
/p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/'
|
/p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/'
|
||||||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)\BlobArtifacts'
|
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)\BlobArtifacts'
|
||||||
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)\PackageArtifacts'
|
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)\PackageArtifacts'
|
||||||
|
@ -143,29 +142,6 @@ stages:
|
||||||
filePath: $(Build.SourcesDirectory)/eng/common/post-build/symbols-validation.ps1
|
filePath: $(Build.SourcesDirectory)/eng/common/post-build/symbols-validation.ps1
|
||||||
arguments: -InputPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/ -ExtractPath $(Agent.BuildDirectory)/Temp/ -DotnetSymbolVersion $(SymbolToolVersion)
|
arguments: -InputPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/ -ExtractPath $(Agent.BuildDirectory)/Temp/ -DotnetSymbolVersion $(SymbolToolVersion)
|
||||||
|
|
||||||
- job:
|
|
||||||
displayName: Gather Drop
|
|
||||||
dependsOn: setupMaestroVars
|
|
||||||
variables:
|
|
||||||
BARBuildId: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
|
|
||||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], variables.InternalServicing_30_Channel_Id)
|
|
||||||
pool:
|
|
||||||
vmImage: 'windows-2019'
|
|
||||||
steps:
|
|
||||||
- task: PowerShell@2
|
|
||||||
displayName: Setup Darc CLI
|
|
||||||
inputs:
|
|
||||||
targetType: filePath
|
|
||||||
filePath: '$(Build.SourcesDirectory)/eng/common/darc-init.ps1'
|
|
||||||
|
|
||||||
- task: PowerShell@2
|
|
||||||
displayName: Run Darc gather-drop
|
|
||||||
inputs:
|
|
||||||
targetType: inline
|
|
||||||
script: |
|
|
||||||
darc gather-drop --non-shipping --continue-on-error --id $(BARBuildId) --output-dir $(Agent.BuildDirectory)/Temp/Drop/ --bar-uri https://maestro-prod.westus2.cloudapp.azure.com/ --password $(MaestroAccessToken) --latest-location
|
|
||||||
enabled: false
|
|
||||||
|
|
||||||
- template: ../promote-build.yml
|
- template: ../promote-build.yml
|
||||||
parameters:
|
parameters:
|
||||||
ChannelId: ${{ variables.InternalServicing_30_Channel_Id }}
|
ChannelId: ${{ variables.InternalServicing_30_Channel_Id }}
|
||||||
|
|
|
@ -41,7 +41,6 @@ stages:
|
||||||
dependsOn: setupMaestroVars
|
dependsOn: setupMaestroVars
|
||||||
variables:
|
variables:
|
||||||
- group: DotNet-Blob-Feed
|
- group: DotNet-Blob-Feed
|
||||||
- group: Publish-Build-Assets
|
|
||||||
- group: AzureDevOps-Artifact-Feeds-Pats
|
- group: AzureDevOps-Artifact-Feeds-Pats
|
||||||
- name: BARBuildId
|
- name: BARBuildId
|
||||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
|
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
|
||||||
|
@ -77,7 +76,7 @@ stages:
|
||||||
filePath: eng\common\sdk-task.ps1
|
filePath: eng\common\sdk-task.ps1
|
||||||
arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet
|
arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet
|
||||||
/p:ChannelId=$(PublicDevRelease_30_Channel_Id)
|
/p:ChannelId=$(PublicDevRelease_30_Channel_Id)
|
||||||
/p:ArtifactsCategory=.NetCore
|
/p:ArtifactsCategory=$(_DotNetArtifactsCategory)
|
||||||
/p:IsStableBuild=$(IsStableBuild)
|
/p:IsStableBuild=$(IsStableBuild)
|
||||||
/p:IsInternalBuild=$(IsInternalBuild)
|
/p:IsInternalBuild=$(IsInternalBuild)
|
||||||
/p:RepositoryName=$(Build.Repository.Name)
|
/p:RepositoryName=$(Build.Repository.Name)
|
||||||
|
@ -87,8 +86,8 @@ stages:
|
||||||
/p:TargetFeedPAT='$(dn-bot-dnceng-unviersal-packages-rw)'
|
/p:TargetFeedPAT='$(dn-bot-dnceng-unviersal-packages-rw)'
|
||||||
/p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)'
|
/p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)'
|
||||||
/p:BARBuildId=$(BARBuildId)
|
/p:BARBuildId=$(BARBuildId)
|
||||||
/p:MaestroApiEndpoint='https://maestro-prod.westus2.cloudapp.azure.com'
|
/p:MaestroApiEndpoint='$(MaestroApiEndPoint)'
|
||||||
/p:BuildAssetRegistryToken='$(MaestroAccessToken)'
|
/p:BuildAssetRegistryToken='$(MaestroApiAccessToken)'
|
||||||
/p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/'
|
/p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/'
|
||||||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/'
|
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/'
|
||||||
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/'
|
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/'
|
||||||
|
@ -140,27 +139,9 @@ stages:
|
||||||
filePath: $(Build.SourcesDirectory)/eng/common/post-build/symbols-validation.ps1
|
filePath: $(Build.SourcesDirectory)/eng/common/post-build/symbols-validation.ps1
|
||||||
arguments: -InputPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/ -ExtractPath $(Agent.BuildDirectory)/Temp/ -DotnetSymbolVersion $(SymbolToolVersion)
|
arguments: -InputPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/ -ExtractPath $(Agent.BuildDirectory)/Temp/ -DotnetSymbolVersion $(SymbolToolVersion)
|
||||||
|
|
||||||
- job:
|
- template: ../darc-gather-drop.yml
|
||||||
displayName: Gather Drop
|
parameters:
|
||||||
dependsOn: setupMaestroVars
|
ChannelId: ${{ variables.PublicDevRelease_30_Channel_Id }}
|
||||||
variables:
|
|
||||||
BARBuildId: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
|
|
||||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], variables.PublicDevRelease_30_Channel_Id)
|
|
||||||
pool:
|
|
||||||
vmImage: 'windows-2019'
|
|
||||||
steps:
|
|
||||||
- task: PowerShell@2
|
|
||||||
displayName: Setup Darc CLI
|
|
||||||
inputs:
|
|
||||||
targetType: filePath
|
|
||||||
filePath: '$(Build.SourcesDirectory)/eng/common/darc-init.ps1'
|
|
||||||
|
|
||||||
- task: PowerShell@2
|
|
||||||
displayName: Run Darc gather-drop
|
|
||||||
inputs:
|
|
||||||
targetType: inline
|
|
||||||
script: |
|
|
||||||
darc gather-drop --non-shipping --continue-on-error --id $(BARBuildId) --output-dir $(Agent.BuildDirectory)/Temp/Drop/ --bar-uri https://maestro-prod.westus2.cloudapp.azure.com/ --password $(MaestroAccessToken) --latest-location
|
|
||||||
|
|
||||||
- template: ../promote-build.yml
|
- template: ../promote-build.yml
|
||||||
parameters:
|
parameters:
|
||||||
|
|
|
@ -41,7 +41,6 @@ stages:
|
||||||
dependsOn: setupMaestroVars
|
dependsOn: setupMaestroVars
|
||||||
variables:
|
variables:
|
||||||
- group: DotNet-Blob-Feed
|
- group: DotNet-Blob-Feed
|
||||||
- group: Publish-Build-Assets
|
|
||||||
- group: AzureDevOps-Artifact-Feeds-Pats
|
- group: AzureDevOps-Artifact-Feeds-Pats
|
||||||
- name: BARBuildId
|
- name: BARBuildId
|
||||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
|
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
|
||||||
|
@ -87,8 +86,8 @@ stages:
|
||||||
/p:StaticInternalFeed=$(dotnetfeed-internal-nonstable-feed-url)
|
/p:StaticInternalFeed=$(dotnetfeed-internal-nonstable-feed-url)
|
||||||
/p:NugetPath=$(Agent.BuildDirectory)\Nuget\NuGet.exe
|
/p:NugetPath=$(Agent.BuildDirectory)\Nuget\NuGet.exe
|
||||||
/p:BARBuildId=$(BARBuildId)
|
/p:BARBuildId=$(BARBuildId)
|
||||||
/p:MaestroApiEndpoint='https://maestro-prod.westus2.cloudapp.azure.com'
|
/p:MaestroApiEndpoint='$(MaestroApiEndPoint)'
|
||||||
/p:BuildAssetRegistryToken='$(MaestroAccessToken)'
|
/p:BuildAssetRegistryToken='$(MaestroApiAccessToken)'
|
||||||
/p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/'
|
/p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/'
|
||||||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)\BlobArtifacts'
|
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)\BlobArtifacts'
|
||||||
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)\PackageArtifacts'
|
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)\PackageArtifacts'
|
||||||
|
@ -143,29 +142,6 @@ stages:
|
||||||
filePath: $(Build.SourcesDirectory)/eng/common/post-build/symbols-validation.ps1
|
filePath: $(Build.SourcesDirectory)/eng/common/post-build/symbols-validation.ps1
|
||||||
arguments: -InputPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/ -ExtractPath $(Agent.BuildDirectory)/Temp/ -DotnetSymbolVersion $(SymbolToolVersion)
|
arguments: -InputPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/ -ExtractPath $(Agent.BuildDirectory)/Temp/ -DotnetSymbolVersion $(SymbolToolVersion)
|
||||||
|
|
||||||
- job:
|
|
||||||
displayName: Gather Drop
|
|
||||||
dependsOn: setupMaestroVars
|
|
||||||
variables:
|
|
||||||
BARBuildId: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
|
|
||||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], variables.PublicRelease_30_Channel_Id)
|
|
||||||
pool:
|
|
||||||
vmImage: 'windows-2019'
|
|
||||||
steps:
|
|
||||||
- task: PowerShell@2
|
|
||||||
displayName: Setup Darc CLI
|
|
||||||
inputs:
|
|
||||||
targetType: filePath
|
|
||||||
filePath: '$(Build.SourcesDirectory)/eng/common/darc-init.ps1'
|
|
||||||
|
|
||||||
- task: PowerShell@2
|
|
||||||
displayName: Run Darc gather-drop
|
|
||||||
inputs:
|
|
||||||
targetType: inline
|
|
||||||
script: |
|
|
||||||
darc gather-drop --non-shipping --continue-on-error --id $(BARBuildId) --output-dir $(Agent.BuildDirectory)/Temp/Drop/ --bar-uri https://maestro-prod.westus2.cloudapp.azure.com/ --password $(MaestroAccessToken) --latest-location
|
|
||||||
enabled: false
|
|
||||||
|
|
||||||
- template: ../promote-build.yml
|
- template: ../promote-build.yml
|
||||||
parameters:
|
parameters:
|
||||||
ChannelId: ${{ variables.PublicRelease_30_Channel_Id }}
|
ChannelId: ${{ variables.PublicRelease_30_Channel_Id }}
|
||||||
|
|
|
@ -12,7 +12,6 @@ stages:
|
||||||
dependsOn: setupMaestroVars
|
dependsOn: setupMaestroVars
|
||||||
variables:
|
variables:
|
||||||
- group: DotNet-Blob-Feed
|
- group: DotNet-Blob-Feed
|
||||||
- group: Publish-Build-Assets
|
|
||||||
- group: AzureDevOps-Artifact-Feeds-Pats
|
- group: AzureDevOps-Artifact-Feeds-Pats
|
||||||
- name: BARBuildId
|
- name: BARBuildId
|
||||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
|
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
|
||||||
|
@ -48,7 +47,7 @@ stages:
|
||||||
filePath: eng\common\sdk-task.ps1
|
filePath: eng\common\sdk-task.ps1
|
||||||
arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet
|
arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet
|
||||||
/p:ChannelId=$(PublicValidationRelease_30_Channel_Id)
|
/p:ChannelId=$(PublicValidationRelease_30_Channel_Id)
|
||||||
/p:ArtifactsCategory=.NetCoreValidation
|
/p:ArtifactsCategory=$(_DotNetValidationArtifactsCategory)
|
||||||
/p:IsStableBuild=$(IsStableBuild)
|
/p:IsStableBuild=$(IsStableBuild)
|
||||||
/p:IsInternalBuild=$(IsInternalBuild)
|
/p:IsInternalBuild=$(IsInternalBuild)
|
||||||
/p:RepositoryName=$(Build.Repository.Name)
|
/p:RepositoryName=$(Build.Repository.Name)
|
||||||
|
@ -58,13 +57,13 @@ stages:
|
||||||
/p:TargetFeedPAT='$(dn-bot-dnceng-unviersal-packages-rw)'
|
/p:TargetFeedPAT='$(dn-bot-dnceng-unviersal-packages-rw)'
|
||||||
/p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)'
|
/p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)'
|
||||||
/p:BARBuildId=$(BARBuildId)
|
/p:BARBuildId=$(BARBuildId)
|
||||||
/p:MaestroApiEndpoint='https://maestro-prod.westus2.cloudapp.azure.com'
|
/p:MaestroApiEndpoint='$(MaestroApiEndPoint)'
|
||||||
/p:BuildAssetRegistryToken='$(MaestroAccessToken)'
|
/p:BuildAssetRegistryToken='$(MaestroApiAccessToken)'
|
||||||
/p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/'
|
/p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/'
|
||||||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)\BlobArtifacts'
|
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)\BlobArtifacts'
|
||||||
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)\PackageArtifacts'
|
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)\PackageArtifacts'
|
||||||
/p:Configuration=Release
|
/p:Configuration=Release
|
||||||
|
|
||||||
- task: NuGetCommand@2
|
- task: NuGetCommand@2
|
||||||
displayName: Publish Packages to AzDO Feed
|
displayName: Publish Packages to AzDO Feed
|
||||||
condition: contains(variables['TargetAzDOFeed'], 'pkgs.visualstudio.com')
|
condition: contains(variables['TargetAzDOFeed'], 'pkgs.visualstudio.com')
|
||||||
|
@ -91,29 +90,9 @@ stages:
|
||||||
jobs:
|
jobs:
|
||||||
- template: ../setup-maestro-vars.yml
|
- template: ../setup-maestro-vars.yml
|
||||||
|
|
||||||
- job:
|
- template: ../darc-gather-drop.yml
|
||||||
displayName: Gather Drop
|
parameters:
|
||||||
dependsOn: setupMaestroVars
|
ChannelId: ${{ variables.PublicValidationRelease_30_Channel_Id }}
|
||||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], variables.PublicValidationRelease_30_Channel_Id)
|
|
||||||
variables:
|
|
||||||
- name: BARBuildId
|
|
||||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
|
|
||||||
- group: Publish-Build-Assets
|
|
||||||
pool:
|
|
||||||
vmImage: 'windows-2019'
|
|
||||||
steps:
|
|
||||||
- task: PowerShell@2
|
|
||||||
displayName: Setup Darc CLI
|
|
||||||
inputs:
|
|
||||||
targetType: filePath
|
|
||||||
filePath: '$(Build.SourcesDirectory)/eng/common/darc-init.ps1'
|
|
||||||
|
|
||||||
- task: PowerShell@2
|
|
||||||
displayName: Run Darc gather-drop
|
|
||||||
inputs:
|
|
||||||
targetType: inline
|
|
||||||
script: |
|
|
||||||
darc gather-drop --non-shipping --continue-on-error --id $(BARBuildId) --output-dir $(Agent.BuildDirectory)/Temp/Drop/ --bar-uri https://maestro-prod.westus2.cloudapp.azure.com --password $(MaestroAccessToken) --latest-location
|
|
||||||
|
|
||||||
- template: ../promote-build.yml
|
- template: ../promote-build.yml
|
||||||
parameters:
|
parameters:
|
||||||
|
|
|
@ -1,21 +1,39 @@
|
||||||
variables:
|
variables:
|
||||||
|
- group: Publish-Build-Assets
|
||||||
|
|
||||||
# .NET Core 3 Dev
|
# .NET Core 3 Dev
|
||||||
PublicDevRelease_30_Channel_Id: 3
|
- name: PublicDevRelease_30_Channel_Id
|
||||||
|
value: 3
|
||||||
|
|
||||||
# .NET Tools - Validation
|
# .NET Tools - Validation
|
||||||
PublicValidationRelease_30_Channel_Id: 9
|
- name: PublicValidationRelease_30_Channel_Id
|
||||||
|
value: 9
|
||||||
|
|
||||||
# .NET Core 3.0 Internal Servicing
|
# .NET Core 3.0 Internal Servicing
|
||||||
InternalServicing_30_Channel_Id: 184
|
- name: InternalServicing_30_Channel_Id
|
||||||
|
value: 184
|
||||||
|
|
||||||
# .NET Core 3.0 Release
|
# .NET Core 3.0 Release
|
||||||
PublicRelease_30_Channel_Id: 19
|
- name: PublicRelease_30_Channel_Id
|
||||||
|
value: 19
|
||||||
|
|
||||||
# Whether the build is internal or not
|
# Whether the build is internal or not
|
||||||
IsInternalBuild: ${{ and(ne(variables['System.TeamProject'], 'public'), contains(variables['Build.SourceBranch'], 'internal')) }}
|
- name: IsInternalBuild
|
||||||
|
value: ${{ and(ne(variables['System.TeamProject'], 'public'), contains(variables['Build.SourceBranch'], 'internal')) }}
|
||||||
|
|
||||||
# Storage account name for proxy-backed feeds
|
# Storage account name for proxy-backed feeds
|
||||||
ProxyBackedFeedsAccountName: dotnetfeed
|
- name: ProxyBackedFeedsAccountName
|
||||||
|
value: dotnetfeed
|
||||||
|
|
||||||
SourceLinkCLIVersion: 3.0.0
|
# Default Maestro++ API Endpoint and API Version
|
||||||
SymbolToolVersion: 1.0.1
|
- 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
|
||||||
|
|
23
eng/common/templates/post-build/darc-gather-drop.yml
Normal file
23
eng/common/templates/post-build/darc-gather-drop.yml
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
parameters:
|
||||||
|
ChannelId: 0
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
- job: gatherDrop
|
||||||
|
displayName: Gather Drop
|
||||||
|
dependsOn: setupMaestroVars
|
||||||
|
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], ${{ 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)
|
|
@ -7,9 +7,12 @@ parameters:
|
||||||
enable: false
|
enable: false
|
||||||
params: ''
|
params: ''
|
||||||
|
|
||||||
|
# Which stages should finish execution before post-build stages start
|
||||||
|
dependsOn: [build]
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- stage: validate
|
- stage: validate
|
||||||
dependsOn: build
|
dependsOn: ${{ parameters.dependsOn }}
|
||||||
displayName: Validate
|
displayName: Validate
|
||||||
jobs:
|
jobs:
|
||||||
- ${{ if eq(parameters.enableNugetValidation, 'true') }}:
|
- ${{ if eq(parameters.enableNugetValidation, 'true') }}:
|
||||||
|
|
|
@ -11,7 +11,6 @@ jobs:
|
||||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
|
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
|
||||||
- name: ChannelId
|
- name: ChannelId
|
||||||
value: ${{ parameters.ChannelId }}
|
value: ${{ parameters.ChannelId }}
|
||||||
- group: Publish-Build-Assets
|
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'windows-2019'
|
vmImage: 'windows-2019'
|
||||||
steps:
|
steps:
|
||||||
|
@ -21,4 +20,6 @@ jobs:
|
||||||
filePath: $(Build.SourcesDirectory)/eng/common/post-build/promote-build.ps1
|
filePath: $(Build.SourcesDirectory)/eng/common/post-build/promote-build.ps1
|
||||||
arguments: -BuildId $(BARBuildId)
|
arguments: -BuildId $(BARBuildId)
|
||||||
-ChannelId $(ChannelId)
|
-ChannelId $(ChannelId)
|
||||||
-BarToken $(MaestroAccessToken)
|
-MaestroApiAccessToken $(MaestroApiAccessToken)
|
||||||
|
-MaestroApiEndPoint $(MaestroApiEndPoint)
|
||||||
|
-MaestroApiVersion $(MaestroApiVersion)
|
||||||
|
|
|
@ -14,22 +14,5 @@ jobs:
|
||||||
name: setReleaseVars
|
name: setReleaseVars
|
||||||
displayName: Set Release Configs Vars
|
displayName: Set Release Configs Vars
|
||||||
inputs:
|
inputs:
|
||||||
targetType: inline
|
filePath: $(Build.SourcesDirectory)/eng/common/post-build/setup-maestro-vars.ps1
|
||||||
script: |
|
arguments: -ReleaseConfigsPath '$(Build.StagingDirectory)/ReleaseConfigs/ReleaseConfigs.txt'
|
||||||
# This is needed to make Write-PipelineSetVariable works in this context
|
|
||||||
$ci = $true
|
|
||||||
|
|
||||||
. "$(Build.SourcesDirectory)/eng/common/tools.ps1"
|
|
||||||
|
|
||||||
$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-PipelineSetVariable -Name 'BARBuildId' -Value $BarId
|
|
||||||
Write-PipelineSetVariable -Name 'InitialChannels' -Value "$Channels"
|
|
||||||
Write-PipelineSetVariable -Name 'IsStableBuild' -Value $IsStableBuild
|
|
||||||
|
|
|
@ -8,4 +8,6 @@ steps:
|
||||||
filePath: $(Build.SourcesDirectory)/eng/common/post-build/trigger-subscriptions.ps1
|
filePath: $(Build.SourcesDirectory)/eng/common/post-build/trigger-subscriptions.ps1
|
||||||
arguments: -SourceRepo $(Build.Repository.Uri)
|
arguments: -SourceRepo $(Build.Repository.Uri)
|
||||||
-ChannelId ${{ parameters.ChannelId }}
|
-ChannelId ${{ parameters.ChannelId }}
|
||||||
-BarToken $(MaestroAccessTokenInt)
|
-MaestroApiAccessToken $(MaestroAccessToken)
|
||||||
|
-MaestroApiEndPoint $(MaestroApiEndPoint)
|
||||||
|
-MaestroApiVersion $(MaestroApiVersion)
|
||||||
|
|
4
eng/common/tools.sh
Normal file → Executable file
4
eng/common/tools.sh
Normal file → Executable file
|
@ -77,7 +77,7 @@ function ReadGlobalVersion {
|
||||||
local pattern="\"$key\" *: *\"(.*)\""
|
local pattern="\"$key\" *: *\"(.*)\""
|
||||||
|
|
||||||
if [[ ! $line =~ $pattern ]]; then
|
if [[ ! $line =~ $pattern ]]; then
|
||||||
Write-PipelineTelemetryError -category 'InitializeTools' "Error: Cannot find \"$key\" in $global_json_file"
|
Write-PipelineTelemetryError -category 'InitializeToolset' "Error: Cannot find \"$key\" in $global_json_file"
|
||||||
ExitWithExitCode 1
|
ExitWithExitCode 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -245,7 +245,7 @@ function InitializeNativeTools() {
|
||||||
then
|
then
|
||||||
local nativeArgs=""
|
local nativeArgs=""
|
||||||
if [[ "$ci" == true ]]; then
|
if [[ "$ci" == true ]]; then
|
||||||
nativeArgs="-InstallDirectory $tools_dir"
|
nativeArgs="--installDirectory $tools_dir"
|
||||||
fi
|
fi
|
||||||
"$_script_dir/init-tools-native.sh" $nativeArgs
|
"$_script_dir/init-tools-native.sh" $nativeArgs
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -3,6 +3,6 @@
|
||||||
"dotnet": "3.0.100-preview6-012264"
|
"dotnet": "3.0.100-preview6-012264"
|
||||||
},
|
},
|
||||||
"msbuild-sdks": {
|
"msbuild-sdks": {
|
||||||
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19373.6"
|
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19376.18"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue