76 changed files with 2401 additions and 2831 deletions
@ -1,158 +0,0 @@ |
|||
param( |
|||
[Parameter(Mandatory=$true)][string] $InputPath, # Full path to directory where NuGet packages to be checked are stored |
|||
[Parameter(Mandatory=$true)][string] $ExtractPath, # Full path to directory where the packages will be extracted during validation |
|||
[Parameter(Mandatory=$true)][string] $SymbolToolPath # Full path to directory where dotnet symbol-tool was installed |
|||
) |
|||
|
|||
Add-Type -AssemblyName System.IO.Compression.FileSystem |
|||
|
|||
function FirstMatchingSymbolDescriptionOrDefault { |
|||
param( |
|||
[string] $FullPath, # Full path to the module that has to be checked |
|||
[string] $TargetServerParam, # Parameter to pass to `Symbol Tool` indicating the server to lookup for symbols |
|||
[string] $SymbolsPath |
|||
) |
|||
|
|||
$FileName = [System.IO.Path]::GetFileName($FullPath) |
|||
$Extension = [System.IO.Path]::GetExtension($FullPath) |
|||
|
|||
# Those below are potential symbol files that the `dotnet symbol` might |
|||
# return. Which one will be returned depend on the type of file we are |
|||
# checking and which type of file was uploaded. |
|||
|
|||
# The file itself is returned |
|||
$SymbolPath = $SymbolsPath + "\" + $FileName |
|||
|
|||
# PDB file for the module |
|||
$PdbPath = $SymbolPath.Replace($Extension, ".pdb") |
|||
|
|||
# PDB file for R2R module (created by crossgen) |
|||
$NGenPdb = $SymbolPath.Replace($Extension, ".ni.pdb") |
|||
|
|||
# DBG file for a .so library |
|||
$SODbg = $SymbolPath.Replace($Extension, ".so.dbg") |
|||
|
|||
# DWARF file for a .dylib |
|||
$DylibDwarf = $SymbolPath.Replace($Extension, ".dylib.dwarf") |
|||
|
|||
.\dotnet-symbol.exe --symbols --modules --windows-pdbs $TargetServerParam $FullPath -o $SymbolsPath | Out-Null |
|||
|
|||
if (Test-Path $PdbPath) { |
|||
return "PDB" |
|||
} |
|||
elseif (Test-Path $NGenPdb) { |
|||
return "NGen PDB" |
|||
} |
|||
elseif (Test-Path $SODbg) { |
|||
return "DBG for SO" |
|||
} |
|||
elseif (Test-Path $DylibDwarf) { |
|||
return "Dwarf for Dylib" |
|||
} |
|||
elseif (Test-Path $SymbolPath) { |
|||
return "Module" |
|||
} |
|||
else { |
|||
return $null |
|||
} |
|||
} |
|||
|
|||
function CountMissingSymbols { |
|||
param( |
|||
[string] $PackagePath # Path to a NuGet package |
|||
) |
|||
|
|||
# Ensure input file exist |
|||
if (!(Test-Path $PackagePath)) { |
|||
throw "Input file does not exist: $PackagePath" |
|||
} |
|||
|
|||
# Extensions for which we'll look for symbols |
|||
$RelevantExtensions = @(".dll", ".exe", ".so", ".dylib") |
|||
|
|||
# How many files are missing symbol information |
|||
$MissingSymbols = 0 |
|||
|
|||
$PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath) |
|||
$PackageGuid = New-Guid |
|||
$ExtractPath = Join-Path -Path $ExtractPath -ChildPath $PackageGuid |
|||
$SymbolsPath = Join-Path -Path $ExtractPath -ChildPath "Symbols" |
|||
|
|||
[System.IO.Compression.ZipFile]::ExtractToDirectory($PackagePath, $ExtractPath) |
|||
|
|||
# Makes easier to reference `symbol tool` |
|||
Push-Location $SymbolToolPath |
|||
|
|||
Get-ChildItem -Recurse $ExtractPath | |
|||
Where-Object {$RelevantExtensions -contains $_.Extension} | |
|||
ForEach-Object { |
|||
if ($_.FullName -Match "\\ref\\") { |
|||
Write-Host "`t Ignoring reference assembly file" $_.FullName |
|||
return |
|||
} |
|||
|
|||
$SymbolsOnMSDL = FirstMatchingSymbolDescriptionOrDefault $_.FullName "--microsoft-symbol-server" $SymbolsPath |
|||
$SymbolsOnSymWeb = FirstMatchingSymbolDescriptionOrDefault $_.FullName "--internal-server" $SymbolsPath |
|||
|
|||
Write-Host -NoNewLine "`t Checking file" $_.FullName "... " |
|||
|
|||
if ($SymbolsOnMSDL -ne $null -and $SymbolsOnSymWeb -ne $null) { |
|||
Write-Host "Symbols found on MSDL (" $SymbolsOnMSDL ") and SymWeb (" $SymbolsOnSymWeb ")" |
|||
} |
|||
else { |
|||
$MissingSymbols++ |
|||
|
|||
if ($SymbolsOnMSDL -eq $null -and $SymbolsOnSymWeb -eq $null) { |
|||
Write-Host "No symbols found on MSDL or SymWeb!" |
|||
} |
|||
else { |
|||
if ($SymbolsOnMSDL -eq $null) { |
|||
Write-Host "No symbols found on MSDL!" |
|||
} |
|||
else { |
|||
Write-Host "No symbols found on SymWeb!" |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
Pop-Location |
|||
|
|||
return $MissingSymbols |
|||
} |
|||
|
|||
function CheckSymbolsAvailable { |
|||
if (Test-Path $ExtractPath) { |
|||
Remove-Item $ExtractPath -Force -Recurse -ErrorAction SilentlyContinue |
|||
} |
|||
|
|||
Get-ChildItem "$InputPath\*.nupkg" | |
|||
ForEach-Object { |
|||
$FileName = $_.Name |
|||
|
|||
# These packages from Arcade-Services include some native libraries that |
|||
# our current symbol uploader can't handle. Below is a workaround until |
|||
# we get issue: https://github.com/dotnet/arcade/issues/2457 sorted. |
|||
if ($FileName -Match "Microsoft\.DotNet\.Darc\.") { |
|||
Write-Host "Ignoring Arcade-services file: $FileName" |
|||
Write-Host |
|||
return |
|||
} |
|||
elseif ($FileName -Match "Microsoft\.DotNet\.Maestro\.Tasks\.") { |
|||
Write-Host "Ignoring Arcade-services file: $FileName" |
|||
Write-Host |
|||
return |
|||
} |
|||
|
|||
Write-Host "Validating $FileName " |
|||
$Status = CountMissingSymbols "$InputPath\$FileName" |
|||
|
|||
if ($Status -ne 0) { |
|||
Write-Error "Missing symbols for $Status modules in the package $FileName" |
|||
} |
|||
|
|||
Write-Host |
|||
} |
|||
} |
|||
|
|||
CheckSymbolsAvailable |
|||
@ -1,83 +0,0 @@ |
|||
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. --> |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
<!-- |
|||
This MSBuild file is intended to be used as the body of the default |
|||
publishing release pipeline. The release pipeline will use this file |
|||
to invoke the PushToStaticFeed task that will read the build asset |
|||
manifest and publish the assets described in the manifest to |
|||
informed target feeds. |
|||
--> |
|||
|
|||
<PropertyGroup> |
|||
<TargetFramework>netcoreapp2.1</TargetFramework> |
|||
</PropertyGroup> |
|||
|
|||
<Import Project="$(MSBuildThisFileDirectory)DefaultVersions.props" Condition="Exists('$(MSBuildThisFileDirectory)DefaultVersions.props')" /> |
|||
|
|||
<!-- |
|||
This won't be necessary once we solve this issue: |
|||
https://github.com/dotnet/arcade/issues/2266 |
|||
--> |
|||
<Import Project="$(MSBuildThisFileDirectory)ArtifactsCategory.props" Condition="Exists('$(MSBuildThisFileDirectory)ArtifactsCategory.props')" /> |
|||
|
|||
<Import Project="$(NuGetPackageRoot)microsoft.dotnet.build.tasks.feed\$(MicrosoftDotNetBuildTasksFeedVersion)\build\Microsoft.DotNet.Build.Tasks.Feed.targets" /> |
|||
|
|||
<Target Name="PublishToFeed"> |
|||
<Error Condition="'$(ArtifactsCategory)' == ''" Text="ArtifactsCategory: The artifacts' category produced by the build wasn't provided." /> |
|||
<Error Condition="'$(AccountKeyToStaticFeed)' == ''" Text="AccountKeyToStaticFeed: Account key for target feed wasn't provided." /> |
|||
<Error Condition="'$(ManifestsBasePath)' == ''" Text="Full path to asset manifests directory wasn't provided." /> |
|||
<Error Condition="'$(BlobBasePath)' == '' AND '$(PackageBasePath)' == ''" Text="A valid full path to BlobBasePath of PackageBasePath is required." /> |
|||
|
|||
<ItemGroup> |
|||
<!-- Include all manifests found in the manifest folder. --> |
|||
<ManifestFiles Include="$(ManifestsBasePath)*.xml" /> |
|||
</ItemGroup> |
|||
|
|||
<Error Condition="'@(ManifestFiles)' == ''" Text="No manifest file was found in the provided path: $(ManifestsBasePath)" /> |
|||
|
|||
<!-- |
|||
For now the type of packages being published will be informed for the whole build. |
|||
Eventually this will be specified on a per package basis: |
|||
TODO: https://github.com/dotnet/arcade/issues/2266 |
|||
--> |
|||
<PropertyGroup> |
|||
<TargetStaticFeed Condition="'$(ArtifactsCategory.ToUpper())' == '.NETCORE'">https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json</TargetStaticFeed> |
|||
<TargetStaticFeed Condition="'$(ArtifactsCategory.ToUpper())' == '.NETCOREVALIDATION'">https://dotnetfeed.blob.core.windows.net/arcade-validation/index.json</TargetStaticFeed> |
|||
<TargetStaticFeed Condition="'$(ArtifactsCategory.ToUpper())' == 'ASPNETCORE'">https://dotnetfeed.blob.core.windows.net/aspnet-aspnetcore/index.json</TargetStaticFeed> |
|||
<TargetStaticFeed Condition="'$(ArtifactsCategory.ToUpper())' == 'ASPNETCORETOOLING'">https://dotnetfeed.blob.core.windows.net/aspnet-aspnetcore-tooling/index.json</TargetStaticFeed> |
|||
<TargetStaticFeed Condition="'$(ArtifactsCategory.ToUpper())' == 'ENTITYFRAMEWORKCORE'">https://dotnetfeed.blob.core.windows.net/aspnet-entityframeworkcore/index.json</TargetStaticFeed> |
|||
<TargetStaticFeed Condition="'$(ArtifactsCategory.ToUpper())' == 'ASPNETEXTENSIONS'">https://dotnetfeed.blob.core.windows.net/aspnet-extensions/index.json</TargetStaticFeed> |
|||
<TargetStaticFeed Condition="'$(ArtifactsCategory.ToUpper())' == 'CORECLR'">https://dotnetfeed.blob.core.windows.net/dotnet-coreclr/index.json</TargetStaticFeed> |
|||
<TargetStaticFeed Condition="'$(ArtifactsCategory.ToUpper())' == 'CORESDK'">https://dotnetfeed.blob.core.windows.net/dotnet-sdk/index.json</TargetStaticFeed> |
|||
<TargetStaticFeed Condition="'$(ArtifactsCategory.ToUpper())' == 'TOOLSINTERNAL'">https://dotnetfeed.blob.core.windows.net/dotnet-tools-internal/index.json</TargetStaticFeed> |
|||
<TargetStaticFeed Condition="'$(ArtifactsCategory.ToUpper())' == 'TOOLSET'">https://dotnetfeed.blob.core.windows.net/dotnet-toolset/index.json</TargetStaticFeed> |
|||
<TargetStaticFeed Condition="'$(ArtifactsCategory.ToUpper())' == 'WINDOWSDESKTOP'">https://dotnetfeed.blob.core.windows.net/dotnet-windowsdesktop/index.json</TargetStaticFeed> |
|||
<TargetStaticFeed Condition="'$(ArtifactsCategory.ToUpper())' == 'NUGETCLIENT'">https://dotnetfeed.blob.core.windows.net/nuget-nugetclient/index.json</TargetStaticFeed> |
|||
<TargetStaticFeed Condition="'$(ArtifactsCategory.ToUpper())' == 'ASPNETENTITYFRAMEWORK6'">https://dotnetfeed.blob.core.windows.net/aspnet-entityframework6/index.json</TargetStaticFeed> |
|||
<TargetStaticFeed Condition="'$(ArtifactsCategory.ToUpper())' == 'ASPNETBLAZOR'">https://dotnetfeed.blob.core.windows.net/aspnet-blazor/index.json</TargetStaticFeed> |
|||
</PropertyGroup> |
|||
|
|||
<Error |
|||
Condition="'$(TargetStaticFeed)' == ''" |
|||
Text="'$(ArtifactsCategory)' wasn't recognized as a valid artifact category. Valid categories are: '.NetCore' and '.NetCoreValidation'" /> |
|||
|
|||
<!-- Iterate publishing assets from each manifest file. --> |
|||
<PushArtifactsInManifestToFeed |
|||
ExpectedFeedUrl="$(TargetStaticFeed)" |
|||
AccountKey="$(AccountKeyToStaticFeed)" |
|||
BARBuildId="$(BARBuildId)" |
|||
MaestroApiEndpoint="$(MaestroApiEndpoint)" |
|||
BuildAssetRegistryToken="$(BuildAssetRegistryToken)" |
|||
Overwrite="$(OverrideAssetsWithSameName)" |
|||
PassIfExistingItemIdentical="$(PassIfExistingItemIdentical)" |
|||
MaxClients="$(MaxParallelUploads)" |
|||
UploadTimeoutInMinutes="$(MaxUploadTimeoutInMinutes)" |
|||
AssetManifestPath="%(ManifestFiles.Identity)" |
|||
BlobAssetsBasePath="$(BlobBasePath)" |
|||
PackageAssetsBasePath="$(PackageBasePath)"/> |
|||
</Target> |
|||
|
|||
<ItemGroup> |
|||
<PackageReference Include="Microsoft.DotNet.Build.Tasks.Feed" Version="$(MicrosoftDotNetBuildTasksFeedVersion)" /> |
|||
</ItemGroup> |
|||
</Project> |
|||
@ -1,82 +0,0 @@ |
|||
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. --> |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
<!-- |
|||
This MSBuild file is intended to be used as the body of the default |
|||
publishing release pipeline. The release pipeline will use this file |
|||
to invoke the PublishSymbols tasks to publish symbols to MSDL and SymWeb. |
|||
|
|||
Parameters: |
|||
|
|||
- PDBArtifactsDirectory : Full path to directory containing PDB files to be published. |
|||
- BlobBasePath : Full path containing *.symbols.nupkg packages to be published. |
|||
- DotNetSymbolServerTokenMsdl : PAT to access MSDL. |
|||
- DotNetSymbolServerTokenSymWeb : PAT to access SymWeb. |
|||
- DotNetSymbolExpirationInDays : Expiration days for published packages. Default is 3650. |
|||
--> |
|||
|
|||
<PropertyGroup> |
|||
<TargetFramework>netcoreapp2.1</TargetFramework> |
|||
</PropertyGroup> |
|||
|
|||
<Import Project="$(NuGetPackageRoot)microsoft.symboluploader.build.task\$(SymbolUploaderVersion)\build\PublishSymbols.targets" /> |
|||
|
|||
<Target Name="PublishSymbols"> |
|||
<ItemGroup> |
|||
<FilesToPublishToSymbolServer Include="$(PDBArtifactsDirectory)\*.pdb"/> |
|||
<PackagesToPublishToSymbolServer Include="$(BlobBasePath)\*.symbols.nupkg"/> |
|||
|
|||
<!-- |
|||
These packages from Arcade-Services include some native libraries that |
|||
our current symbol uploader can't handle. Below is a workaround until |
|||
we get issue: https://github.com/dotnet/arcade/issues/2457 sorted. |
|||
--> |
|||
<PackagesToPublishToSymbolServer Remove="$(BlobBasePath)\Microsoft.DotNet.Darc.*" /> |
|||
<PackagesToPublishToSymbolServer Remove="$(BlobBasePath)\Microsoft.DotNet.Maestro.Tasks.*" /> |
|||
</ItemGroup> |
|||
|
|||
<PropertyGroup> |
|||
<DotNetSymbolExpirationInDays Condition="'$(DotNetSymbolExpirationInDays)' == ''">3650</DotNetSymbolExpirationInDays> |
|||
<PublishToSymbolServer>true</PublishToSymbolServer> |
|||
<PublishToSymbolServer Condition="'@(FilesToPublishToSymbolServer)' == '' and '@(PackagesToPublishToSymbolServer)' == ''">false</PublishToSymbolServer> |
|||
</PropertyGroup> |
|||
|
|||
<Message |
|||
Importance="High" |
|||
Text="No symbol package(s) were found to publish." |
|||
Condition="$(PublishToSymbolServer) == false" /> |
|||
|
|||
<!-- Symbol Uploader: MSDL --> |
|||
<Message Importance="High" Text="Publishing symbol packages to MSDL ..." Condition="$(PublishToSymbolServer)" /> |
|||
<PublishSymbols PackagesToPublish="@(PackagesToPublishToSymbolServer)" |
|||
FilesToPublish="@(FilesToPublishToSymbolServer)" |
|||
PersonalAccessToken="$(DotNetSymbolServerTokenMsdl)" |
|||
SymbolServerPath="https://microsoftpublicsymbols.artifacts.visualstudio.com/DefaultCollection" |
|||
ExpirationInDays="$(DotNetSymbolExpirationInDays)" |
|||
VerboseLogging="true" |
|||
DryRun="false" |
|||
ConvertPortablePdbsToWindowsPdbs="false" |
|||
PdbConversionTreatAsWarning="" |
|||
Condition="$(PublishToSymbolServer)"/> |
|||
|
|||
<!-- |
|||
Symbol Uploader: SymWeb |
|||
Watson, VS insertion testings and the typical internal dev usage require SymWeb. |
|||
Currently we need to call the task twice (https://github.com/dotnet/core-eng/issues/3489). |
|||
--> |
|||
<Message Importance="High" Text="Publishing symbol packages to SymWeb ..." Condition="$(PublishToSymbolServer)" /> |
|||
<PublishSymbols PackagesToPublish="@(PackagesToPublishToSymbolServer)" |
|||
FilesToPublish="@(FilesToPublishToSymbolServer)" |
|||
PersonalAccessToken="$(DotNetSymbolServerTokenSymWeb)" |
|||
SymbolServerPath="https://microsoft.artifacts.visualstudio.com/DefaultCollection" |
|||
ExpirationInDays="$(DotNetSymbolExpirationInDays)" |
|||
VerboseLogging="true" |
|||
DryRun="false" |
|||
ConvertPortablePdbsToWindowsPdbs="false" |
|||
PdbConversionTreatAsWarning="" |
|||
Condition="$(PublishToSymbolServer)"/> |
|||
</Target> |
|||
|
|||
<ItemGroup> |
|||
<PackageReference Include="Microsoft.SymbolUploader.Build.Task" Version="$(SymbolUploaderVersion)" /> |
|||
</ItemGroup> |
|||
</Project> |
|||
@ -0,0 +1,141 @@ |
|||
# This file is a temporary workaround for internal builds to be able to restore from private AzDO feeds. |
|||
# This file should be removed as part of this issue: https://github.com/dotnet/arcade/issues/4080 |
|||
# |
|||
# What the script does is iterate over all package sources in the pointed NuGet.config and add a credential entry |
|||
# under <packageSourceCredentials> for each Maestro managed private feed. Two additional credential |
|||
# entries are also added for the two private static internal feeds: dotnet3-internal and dotnet3-internal-transport. |
|||
# |
|||
# This script needs to be called in every job that will restore packages and which the base repo has |
|||
# private AzDO feeds in the NuGet.config. |
|||
# |
|||
# See example YAML call for this script below. Note the use of the variable `$(dn-bot-dnceng-artifact-feeds-rw)` |
|||
# from the AzureDevOps-Artifact-Feeds-Pats variable group. |
|||
# |
|||
# - task: PowerShell@2 |
|||
# displayName: Setup Private Feeds Credentials |
|||
# condition: eq(variables['Agent.OS'], 'Windows_NT') |
|||
# inputs: |
|||
# filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 |
|||
# arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token |
|||
# env: |
|||
# Token: $(dn-bot-dnceng-artifact-feeds-rw) |
|||
|
|||
[CmdletBinding()] |
|||
param ( |
|||
[Parameter(Mandatory = $true)][string]$ConfigFile, |
|||
[Parameter(Mandatory = $true)][string]$Password |
|||
) |
|||
|
|||
$ErrorActionPreference = "Stop" |
|||
Set-StrictMode -Version 2.0 |
|||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 |
|||
|
|||
. $PSScriptRoot\tools.ps1 |
|||
|
|||
# Add source entry to PackageSources |
|||
function AddPackageSource($sources, $SourceName, $SourceEndPoint, $creds, $Username, $Password) { |
|||
$packageSource = $sources.SelectSingleNode("add[@key='$SourceName']") |
|||
|
|||
if ($packageSource -eq $null) |
|||
{ |
|||
$packageSource = $doc.CreateElement("add") |
|||
$packageSource.SetAttribute("key", $SourceName) |
|||
$packageSource.SetAttribute("value", $SourceEndPoint) |
|||
$sources.AppendChild($packageSource) | Out-Null |
|||
} |
|||
else { |
|||
Write-Host "Package source $SourceName already present." |
|||
} |
|||
|
|||
AddCredential -Creds $creds -Source $SourceName -Username $Username -Password $Password |
|||
} |
|||
|
|||
# Add a credential node for the specified source |
|||
function AddCredential($creds, $source, $username, $password) { |
|||
# Looks for credential configuration for the given SourceName. Create it if none is found. |
|||
$sourceElement = $creds.SelectSingleNode($Source) |
|||
if ($sourceElement -eq $null) |
|||
{ |
|||
$sourceElement = $doc.CreateElement($Source) |
|||
$creds.AppendChild($sourceElement) | Out-Null |
|||
} |
|||
|
|||
# Add the <Username> node to the credential if none is found. |
|||
$usernameElement = $sourceElement.SelectSingleNode("add[@key='Username']") |
|||
if ($usernameElement -eq $null) |
|||
{ |
|||
$usernameElement = $doc.CreateElement("add") |
|||
$usernameElement.SetAttribute("key", "Username") |
|||
$sourceElement.AppendChild($usernameElement) | Out-Null |
|||
} |
|||
$usernameElement.SetAttribute("value", $Username) |
|||
|
|||
# Add the <ClearTextPassword> to the credential if none is found. |
|||
# Add it as a clear text because there is no support for encrypted ones in non-windows .Net SDKs. |
|||
# -> https://github.com/NuGet/Home/issues/5526 |
|||
$passwordElement = $sourceElement.SelectSingleNode("add[@key='ClearTextPassword']") |
|||
if ($passwordElement -eq $null) |
|||
{ |
|||
$passwordElement = $doc.CreateElement("add") |
|||
$passwordElement.SetAttribute("key", "ClearTextPassword") |
|||
$sourceElement.AppendChild($passwordElement) | Out-Null |
|||
} |
|||
$passwordElement.SetAttribute("value", $Password) |
|||
} |
|||
|
|||
function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Password) { |
|||
$maestroPrivateSources = $Sources.SelectNodes("add[contains(@key,'darc-int')]") |
|||
|
|||
Write-Host "Inserting credentials for $($maestroPrivateSources.Count) Maestro's private feeds." |
|||
|
|||
ForEach ($PackageSource in $maestroPrivateSources) { |
|||
Write-Host "`tInserting credential for Maestro's feed:" $PackageSource.Key |
|||
AddCredential -Creds $creds -Source $PackageSource.Key -Username $Username -Password $Password |
|||
} |
|||
} |
|||
|
|||
if (!(Test-Path $ConfigFile -PathType Leaf)) { |
|||
Write-PipelineTelemetryError -Category 'Build' -Message "Eng/common/SetupNugetSources.ps1 returned a non-zero exit code. Couldn't find the NuGet config file: $ConfigFile" |
|||
ExitWithExitCode 1 |
|||
} |
|||
|
|||
if (!$Password) { |
|||
Write-PipelineTelemetryError -Category 'Build' -Message 'Eng/common/SetupNugetSources.ps1 returned a non-zero exit code. Please supply a valid PAT' |
|||
ExitWithExitCode 1 |
|||
} |
|||
|
|||
# Load NuGet.config |
|||
$doc = New-Object System.Xml.XmlDocument |
|||
$filename = (Get-Item $ConfigFile).FullName |
|||
$doc.Load($filename) |
|||
|
|||
# Get reference to <PackageSources> or create one if none exist already |
|||
$sources = $doc.DocumentElement.SelectSingleNode("packageSources") |
|||
if ($sources -eq $null) { |
|||
$sources = $doc.CreateElement("packageSources") |
|||
$doc.DocumentElement.AppendChild($sources) | Out-Null |
|||
} |
|||
|
|||
# Looks for a <PackageSourceCredentials> node. Create it if none is found. |
|||
$creds = $doc.DocumentElement.SelectSingleNode("packageSourceCredentials") |
|||
if ($creds -eq $null) { |
|||
$creds = $doc.CreateElement("packageSourceCredentials") |
|||
$doc.DocumentElement.AppendChild($creds) | Out-Null |
|||
} |
|||
|
|||
# Insert credential nodes for Maestro's private feeds |
|||
InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Password $Password |
|||
|
|||
$dotnet3Source = $sources.SelectSingleNode("add[@key='dotnet3']") |
|||
if ($dotnet3Source -ne $null) { |
|||
AddPackageSource -Sources $sources -SourceName "dotnet3-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password |
|||
AddPackageSource -Sources $sources -SourceName "dotnet3-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password |
|||
} |
|||
|
|||
$dotnet31Source = $sources.SelectSingleNode("add[@key='dotnet3.1']") |
|||
if ($dotnet31Source -ne $null) { |
|||
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password |
|||
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password |
|||
} |
|||
|
|||
$doc.Save($filename) |
|||
@ -0,0 +1,149 @@ |
|||
#!/usr/bin/env bash |
|||
|
|||
# This file is a temporary workaround for internal builds to be able to restore from private AzDO feeds. |
|||
# This file should be removed as part of this issue: https://github.com/dotnet/arcade/issues/4080 |
|||
# |
|||
# What the script does is iterate over all package sources in the pointed NuGet.config and add a credential entry |
|||
# under <packageSourceCredentials> for each Maestro's managed private feed. Two additional credential |
|||
# entries are also added for the two private static internal feeds: dotnet3-internal and dotnet3-internal-transport. |
|||
# |
|||
# This script needs to be called in every job that will restore packages and which the base repo has |
|||
# private AzDO feeds in the NuGet.config. |
|||
# |
|||
# See example YAML call for this script below. Note the use of the variable `$(dn-bot-dnceng-artifact-feeds-rw)` |
|||
# from the AzureDevOps-Artifact-Feeds-Pats variable group. |
|||
# |
|||
# - task: Bash@3 |
|||
# displayName: Setup Private Feeds Credentials |
|||
# inputs: |
|||
# filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh |
|||
# arguments: $(Build.SourcesDirectory)/NuGet.config $Token |
|||
# condition: ne(variables['Agent.OS'], 'Windows_NT') |
|||
# env: |
|||
# Token: $(dn-bot-dnceng-artifact-feeds-rw) |
|||
|
|||
ConfigFile=$1 |
|||
CredToken=$2 |
|||
NL='\n' |
|||
TB=' ' |
|||
|
|||
source="${BASH_SOURCE[0]}" |
|||
|
|||
# resolve $source until the file is no longer a symlink |
|||
while [[ -h "$source" ]]; do |
|||
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" |
|||
source="$(readlink "$source")" |
|||
# if $source was a relative symlink, we need to resolve it relative to the path where the |
|||
# symlink file was located |
|||
[[ $source != /* ]] && source="$scriptroot/$source" |
|||
done |
|||
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" |
|||
|
|||
. "$scriptroot/tools.sh" |
|||
|
|||
if [ ! -f "$ConfigFile" ]; then |
|||
Write-PipelineTelemetryError -Category 'Build' "Error: Eng/common/SetupNugetSources.sh returned a non-zero exit code. Couldn't find the NuGet config file: $ConfigFile" |
|||
ExitWithExitCode 1 |
|||
fi |
|||
|
|||
if [ -z "$CredToken" ]; then |
|||
Write-PipelineTelemetryError -category 'Build' "Error: Eng/common/SetupNugetSources.sh returned a non-zero exit code. Please supply a valid PAT" |
|||
ExitWithExitCode 1 |
|||
fi |
|||
|
|||
if [[ `uname -s` == "Darwin" ]]; then |
|||
NL=$'\\\n' |
|||
TB='' |
|||
fi |
|||
|
|||
# Ensure there is a <packageSources>...</packageSources> section. |
|||
grep -i "<packageSources>" $ConfigFile |
|||
if [ "$?" != "0" ]; then |
|||
echo "Adding <packageSources>...</packageSources> section." |
|||
ConfigNodeHeader="<configuration>" |
|||
PackageSourcesTemplate="${TB}<packageSources>${NL}${TB}</packageSources>" |
|||
|
|||
sed -i.bak "s|$ConfigNodeHeader|$ConfigNodeHeader${NL}$PackageSourcesTemplate|" NuGet.config |
|||
fi |
|||
|
|||
# Ensure there is a <packageSourceCredentials>...</packageSourceCredentials> section. |
|||
grep -i "<packageSourceCredentials>" $ConfigFile |
|||
if [ "$?" != "0" ]; then |
|||
echo "Adding <packageSourceCredentials>...</packageSourceCredentials> section." |
|||
|
|||
PackageSourcesNodeFooter="</packageSources>" |
|||
PackageSourceCredentialsTemplate="${TB}<packageSourceCredentials>${NL}${TB}</packageSourceCredentials>" |
|||
|
|||
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourcesNodeFooter${NL}$PackageSourceCredentialsTemplate|" NuGet.config |
|||
fi |
|||
|
|||
PackageSources=() |
|||
|
|||
# Ensure dotnet3-internal and dotnet3-internal-transport are in the packageSources if the public dotnet3 feeds are present |
|||
grep -i "<add key=\"dotnet3\"" $ConfigFile |
|||
|
|||
if [ "$?" == "0" ]; then |
|||
grep -i "<add key=\"dotnet3-internal\">" $ConfigFile |
|||
if [ "$?" != "0" ]; then |
|||
echo "Adding dotnet3-internal to the packageSources." |
|||
PackageSourcesNodeFooter="</packageSources>" |
|||
PackageSourceTemplate="${TB}<add key=\"dotnet3-internal\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v2\" />" |
|||
|
|||
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile |
|||
fi |
|||
PackageSources+=('dotnet3-internal') |
|||
|
|||
grep -i "<add key=\"dotnet3-internal-transport\"" $ConfigFile |
|||
if [ "$?" != "0" ]; then |
|||
echo "Adding dotnet3-internal-transport to the packageSources." |
|||
PackageSourcesNodeFooter="</packageSources>" |
|||
PackageSourceTemplate="${TB}<add key=\"dotnet3-internal-transport\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v2\" />" |
|||
|
|||
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile |
|||
fi |
|||
PackageSources+=('dotnet3-internal-transport') |
|||
fi |
|||
|
|||
# Ensure dotnet3.1-internal and dotnet3.1-internal-transport are in the packageSources if the public dotnet3.1 feeds are present |
|||
grep -i "<add key=\"dotnet3.1\"" $ConfigFile |
|||
if [ "$?" == "0" ]; then |
|||
grep -i "<add key=\"dotnet3.1-internal\"" $ConfigFile |
|||
if [ "$?" != "0" ]; then |
|||
echo "Adding dotnet3.1-internal to the packageSources." |
|||
PackageSourcesNodeFooter="</packageSources>" |
|||
PackageSourceTemplate="${TB}<add key=\"dotnet3.1-internal\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v2\" />" |
|||
|
|||
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile |
|||
fi |
|||
PackageSources+=('dotnet3.1-internal') |
|||
|
|||
grep -i "<add key=\"dotnet3.1-internal-transport\">" $ConfigFile |
|||
if [ "$?" != "0" ]; then |
|||
echo "Adding dotnet3.1-internal-transport to the packageSources." |
|||
PackageSourcesNodeFooter="</packageSources>" |
|||
PackageSourceTemplate="${TB}<add key=\"dotnet3.1-internal-transport\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v2\" />" |
|||
|
|||
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile |
|||
fi |
|||
PackageSources+=('dotnet3.1-internal-transport') |
|||
fi |
|||
|
|||
# I want things split line by line |
|||
PrevIFS=$IFS |
|||
IFS=$'\n' |
|||
PackageSources+="$IFS" |
|||
PackageSources+=$(grep -oh '"darc-int-[^"]*"' $ConfigFile | tr -d '"') |
|||
IFS=$PrevIFS |
|||
|
|||
for FeedName in ${PackageSources[@]} ; do |
|||
# Check if there is no existing credential for this FeedName |
|||
grep -i "<$FeedName>" $ConfigFile |
|||
if [ "$?" != "0" ]; then |
|||
echo "Adding credentials for $FeedName." |
|||
|
|||
PackageSourceCredentialsNodeFooter="</packageSourceCredentials>" |
|||
NewCredential="${TB}${TB}<$FeedName>${NL}<add key=\"Username\" value=\"dn-bot\" />${NL}<add key=\"ClearTextPassword\" value=\"$CredToken\" />${NL}</$FeedName>" |
|||
|
|||
sed -i.bak "s|$PackageSourceCredentialsNodeFooter|$NewCredential${NL}$PackageSourceCredentialsNodeFooter|" $ConfigFile |
|||
fi |
|||
done |
|||
@ -1,83 +0,0 @@ |
|||
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. --> |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
<!-- |
|||
This MSBuild file is intended to be used as the body of the default |
|||
publishing release pipeline. The release pipeline will use this file |
|||
to invoke the SignCheck tool to validate that packages about to |
|||
be published are correctly signed. |
|||
|
|||
Parameters: |
|||
|
|||
- PackageBasePath : Directory containing all files that need to be validated. |
|||
- SignCheckVersion : Version of SignCheck package to be used. |
|||
- SignValidationExclusionList : ItemGroup containing exclusion list to be forwarded to SignCheck. |
|||
- EnableJarSigningCheck : Whether .jar files should be validated. |
|||
- EnableStrongNameCheck : Whether strong name check should be performed. |
|||
--> |
|||
|
|||
<PropertyGroup> |
|||
<TargetFramework>netcoreapp2.1</TargetFramework> |
|||
</PropertyGroup> |
|||
|
|||
<!-- |
|||
From 'Signing.props' we import $(SignValidationExclusionList) |
|||
--> |
|||
<Import Project="$(MSBuildThisFileDirectory)Signing.props" Condition="Exists('$(MSBuildThisFileDirectory)Signing.props')" /> |
|||
|
|||
<Target Name="ValidateSigning"> |
|||
<PropertyGroup> |
|||
<SignCheckToolPath>$(NuGetPackageRoot)Microsoft.DotNet.SignCheck\$(SignCheckVersion)\tools\Microsoft.DotNet.SignCheck.exe</SignCheckToolPath> |
|||
|
|||
<SignCheckInputDir>$(PackageBasePath)</SignCheckInputDir> |
|||
<SignCheckLog>signcheck.log</SignCheckLog> |
|||
<SignCheckErrorLog>signcheck.errors.log</SignCheckErrorLog> |
|||
<SignCheckExclusionsFile>signcheck.exclusions.txt</SignCheckExclusionsFile> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<!-- |
|||
Documentation for these arguments is available here: |
|||
https://github.com/dotnet/arcade/tree/master/src/SignCheck |
|||
--> |
|||
<SignCheckArgs Include="--recursive" /> |
|||
<SignCheckArgs Include="--traverse-subfolders" /> |
|||
<SignCheckArgs Include="--file-status AllFiles" /> |
|||
<SignCheckArgs Include="--log-file $(SignCheckLog)" /> |
|||
<SignCheckArgs Include="--error-log-file $(SignCheckErrorLog)" /> |
|||
<SignCheckArgs Include="--input-files $(SignCheckInputDir)" /> |
|||
|
|||
<SignCheckArgs Include="--exclusions-file $(SignCheckExclusionsFile)" Condition="'@(SignValidationExclusionList)' != ''" /> |
|||
<SignCheckArgs Include="--verify-jar" Condition="'$(EnableJarSigningCheck)' == 'true'" /> |
|||
<SignCheckArgs Include="--verify-strongname" Condition="'$(EnableStrongNameCheck)' == 'true'" /> |
|||
</ItemGroup> |
|||
|
|||
<WriteLinesToFile |
|||
File="$(SignCheckExclusionsFile)" |
|||
Lines="@(SignValidationExclusionList)" |
|||
Condition="'@(SignValidationExclusionList)' != ''" |
|||
Overwrite="true" |
|||
Encoding="Unicode"/> |
|||
|
|||
<!-- |
|||
IgnoreExitCode='true' because the tool doesn't return '0' on success. |
|||
--> |
|||
<Exec |
|||
Command=""$(SignCheckToolPath)" @(SignCheckArgs, ' ')" |
|||
IgnoreExitCode='true' |
|||
ConsoleToMsBuild="false" |
|||
StandardErrorImportance="high" /> |
|||
|
|||
<Error |
|||
Text="Signing validation failed. Check $(SignCheckErrorLog) for more information." |
|||
Condition="Exists($(SignCheckErrorLog)) and '$([System.IO.File]::ReadAllText($(SignCheckErrorLog)))' != ''" /> |
|||
|
|||
<Message |
|||
Text="##vso[artifact.upload containerfolder=LogFiles;artifactname=LogFiles]{SignCheckErrorLog}" |
|||
Condition="Exists($(SignCheckErrorLog)) and '$([System.IO.File]::ReadAllText($(SignCheckErrorLog)))' != ''" /> |
|||
|
|||
</Target> |
|||
|
|||
<ItemGroup> |
|||
<PackageReference Include="Microsoft.DotNet.SignCheck" Version="$(SignCheckVersion)" /> |
|||
</ItemGroup> |
|||
</Project> |
|||
@ -1,184 +0,0 @@ |
|||
param( |
|||
[Parameter(Mandatory=$true)][string] $InputPath, # Full path to directory where Symbols.NuGet packages to be checked are stored |
|||
[Parameter(Mandatory=$true)][string] $ExtractPath, # Full path to directory where the packages will be extracted during validation |
|||
[Parameter(Mandatory=$true)][string] $SourceLinkToolPath, # Full path to directory where dotnet SourceLink CLI was installed |
|||
[Parameter(Mandatory=$true)][string] $GHRepoName, # GitHub name of the repo including the Org. E.g., dotnet/arcade |
|||
[Parameter(Mandatory=$true)][string] $GHCommit # GitHub commit SHA used to build the packages |
|||
) |
|||
|
|||
# Cache/HashMap (File -> Exist flag) used to consult whether a file exist |
|||
# in the repository at a specific commit point. This is populated by inserting |
|||
# all files present in the repo at a specific commit point. |
|||
$global:RepoFiles = @{} |
|||
|
|||
$ValidatePackage = { |
|||
param( |
|||
[string] $PackagePath # Full path to a Symbols.NuGet package |
|||
) |
|||
|
|||
# Ensure input file exist |
|||
if (!(Test-Path $PackagePath)) { |
|||
throw "Input file does not exist: $PackagePath" |
|||
} |
|||
|
|||
# Extensions for which we'll look for SourceLink information |
|||
# For now we'll only care about Portable & Embedded PDBs |
|||
$RelevantExtensions = @(".dll", ".exe", ".pdb") |
|||
|
|||
Write-Host -NoNewLine "Validating" ([System.IO.Path]::GetFileName($PackagePath)) "... " |
|||
|
|||
$PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath) |
|||
$ExtractPath = Join-Path -Path $using:ExtractPath -ChildPath $PackageId |
|||
$FailedFiles = 0 |
|||
|
|||
Add-Type -AssemblyName System.IO.Compression.FileSystem |
|||
|
|||
[System.IO.Directory]::CreateDirectory($ExtractPath); |
|||
|
|||
$zip = [System.IO.Compression.ZipFile]::OpenRead($PackagePath) |
|||
|
|||
$zip.Entries | |
|||
Where-Object {$RelevantExtensions -contains [System.IO.Path]::GetExtension($_.Name)} | |
|||
ForEach-Object { |
|||
$FileName = $_.FullName |
|||
$Extension = [System.IO.Path]::GetExtension($_.Name) |
|||
$FakeName = -Join((New-Guid), $Extension) |
|||
$TargetFile = Join-Path -Path $ExtractPath -ChildPath $FakeName |
|||
|
|||
# We ignore resource DLLs |
|||
if ($FileName.EndsWith(".resources.dll")) { |
|||
return |
|||
} |
|||
|
|||
[System.IO.Compression.ZipFileExtensions]::ExtractToFile($_, $TargetFile, $true) |
|||
|
|||
$ValidateFile = { |
|||
param( |
|||
[string] $FullPath, # Full path to the module that has to be checked |
|||
[string] $RealPath, |
|||
[ref] $FailedFiles |
|||
) |
|||
|
|||
# Makes easier to reference `sourcelink cli` |
|||
Push-Location $using:SourceLinkToolPath |
|||
|
|||
$SourceLinkInfos = .\sourcelink.exe print-urls $FullPath | Out-String |
|||
|
|||
if ($LASTEXITCODE -eq 0 -and -not ([string]::IsNullOrEmpty($SourceLinkInfos))) { |
|||
$NumFailedLinks = 0 |
|||
|
|||
# We only care about Http addresses |
|||
$Matches = (Select-String '(http[s]?)(:\/\/)([^\s,]+)' -Input $SourceLinkInfos -AllMatches).Matches |
|||
|
|||
if ($Matches.Count -ne 0) { |
|||
$Matches.Value | |
|||
ForEach-Object { |
|||
$Link = $_ |
|||
$CommitUrl = -Join("https://raw.githubusercontent.com/", $using:GHRepoName, "/", $using:GHCommit, "/") |
|||
$FilePath = $Link.Replace($CommitUrl, "") |
|||
$Status = 200 |
|||
$Cache = $using:RepoFiles |
|||
|
|||
if ( !($Cache.ContainsKey($FilePath)) ) { |
|||
try { |
|||
$Uri = $Link -as [System.URI] |
|||
|
|||
# Only GitHub links are valid |
|||
if ($Uri.AbsoluteURI -ne $null -and $Uri.Host -match "github") { |
|||
$Status = (Invoke-WebRequest -Uri $Link -UseBasicParsing -Method HEAD -TimeoutSec 5).StatusCode |
|||
} |
|||
else { |
|||
$Status = 0 |
|||
} |
|||
} |
|||
catch { |
|||
$Status = 0 |
|||
} |
|||
} |
|||
|
|||
if ($Status -ne 200) { |
|||
if ($NumFailedLinks -eq 0) { |
|||
if ($FailedFiles.Value -eq 0) { |
|||
Write-Host |
|||
} |
|||
|
|||
Write-Host "`tFile $RealPath has broken links:" |
|||
} |
|||
|
|||
Write-Host "`t`tFailed to retrieve $Link" |
|||
|
|||
$NumFailedLinks++ |
|||
} |
|||
} |
|||
} |
|||
|
|||
if ($NumFailedLinks -ne 0) { |
|||
$FailedFiles.value++ |
|||
$global:LASTEXITCODE = 1 |
|||
} |
|||
} |
|||
|
|||
Pop-Location |
|||
} |
|||
|
|||
&$ValidateFile $TargetFile $FileName ([ref]$FailedFiles) |
|||
} |
|||
|
|||
$zip.Dispose() |
|||
|
|||
if ($FailedFiles -eq 0) { |
|||
Write-Host "Passed." |
|||
} |
|||
} |
|||
|
|||
function ValidateSourceLinkLinks { |
|||
if (!($GHRepoName -Match "^[^\s\/]+/[^\s\/]+$")) { |
|||
Write-Host "GHRepoName should be in the format <org>/<repo>" |
|||
$global:LASTEXITCODE = 1 |
|||
return |
|||
} |
|||
|
|||
if (!($GHCommit -Match "^[0-9a-fA-F]{40}$")) { |
|||
Write-Host "GHCommit should be a 40 chars hexadecimal string" |
|||
$global:LASTEXITCODE = 1 |
|||
return |
|||
} |
|||
|
|||
$RepoTreeURL = -Join("https://api.github.com/repos/", $GHRepoName, "/git/trees/", $GHCommit, "?recursive=1") |
|||
$CodeExtensions = @(".cs", ".vb", ".fs", ".fsi", ".fsx", ".fsscript") |
|||
|
|||
try { |
|||
# Retrieve the list of files in the repo at that particular commit point and store them in the RepoFiles hash |
|||
$Data = Invoke-WebRequest $RepoTreeURL | ConvertFrom-Json | Select-Object -ExpandProperty tree |
|||
|
|||
foreach ($file in $Data) { |
|||
$Extension = [System.IO.Path]::GetExtension($file.path) |
|||
|
|||
if ($CodeExtensions.Contains($Extension)) { |
|||
$RepoFiles[$file.path] = 1 |
|||
} |
|||
} |
|||
} |
|||
catch { |
|||
Write-Host "Problems downloading the list of files from the repo. Url used: $RepoTreeURL" |
|||
$global:LASTEXITCODE = 1 |
|||
return |
|||
} |
|||
|
|||
if (Test-Path $ExtractPath) { |
|||
Remove-Item $ExtractPath -Force -Recurse -ErrorAction SilentlyContinue |
|||
} |
|||
|
|||
# Process each NuGet package in parallel |
|||
$Jobs = @() |
|||
Get-ChildItem "$InputPath\*.symbols.nupkg" | |
|||
ForEach-Object { |
|||
$Jobs += Start-Job -ScriptBlock $ValidatePackage -ArgumentList $_.FullName |
|||
} |
|||
|
|||
foreach ($Job in $Jobs) { |
|||
Wait-Job -Id $Job.Id | Receive-Job |
|||
} |
|||
} |
|||
|
|||
Measure-Command { ValidateSourceLinkLinks } |
|||
@ -1,41 +0,0 @@ |
|||
set(CROSS_NDK_TOOLCHAIN $ENV{ROOTFS_DIR}/../) |
|||
set(CROSS_ROOTFS ${CROSS_NDK_TOOLCHAIN}/sysroot) |
|||
set(CLR_CMAKE_PLATFORM_ANDROID "Android") |
|||
|
|||
set(CMAKE_SYSTEM_NAME Linux) |
|||
set(CMAKE_SYSTEM_VERSION 1) |
|||
set(CMAKE_SYSTEM_PROCESSOR arm) |
|||
|
|||
## Specify the toolchain |
|||
set(TOOLCHAIN "arm-linux-androideabi") |
|||
set(CMAKE_PREFIX_PATH ${CROSS_NDK_TOOLCHAIN}) |
|||
set(TOOLCHAIN_PREFIX ${TOOLCHAIN}-) |
|||
|
|||
find_program(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}clang) |
|||
find_program(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}clang++) |
|||
find_program(CMAKE_ASM_COMPILER ${TOOLCHAIN_PREFIX}clang) |
|||
find_program(CMAKE_AR ${TOOLCHAIN_PREFIX}ar) |
|||
find_program(CMAKE_LD ${TOOLCHAIN_PREFIX}ar) |
|||
find_program(CMAKE_OBJCOPY ${TOOLCHAIN_PREFIX}objcopy) |
|||
find_program(CMAKE_OBJDUMP ${TOOLCHAIN_PREFIX}objdump) |
|||
|
|||
add_compile_options(--sysroot=${CROSS_ROOTFS}) |
|||
add_compile_options(-fPIE) |
|||
add_compile_options(-mfloat-abi=soft) |
|||
include_directories(SYSTEM ${CROSS_NDK_TOOLCHAIN}/include/c++/4.9.x/) |
|||
include_directories(SYSTEM ${CROSS_NDK_TOOLCHAIN}/include/c++/4.9.x/arm-linux-androideabi/) |
|||
|
|||
set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} -B ${CROSS_ROOTFS}/usr/lib/gcc/${TOOLCHAIN}") |
|||
set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} -L${CROSS_ROOTFS}/lib/${TOOLCHAIN}") |
|||
set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} --sysroot=${CROSS_ROOTFS}") |
|||
set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} -fPIE -pie") |
|||
|
|||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CROSS_LINK_FLAGS}" CACHE STRING "" FORCE) |
|||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${CROSS_LINK_FLAGS}" CACHE STRING "" FORCE) |
|||
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${CROSS_LINK_FLAGS}" CACHE STRING "" FORCE) |
|||
|
|||
set(CMAKE_FIND_ROOT_PATH "${CROSS_ROOTFS}") |
|||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) |
|||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) |
|||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) |
|||
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) |
|||
@ -1,42 +0,0 @@ |
|||
set(CROSS_NDK_TOOLCHAIN $ENV{ROOTFS_DIR}/../) |
|||
set(CROSS_ROOTFS ${CROSS_NDK_TOOLCHAIN}/sysroot) |
|||
set(CLR_CMAKE_PLATFORM_ANDROID "Android") |
|||
|
|||
set(CMAKE_SYSTEM_NAME Linux) |
|||
set(CMAKE_SYSTEM_VERSION 1) |
|||
set(CMAKE_SYSTEM_PROCESSOR aarch64) |
|||
|
|||
## Specify the toolchain |
|||
set(TOOLCHAIN "aarch64-linux-android") |
|||
set(CMAKE_PREFIX_PATH ${CROSS_NDK_TOOLCHAIN}) |
|||
set(TOOLCHAIN_PREFIX ${TOOLCHAIN}-) |
|||
|
|||
find_program(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}clang) |
|||
find_program(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}clang++) |
|||
find_program(CMAKE_ASM_COMPILER ${TOOLCHAIN_PREFIX}clang) |
|||
find_program(CMAKE_AR ${TOOLCHAIN_PREFIX}ar) |
|||
find_program(CMAKE_LD ${TOOLCHAIN_PREFIX}ar) |
|||
find_program(CMAKE_OBJCOPY ${TOOLCHAIN_PREFIX}objcopy) |
|||
find_program(CMAKE_OBJDUMP ${TOOLCHAIN_PREFIX}objdump) |
|||
|
|||
add_compile_options(--sysroot=${CROSS_ROOTFS}) |
|||
add_compile_options(-fPIE) |
|||
|
|||
## Needed for Android or bionic specific conditionals |
|||
add_compile_options(-D__ANDROID__) |
|||
add_compile_options(-D__BIONIC__) |
|||
|
|||
set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} -B ${CROSS_ROOTFS}/usr/lib/gcc/${TOOLCHAIN}") |
|||
set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} -L${CROSS_ROOTFS}/lib/${TOOLCHAIN}") |
|||
set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} --sysroot=${CROSS_ROOTFS}") |
|||
set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} -fPIE -pie") |
|||
|
|||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CROSS_LINK_FLAGS}" CACHE STRING "" FORCE) |
|||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${CROSS_LINK_FLAGS}" CACHE STRING "" FORCE) |
|||
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${CROSS_LINK_FLAGS}" CACHE STRING "" FORCE) |
|||
|
|||
set(CMAKE_FIND_ROOT_PATH "${CROSS_ROOTFS}") |
|||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) |
|||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) |
|||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) |
|||
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) |
|||
@ -0,0 +1,25 @@ |
|||
param( |
|||
[Parameter(Mandatory=$true)][string] $PromoteToChannels, # List of channels that the build should be promoted to |
|||
[Parameter(Mandatory=$true)][array] $AvailableChannelIds # List of channel IDs available in the YAML implementation |
|||
) |
|||
|
|||
try { |
|||
. $PSScriptRoot\post-build-utils.ps1 |
|||
|
|||
# Check that every channel that Maestro told to promote the build to |
|||
# is available in YAML |
|||
$PromoteToChannelsIds = $PromoteToChannels -split "\D" | Where-Object { $_ } |
|||
|
|||
foreach ($id in $PromoteToChannelsIds) { |
|||
if (($id -ne 0) -and ($id -notin $AvailableChannelIds)) { |
|||
Write-PipelineTaskError -Type 'warning' -Message "Channel $id is not present in the post-build YAML configuration!" |
|||
} |
|||
} |
|||
|
|||
Write-Host 'done.' |
|||
} |
|||
catch { |
|||
Write-Host $_ |
|||
Write-PipelineTelemetryError -Category 'CheckChannelConsistency' -Message "There was an error while trying to check consistency of Maestro default channels for the build and post-build YAML configuration." |
|||
ExitWithExitCode 1 |
|||
} |
|||
@ -1,45 +0,0 @@ |
|||
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 |
|||
} |
|||
|
|||
# For now, only use a dry run. |
|||
# Ideally we would change darc to enable a quick request that |
|||
# would check whether the file exists that you can download it, |
|||
# and that it won't conflict with other files. |
|||
# https://github.com/dotnet/arcade/issues/3674 |
|||
# Right now we can't remove continue-on-error because we ocassionally will have |
|||
# dependencies that have no associated builds (e.g. an old dependency). |
|||
# We need to add an option to baseline specific dependencies away, or add them manually |
|||
# to the BAR. |
|||
darc gather-drop --non-shipping ` |
|||
--dry-run ` |
|||
--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 |
|||
} |
|||
@ -1,26 +0,0 @@ |
|||
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 |
|||
} |
|||
@ -1,100 +1,114 @@ |
|||
Param( |
|||
[string] $GuardianPackageName, # Required: the name of guardian CLI package (not needed if GuardianCliLocation is specified) |
|||
[string] $NugetPackageDirectory, # Required: directory where NuGet packages are installed (not needed if GuardianCliLocation is specified) |
|||
[string] $GuardianCliLocation, # Optional: Direct location of Guardian CLI executable if GuardianPackageName & NugetPackageDirectory are not specified |
|||
[string] $Repository=$env:BUILD_REPOSITORY_NAME, # Required: the name of the repository (e.g. dotnet/arcade) |
|||
[string] $BranchName=$env:BUILD_SOURCEBRANCH, # Optional: name of branch or version of gdn settings; defaults to master |
|||
[string] $SourceDirectory=$env:BUILD_SOURCESDIRECTORY, # Required: the directory where source files are located |
|||
[string] $ArtifactsDirectory = (Join-Path $env:BUILD_SOURCESDIRECTORY ("artifacts")), # Required: the directory where build artifacts are located |
|||
[string] $AzureDevOpsAccessToken, # Required: access token for dnceng; should be provided via KeyVault |
|||
[string[]] $SourceToolsList, # Optional: list of SDL tools to run on source code |
|||
[string[]] $ArtifactToolsList, # Optional: list of SDL tools to run on built artifacts |
|||
[bool] $TsaPublish=$False, # Optional: true will publish results to TSA; only set to true after onboarding to TSA; TSA is the automated framework used to upload test results as bugs. |
|||
[string] $TsaBranchName=$env:BUILD_SOURCEBRANCH, # Optional: required for TSA publish; defaults to $(Build.SourceBranchName); TSA is the automated framework used to upload test results as bugs. |
|||
[string] $TsaRepositoryName=$env:BUILD_REPOSITORY_NAME, # Optional: TSA repository name; will be generated automatically if not submitted; TSA is the automated framework used to upload test results as bugs. |
|||
[string] $BuildNumber=$env:BUILD_BUILDNUMBER, # Optional: required for TSA publish; defaults to $(Build.BuildNumber) |
|||
[bool] $UpdateBaseline=$False, # Optional: if true, will update the baseline in the repository; should only be run after fixing any issues which need to be fixed |
|||
[bool] $TsaOnboard=$False, # Optional: if true, will onboard the repository to TSA; should only be run once; TSA is the automated framework used to upload test results as bugs. |
|||
[string] $TsaInstanceUrl, # Optional: only needed if TsaOnboard or TsaPublish is true; the instance-url registered with TSA; TSA is the automated framework used to upload test results as bugs. |
|||
[string] $TsaCodebaseName, # Optional: only needed if TsaOnboard or TsaPublish is true; the name of the codebase registered with TSA; TSA is the automated framework used to upload test results as bugs. |
|||
[string] $TsaProjectName, # Optional: only needed if TsaOnboard or TsaPublish is true; the name of the project registered with TSA; TSA is the automated framework used to upload test results as bugs. |
|||
[string] $TsaNotificationEmail, # Optional: only needed if TsaOnboard is true; the email(s) which will receive notifications of TSA bug filings (e.g. alias@microsoft.com); TSA is the automated framework used to upload test results as bugs. |
|||
[string] $TsaCodebaseAdmin, # Optional: only needed if TsaOnboard is true; the aliases which are admins of the TSA codebase (e.g. DOMAIN\alias); TSA is the automated framework used to upload test results as bugs. |
|||
[string] $TsaBugAreaPath, # Optional: only needed if TsaOnboard is true; the area path where TSA will file bugs in AzDO; TSA is the automated framework used to upload test results as bugs. |
|||
[string] $TsaIterationPath, # Optional: only needed if TsaOnboard is true; the iteration path where TSA will file bugs in AzDO; TSA is the automated framework used to upload test results as bugs. |
|||
[string] $GuardianLoggerLevel="Standard", # Optional: the logger level for the Guardian CLI; options are Trace, Verbose, Standard, Warning, and Error |
|||
[string[]] $CrScanAdditionalRunConfigParams, # Optional: Additional Params to custom build a CredScan run config in the format @("xyz:abc","sdf:1") |
|||
[string[]] $PoliCheckAdditionalRunConfigParams # Optional: Additional Params to custom build a Policheck run config in the format @("xyz:abc","sdf:1") |
|||
[string] $GuardianPackageName, # Required: the name of guardian CLI package (not needed if GuardianCliLocation is specified) |
|||
[string] $NugetPackageDirectory, # Required: directory where NuGet packages are installed (not needed if GuardianCliLocation is specified) |
|||
[string] $GuardianCliLocation, # Optional: Direct location of Guardian CLI executable if GuardianPackageName & NugetPackageDirectory are not specified |
|||
[string] $Repository=$env:BUILD_REPOSITORY_NAME, # Required: the name of the repository (e.g. dotnet/arcade) |
|||
[string] $BranchName=$env:BUILD_SOURCEBRANCH, # Optional: name of branch or version of gdn settings; defaults to master |
|||
[string] $SourceDirectory=$env:BUILD_SOURCESDIRECTORY, # Required: the directory where source files are located |
|||
[string] $ArtifactsDirectory = (Join-Path $env:BUILD_ARTIFACTSTAGINGDIRECTORY ('artifacts')), # Required: the directory where build artifacts are located |
|||
[string] $AzureDevOpsAccessToken, # Required: access token for dnceng; should be provided via KeyVault |
|||
[string[]] $SourceToolsList, # Optional: list of SDL tools to run on source code |
|||
[string[]] $ArtifactToolsList, # Optional: list of SDL tools to run on built artifacts |
|||
[bool] $TsaPublish=$False, # Optional: true will publish results to TSA; only set to true after onboarding to TSA; TSA is the automated framework used to upload test results as bugs. |
|||
[string] $TsaBranchName=$env:BUILD_SOURCEBRANCH, # Optional: required for TSA publish; defaults to $(Build.SourceBranchName); TSA is the automated framework used to upload test results as bugs. |
|||
[string] $TsaRepositoryName=$env:BUILD_REPOSITORY_NAME, # Optional: TSA repository name; will be generated automatically if not submitted; TSA is the automated framework used to upload test results as bugs. |
|||
[string] $BuildNumber=$env:BUILD_BUILDNUMBER, # Optional: required for TSA publish; defaults to $(Build.BuildNumber) |
|||
[bool] $UpdateBaseline=$False, # Optional: if true, will update the baseline in the repository; should only be run after fixing any issues which need to be fixed |
|||
[bool] $TsaOnboard=$False, # Optional: if true, will onboard the repository to TSA; should only be run once; TSA is the automated framework used to upload test results as bugs. |
|||
[string] $TsaInstanceUrl, # Optional: only needed if TsaOnboard or TsaPublish is true; the instance-url registered with TSA; TSA is the automated framework used to upload test results as bugs. |
|||
[string] $TsaCodebaseName, # Optional: only needed if TsaOnboard or TsaPublish is true; the name of the codebase registered with TSA; TSA is the automated framework used to upload test results as bugs. |
|||
[string] $TsaProjectName, # Optional: only needed if TsaOnboard or TsaPublish is true; the name of the project registered with TSA; TSA is the automated framework used to upload test results as bugs. |
|||
[string] $TsaNotificationEmail, # Optional: only needed if TsaOnboard is true; the email(s) which will receive notifications of TSA bug filings (e.g. alias@microsoft.com); TSA is the automated framework used to upload test results as bugs. |
|||
[string] $TsaCodebaseAdmin, # Optional: only needed if TsaOnboard is true; the aliases which are admins of the TSA codebase (e.g. DOMAIN\alias); TSA is the automated framework used to upload test results as bugs. |
|||
[string] $TsaBugAreaPath, # Optional: only needed if TsaOnboard is true; the area path where TSA will file bugs in AzDO; TSA is the automated framework used to upload test results as bugs. |
|||
[string] $TsaIterationPath, # Optional: only needed if TsaOnboard is true; the iteration path where TSA will file bugs in AzDO; TSA is the automated framework used to upload test results as bugs. |
|||
[string] $GuardianLoggerLevel='Standard', # Optional: the logger level for the Guardian CLI; options are Trace, Verbose, Standard, Warning, and Error |
|||
[string[]] $CrScanAdditionalRunConfigParams, # Optional: Additional Params to custom build a CredScan run config in the format @("xyz:abc","sdf:1") |
|||
[string[]] $PoliCheckAdditionalRunConfigParams # Optional: Additional Params to custom build a Policheck run config in the format @("xyz:abc","sdf:1") |
|||
) |
|||
|
|||
$ErrorActionPreference = "Stop" |
|||
Set-StrictMode -Version 2.0 |
|||
$LASTEXITCODE = 0 |
|||
try { |
|||
$ErrorActionPreference = 'Stop' |
|||
Set-StrictMode -Version 2.0 |
|||
$disableConfigureToolsetImport = $true |
|||
$LASTEXITCODE = 0 |
|||
|
|||
#Replace repo names to the format of org/repo |
|||
if (!($Repository.contains('/'))) { |
|||
$RepoName = $Repository -replace '(.*?)-(.*)', '$1/$2'; |
|||
} |
|||
else{ |
|||
$RepoName = $Repository; |
|||
} |
|||
# `tools.ps1` checks $ci to perform some actions. Since the SDL |
|||
# 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 |
|||
|
|||
if ($GuardianPackageName) { |
|||
$guardianCliLocation = Join-Path $NugetPackageDirectory (Join-Path $GuardianPackageName (Join-Path "tools" "guardian.cmd")) |
|||
} else { |
|||
$guardianCliLocation = $GuardianCliLocation |
|||
} |
|||
#Replace repo names to the format of org/repo |
|||
if (!($Repository.contains('/'))) { |
|||
$RepoName = $Repository -replace '(.*?)-(.*)', '$1/$2'; |
|||
} |
|||
else{ |
|||
$RepoName = $Repository; |
|||
} |
|||
|
|||
if ($GuardianPackageName) { |
|||
$guardianCliLocation = Join-Path $NugetPackageDirectory (Join-Path $GuardianPackageName (Join-Path 'tools' 'guardian.cmd')) |
|||
} else { |
|||
$guardianCliLocation = $GuardianCliLocation |
|||
} |
|||
|
|||
$workingDirectory = (Split-Path $SourceDirectory -Parent) |
|||
$ValidPath = Test-Path $guardianCliLocation |
|||
$workingDirectory = (Split-Path $SourceDirectory -Parent) |
|||
$ValidPath = Test-Path $guardianCliLocation |
|||
|
|||
if ($ValidPath -eq $False) |
|||
{ |
|||
Write-Host "Invalid Guardian CLI Location." |
|||
exit 1 |
|||
} |
|||
if ($ValidPath -eq $False) |
|||
{ |
|||
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message 'Invalid Guardian CLI Location.' |
|||
ExitWithExitCode 1 |
|||
} |
|||
|
|||
& $(Join-Path $PSScriptRoot "init-sdl.ps1") -GuardianCliLocation $guardianCliLocation -Repository $RepoName -BranchName $BranchName -WorkingDirectory $workingDirectory -AzureDevOpsAccessToken $AzureDevOpsAccessToken -GuardianLoggerLevel $GuardianLoggerLevel |
|||
$gdnFolder = Join-Path $workingDirectory ".gdn" |
|||
& $(Join-Path $PSScriptRoot 'init-sdl.ps1') -GuardianCliLocation $guardianCliLocation -Repository $RepoName -BranchName $BranchName -WorkingDirectory $workingDirectory -AzureDevOpsAccessToken $AzureDevOpsAccessToken -GuardianLoggerLevel $GuardianLoggerLevel |
|||
$gdnFolder = Join-Path $workingDirectory '.gdn' |
|||
|
|||
if ($TsaOnboard) { |
|||
if ($TsaCodebaseName -and $TsaNotificationEmail -and $TsaCodebaseAdmin -and $TsaBugAreaPath) { |
|||
Write-Host "$guardianCliLocation tsa-onboard --codebase-name `"$TsaCodebaseName`" --notification-alias `"$TsaNotificationEmail`" --codebase-admin `"$TsaCodebaseAdmin`" --instance-url `"$TsaInstanceUrl`" --project-name `"$TsaProjectName`" --area-path `"$TsaBugAreaPath`" --iteration-path `"$TsaIterationPath`" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel" |
|||
& $guardianCliLocation tsa-onboard --codebase-name "$TsaCodebaseName" --notification-alias "$TsaNotificationEmail" --codebase-admin "$TsaCodebaseAdmin" --instance-url "$TsaInstanceUrl" --project-name "$TsaProjectName" --area-path "$TsaBugAreaPath" --iteration-path "$TsaIterationPath" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel |
|||
if ($LASTEXITCODE -ne 0) { |
|||
Write-Host "Guardian tsa-onboard failed with exit code $LASTEXITCODE." |
|||
exit $LASTEXITCODE |
|||
if ($TsaOnboard) { |
|||
if ($TsaCodebaseName -and $TsaNotificationEmail -and $TsaCodebaseAdmin -and $TsaBugAreaPath) { |
|||
Write-Host "$guardianCliLocation tsa-onboard --codebase-name `"$TsaCodebaseName`" --notification-alias `"$TsaNotificationEmail`" --codebase-admin `"$TsaCodebaseAdmin`" --instance-url `"$TsaInstanceUrl`" --project-name `"$TsaProjectName`" --area-path `"$TsaBugAreaPath`" --iteration-path `"$TsaIterationPath`" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel" |
|||
& $guardianCliLocation tsa-onboard --codebase-name "$TsaCodebaseName" --notification-alias "$TsaNotificationEmail" --codebase-admin "$TsaCodebaseAdmin" --instance-url "$TsaInstanceUrl" --project-name "$TsaProjectName" --area-path "$TsaBugAreaPath" --iteration-path "$TsaIterationPath" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel |
|||
if ($LASTEXITCODE -ne 0) { |
|||
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian tsa-onboard failed with exit code $LASTEXITCODE." |
|||
ExitWithExitCode $LASTEXITCODE |
|||
} |
|||
} else { |
|||
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message 'Could not onboard to TSA -- not all required values ($TsaCodebaseName, $TsaNotificationEmail, $TsaCodebaseAdmin, $TsaBugAreaPath) were specified.' |
|||
ExitWithExitCode 1 |
|||
} |
|||
} else { |
|||
Write-Host "Could not onboard to TSA -- not all required values ($$TsaCodebaseName, $$TsaNotificationEmail, $$TsaCodebaseAdmin, $$TsaBugAreaPath) were specified." |
|||
exit 1 |
|||
} |
|||
} |
|||
|
|||
if ($ArtifactToolsList -and $ArtifactToolsList.Count -gt 0) { |
|||
& $(Join-Path $PSScriptRoot "run-sdl.ps1") -GuardianCliLocation $guardianCliLocation -WorkingDirectory $workingDirectory -TargetDirectory $ArtifactsDirectory -GdnFolder $gdnFolder -ToolsList $ArtifactToolsList -AzureDevOpsAccessToken $AzureDevOpsAccessToken -UpdateBaseline $UpdateBaseline -GuardianLoggerLevel $GuardianLoggerLevel -CrScanAdditionalRunConfigParams $CrScanAdditionalRunConfigParams -PoliCheckAdditionalRunConfigParams $PoliCheckAdditionalRunConfigParams |
|||
} |
|||
if ($SourceToolsList -and $SourceToolsList.Count -gt 0) { |
|||
& $(Join-Path $PSScriptRoot "run-sdl.ps1") -GuardianCliLocation $guardianCliLocation -WorkingDirectory $workingDirectory -TargetDirectory $SourceDirectory -GdnFolder $gdnFolder -ToolsList $SourceToolsList -AzureDevOpsAccessToken $AzureDevOpsAccessToken -UpdateBaseline $UpdateBaseline -GuardianLoggerLevel $GuardianLoggerLevel -CrScanAdditionalRunConfigParams $CrScanAdditionalRunConfigParams -PoliCheckAdditionalRunConfigParams $PoliCheckAdditionalRunConfigParams |
|||
} |
|||
if ($ArtifactToolsList -and $ArtifactToolsList.Count -gt 0) { |
|||
& $(Join-Path $PSScriptRoot 'run-sdl.ps1') -GuardianCliLocation $guardianCliLocation -WorkingDirectory $workingDirectory -TargetDirectory $ArtifactsDirectory -GdnFolder $gdnFolder -ToolsList $ArtifactToolsList -AzureDevOpsAccessToken $AzureDevOpsAccessToken -UpdateBaseline $UpdateBaseline -GuardianLoggerLevel $GuardianLoggerLevel -CrScanAdditionalRunConfigParams $CrScanAdditionalRunConfigParams -PoliCheckAdditionalRunConfigParams $PoliCheckAdditionalRunConfigParams |
|||
} |
|||
if ($SourceToolsList -and $SourceToolsList.Count -gt 0) { |
|||
& $(Join-Path $PSScriptRoot 'run-sdl.ps1') -GuardianCliLocation $guardianCliLocation -WorkingDirectory $workingDirectory -TargetDirectory $SourceDirectory -GdnFolder $gdnFolder -ToolsList $SourceToolsList -AzureDevOpsAccessToken $AzureDevOpsAccessToken -UpdateBaseline $UpdateBaseline -GuardianLoggerLevel $GuardianLoggerLevel -CrScanAdditionalRunConfigParams $CrScanAdditionalRunConfigParams -PoliCheckAdditionalRunConfigParams $PoliCheckAdditionalRunConfigParams |
|||
} |
|||
|
|||
if ($UpdateBaseline) { |
|||
& (Join-Path $PSScriptRoot "push-gdn.ps1") -Repository $RepoName -BranchName $BranchName -GdnFolder $GdnFolder -AzureDevOpsAccessToken $AzureDevOpsAccessToken -PushReason "Update baseline" |
|||
} |
|||
if ($UpdateBaseline) { |
|||
& (Join-Path $PSScriptRoot 'push-gdn.ps1') -Repository $RepoName -BranchName $BranchName -GdnFolder $GdnFolder -AzureDevOpsAccessToken $AzureDevOpsAccessToken -PushReason 'Update baseline' |
|||
} |
|||
|
|||
if ($TsaPublish) { |
|||
if ($TsaBranchName -and $BuildNumber) { |
|||
if (-not $TsaRepositoryName) { |
|||
$TsaRepositoryName = "$($Repository)-$($BranchName)" |
|||
} |
|||
Write-Host "$guardianCliLocation tsa-publish --all-tools --repository-name `"$TsaRepositoryName`" --branch-name `"$TsaBranchName`" --build-number `"$BuildNumber`" --codebase-name `"$TsaCodebaseName`" --notification-alias `"$TsaNotificationEmail`" --codebase-admin `"$TsaCodebaseAdmin`" --instance-url `"$TsaInstanceUrl`" --project-name `"$TsaProjectName`" --area-path `"$TsaBugAreaPath`" --iteration-path `"$TsaIterationPath`" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel" |
|||
& $guardianCliLocation tsa-publish --all-tools --repository-name "$TsaRepositoryName" --branch-name "$TsaBranchName" --build-number "$BuildNumber" --onboard $True --codebase-name "$TsaCodebaseName" --notification-alias "$TsaNotificationEmail" --codebase-admin "$TsaCodebaseAdmin" --instance-url "$TsaInstanceUrl" --project-name "$TsaProjectName" --area-path "$TsaBugAreaPath" --iteration-path "$TsaIterationPath" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel |
|||
if ($LASTEXITCODE -ne 0) { |
|||
Write-Host "Guardian tsa-publish failed with exit code $LASTEXITCODE." |
|||
exit $LASTEXITCODE |
|||
if ($TsaPublish) { |
|||
if ($TsaBranchName -and $BuildNumber) { |
|||
if (-not $TsaRepositoryName) { |
|||
$TsaRepositoryName = "$($Repository)-$($BranchName)" |
|||
} |
|||
Write-Host "$guardianCliLocation tsa-publish --all-tools --repository-name `"$TsaRepositoryName`" --branch-name `"$TsaBranchName`" --build-number `"$BuildNumber`" --codebase-name `"$TsaCodebaseName`" --notification-alias `"$TsaNotificationEmail`" --codebase-admin `"$TsaCodebaseAdmin`" --instance-url `"$TsaInstanceUrl`" --project-name `"$TsaProjectName`" --area-path `"$TsaBugAreaPath`" --iteration-path `"$TsaIterationPath`" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel" |
|||
& $guardianCliLocation tsa-publish --all-tools --repository-name "$TsaRepositoryName" --branch-name "$TsaBranchName" --build-number "$BuildNumber" --onboard $True --codebase-name "$TsaCodebaseName" --notification-alias "$TsaNotificationEmail" --codebase-admin "$TsaCodebaseAdmin" --instance-url "$TsaInstanceUrl" --project-name "$TsaProjectName" --area-path "$TsaBugAreaPath" --iteration-path "$TsaIterationPath" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel |
|||
if ($LASTEXITCODE -ne 0) { |
|||
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian tsa-publish failed with exit code $LASTEXITCODE." |
|||
ExitWithExitCode $LASTEXITCODE |
|||
} |
|||
} else { |
|||
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message 'Could not publish to TSA -- not all required values ($TsaBranchName, $BuildNumber) were specified.' |
|||
ExitWithExitCode 1 |
|||
} |
|||
} else { |
|||
Write-Host "Could not publish to TSA -- not all required values ($$TsaBranchName, $$BuildNumber) were specified." |
|||
exit 1 |
|||
} |
|||
} |
|||
catch { |
|||
Write-Host $_.ScriptStackTrace |
|||
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_ |
|||
exit 1 |
|||
} |
|||
|
|||
@ -1,51 +1,69 @@ |
|||
Param( |
|||
[string] $Repository, |
|||
[string] $BranchName="master", |
|||
[string] $BranchName='master', |
|||
[string] $GdnFolder, |
|||
[string] $AzureDevOpsAccessToken, |
|||
[string] $PushReason |
|||
) |
|||
|
|||
$ErrorActionPreference = "Stop" |
|||
$ErrorActionPreference = 'Stop' |
|||
Set-StrictMode -Version 2.0 |
|||
$disableConfigureToolsetImport = $true |
|||
$LASTEXITCODE = 0 |
|||
|
|||
# We create the temp directory where we'll store the sdl-config repository |
|||
$sdlDir = Join-Path $env:TEMP "sdl" |
|||
if (Test-Path $sdlDir) { |
|||
Remove-Item -Force -Recurse $sdlDir |
|||
} |
|||
try { |
|||
# `tools.ps1` checks $ci to perform some actions. Since the SDL |
|||
# 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 |
|||
|
|||
Write-Host "git clone https://dnceng:`$AzureDevOpsAccessToken@dev.azure.com/dnceng/internal/_git/sdl-tool-cfg $sdlDir" |
|||
git clone https://dnceng:$AzureDevOpsAccessToken@dev.azure.com/dnceng/internal/_git/sdl-tool-cfg $sdlDir |
|||
if ($LASTEXITCODE -ne 0) { |
|||
Write-Error "Git clone failed with exit code $LASTEXITCODE." |
|||
} |
|||
# We copy the .gdn folder from our local run into the git repository so it can be committed |
|||
$sdlRepositoryFolder = Join-Path (Join-Path (Join-Path $sdlDir $Repository) $BranchName) ".gdn" |
|||
if (Get-Command Robocopy) { |
|||
Robocopy /S $GdnFolder $sdlRepositoryFolder |
|||
} else { |
|||
rsync -r $GdnFolder $sdlRepositoryFolder |
|||
} |
|||
# cd to the sdl-config directory so we can run git there |
|||
Push-Location $sdlDir |
|||
# git add . --> git commit --> git push |
|||
Write-Host "git add ." |
|||
git add . |
|||
if ($LASTEXITCODE -ne 0) { |
|||
Write-Error "Git add failed with exit code $LASTEXITCODE." |
|||
} |
|||
Write-Host "git -c user.email=`"dn-bot@microsoft.com`" -c user.name=`"Dotnet Bot`" commit -m `"$PushReason for $Repository/$BranchName`"" |
|||
git -c user.email="dn-bot@microsoft.com" -c user.name="Dotnet Bot" commit -m "$PushReason for $Repository/$BranchName" |
|||
if ($LASTEXITCODE -ne 0) { |
|||
Write-Error "Git commit failed with exit code $LASTEXITCODE." |
|||
# We create the temp directory where we'll store the sdl-config repository |
|||
$sdlDir = Join-Path $env:TEMP 'sdl' |
|||
if (Test-Path $sdlDir) { |
|||
Remove-Item -Force -Recurse $sdlDir |
|||
} |
|||
|
|||
Write-Host "git clone https://dnceng:`$AzureDevOpsAccessToken@dev.azure.com/dnceng/internal/_git/sdl-tool-cfg $sdlDir" |
|||
git clone https://dnceng:$AzureDevOpsAccessToken@dev.azure.com/dnceng/internal/_git/sdl-tool-cfg $sdlDir |
|||
if ($LASTEXITCODE -ne 0) { |
|||
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Git clone failed with exit code $LASTEXITCODE." |
|||
ExitWithExitCode $LASTEXITCODE |
|||
} |
|||
# We copy the .gdn folder from our local run into the git repository so it can be committed |
|||
$sdlRepositoryFolder = Join-Path (Join-Path (Join-Path $sdlDir $Repository) $BranchName) '.gdn' |
|||
if (Get-Command Robocopy) { |
|||
Robocopy /S $GdnFolder $sdlRepositoryFolder |
|||
} else { |
|||
rsync -r $GdnFolder $sdlRepositoryFolder |
|||
} |
|||
# cd to the sdl-config directory so we can run git there |
|||
Push-Location $sdlDir |
|||
# git add . --> git commit --> git push |
|||
Write-Host 'git add .' |
|||
git add . |
|||
if ($LASTEXITCODE -ne 0) { |
|||
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Git add failed with exit code $LASTEXITCODE." |
|||
ExitWithExitCode $LASTEXITCODE |
|||
} |
|||
Write-Host "git -c user.email=`"dn-bot@microsoft.com`" -c user.name=`"Dotnet Bot`" commit -m `"$PushReason for $Repository/$BranchName`"" |
|||
git -c user.email="dn-bot@microsoft.com" -c user.name="Dotnet Bot" commit -m "$PushReason for $Repository/$BranchName" |
|||
if ($LASTEXITCODE -ne 0) { |
|||
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Git commit failed with exit code $LASTEXITCODE." |
|||
ExitWithExitCode $LASTEXITCODE |
|||
} |
|||
Write-Host 'git push' |
|||
git push |
|||
if ($LASTEXITCODE -ne 0) { |
|||
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Git push failed with exit code $LASTEXITCODE." |
|||
ExitWithExitCode $LASTEXITCODE |
|||
} |
|||
|
|||
# Return to the original directory |
|||
Pop-Location |
|||
} |
|||
Write-Host "git push" |
|||
git push |
|||
if ($LASTEXITCODE -ne 0) { |
|||
Write-Error "Git push failed with exit code $LASTEXITCODE." |
|||
catch { |
|||
Write-Host $_.ScriptStackTrace |
|||
Write-PipelineTelemetryError -Category 'Sdl' -Message $_ |
|||
ExitWithExitCode 1 |
|||
} |
|||
|
|||
# Return to the original directory |
|||
Pop-Location |
|||
@ -0,0 +1,178 @@ |
|||
parameters: |
|||
artifactsPublishingAdditionalParameters: '' |
|||
dependsOn: |
|||
- Validate |
|||
publishInstallersAndChecksums: false |
|||
symbolPublishingAdditionalParameters: '' |
|||
stageName: '' |
|||
channelName: '' |
|||
channelId: '' |
|||
transportFeed: '' |
|||
shippingFeed: '' |
|||
symbolsFeed: '' |
|||
# If the channel name is empty, no links will be generated |
|||
akaMSChannelName: '' |
|||
|
|||
stages: |
|||
- stage: ${{ parameters.stageName }} |
|||
dependsOn: ${{ parameters.dependsOn }} |
|||
variables: |
|||
- template: ../common-variables.yml |
|||
displayName: ${{ parameters.channelName }} Publishing |
|||
jobs: |
|||
- template: ../setup-maestro-vars.yml |
|||
|
|||
- job: publish_symbols |
|||
displayName: Symbol Publishing |
|||
dependsOn: setupMaestroVars |
|||
condition: or(contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }} )), eq(dependencies.setupMaestroVars.outputs['setReleaseVars.PromoteToMaestroChannelId'], ${{ parameters.channelId }})) |
|||
variables: |
|||
- group: DotNet-Symbol-Server-Pats |
|||
- name: AzDOProjectName |
|||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ] |
|||
- name: AzDOPipelineId |
|||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ] |
|||
- name: AzDOBuildId |
|||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ] |
|||
pool: |
|||
vmImage: 'windows-2019' |
|||
steps: |
|||
- task: DownloadBuildArtifacts@0 |
|||
displayName: Download Build Assets |
|||
continueOnError: true |
|||
inputs: |
|||
buildType: specific |
|||
buildVersionToDownload: specific |
|||
project: $(AzDOProjectName) |
|||
pipeline: $(AzDOPipelineId) |
|||
buildId: $(AzDOBuildId) |
|||
downloadType: 'specific' |
|||
itemPattern: | |
|||
PdbArtifacts/** |
|||
BlobArtifacts/** |
|||
downloadPath: '$(Build.ArtifactStagingDirectory)' |
|||
|
|||
# This is necessary whenever we want to publish/restore to an AzDO private feed |
|||
# Since sdk-task.ps1 tries to restore packages we need to do this authentication here |
|||
# otherwise it'll complain about accessing a private feed. |
|||
- task: NuGetAuthenticate@0 |
|||
displayName: 'Authenticate to AzDO Feeds' |
|||
|
|||
- task: PowerShell@2 |
|||
displayName: Enable cross-org publishing |
|||
inputs: |
|||
filePath: eng\common\enable-cross-org-publishing.ps1 |
|||
arguments: -token $(dn-bot-dnceng-artifact-feeds-rw) |
|||
|
|||
- task: PowerShell@2 |
|||
displayName: Publish |
|||
inputs: |
|||
filePath: eng\common\sdk-task.ps1 |
|||
arguments: -task PublishToSymbolServers -restore -msbuildEngine dotnet |
|||
/p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat) |
|||
/p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat) |
|||
/p:PDBArtifactsDirectory='$(Build.ArtifactStagingDirectory)/PDBArtifacts/' |
|||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/' |
|||
/p:SymbolPublishingExclusionsFile='$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt' |
|||
/p:Configuration=Release |
|||
${{ parameters.symbolPublishingAdditionalParameters }} |
|||
|
|||
- template: ../../steps/publish-logs.yml |
|||
parameters: |
|||
StageLabel: '${{ parameters.stageName }}' |
|||
JobLabel: 'SymbolPublishing' |
|||
|
|||
- job: publish_assets |
|||
displayName: Publish Assets |
|||
dependsOn: setupMaestroVars |
|||
timeoutInMinutes: 120 |
|||
variables: |
|||
- name: BARBuildId |
|||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ] |
|||
- name: IsStableBuild |
|||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ] |
|||
- name: AzDOProjectName |
|||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ] |
|||
- name: AzDOPipelineId |
|||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ] |
|||
- name: AzDOBuildId |
|||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ] |
|||
- name: ArtifactsCategory |
|||
value: ${{ coalesce(variables._DotNetArtifactsCategory, '.NETCore') }} |
|||
condition: or(contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }} )), eq(dependencies.setupMaestroVars.outputs['setReleaseVars.PromoteToMaestroChannelId'], ${{ parameters.channelId }})) |
|||
pool: |
|||
vmImage: 'windows-2019' |
|||
steps: |
|||
- task: DownloadBuildArtifacts@0 |
|||
displayName: Download Build Assets |
|||
continueOnError: true |
|||
inputs: |
|||
buildType: specific |
|||
buildVersionToDownload: specific |
|||
project: $(AzDOProjectName) |
|||
pipeline: $(AzDOPipelineId) |
|||
buildId: $(AzDOBuildId) |
|||
downloadType: 'specific' |
|||
itemPattern: | |
|||
PackageArtifacts/** |
|||
BlobArtifacts/** |
|||
AssetManifests/** |
|||
downloadPath: '$(Build.ArtifactStagingDirectory)' |
|||
|
|||
- task: NuGetToolInstaller@1 |
|||
displayName: 'Install NuGet.exe' |
|||
|
|||
# This is necessary whenever we want to publish/restore to an AzDO private feed |
|||
- task: NuGetAuthenticate@0 |
|||
displayName: 'Authenticate to AzDO Feeds' |
|||
|
|||
- task: PowerShell@2 |
|||
displayName: Enable cross-org publishing |
|||
inputs: |
|||
filePath: eng\common\enable-cross-org-publishing.ps1 |
|||
arguments: -token $(dn-bot-dnceng-artifact-feeds-rw) |
|||
|
|||
- task: PowerShell@2 |
|||
displayName: Publish Assets |
|||
inputs: |
|||
filePath: eng\common\sdk-task.ps1 |
|||
arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet |
|||
/p:ArtifactsCategory=$(ArtifactsCategory) |
|||
/p:IsStableBuild=$(IsStableBuild) |
|||
/p:IsInternalBuild=$(IsInternalBuild) |
|||
/p:RepositoryName=$(Build.Repository.Name) |
|||
/p:CommitSha=$(Build.SourceVersion) |
|||
/p:NugetPath=$(NuGetExeToolPath) |
|||
/p:AzdoTargetFeedPAT='$(dn-bot-dnceng-universal-packages-rw)' |
|||
/p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)' |
|||
/p:BARBuildId=$(BARBuildId) |
|||
/p:MaestroApiEndpoint='$(MaestroApiEndPoint)' |
|||
/p:BuildAssetRegistryToken='$(MaestroApiAccessToken)' |
|||
/p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/' |
|||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/' |
|||
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/' |
|||
/p:Configuration=Release |
|||
/p:PublishInstallersAndChecksums=${{ parameters.publishInstallersAndChecksums }} |
|||
/p:InstallersTargetStaticFeed=$(InstallersBlobFeedUrl) |
|||
/p:InstallersAzureAccountKey=$(dotnetcli-storage-key) |
|||
/p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl) |
|||
/p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key) |
|||
/p:AzureDevOpsStaticShippingFeed='${{ parameters.shippingFeed }}' |
|||
/p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' |
|||
/p:AzureDevOpsStaticTransportFeed='${{ parameters.transportFeed }}' |
|||
/p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' |
|||
/p:AzureDevOpsStaticSymbolsFeed='${{ parameters.symbolsFeed }}' |
|||
/p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' |
|||
/p:LatestLinkShortUrlPrefix=dotnet/'${{ parameters.akaMSChannelName }}' |
|||
/p:AkaMSClientId=$(akams-client-id) |
|||
/p:AkaMSClientSecret=$(akams-client-secret) |
|||
${{ parameters.artifactsPublishingAdditionalParameters }} |
|||
|
|||
- template: ../../steps/publish-logs.yml |
|||
parameters: |
|||
StageLabel: '${{ parameters.stageName }}' |
|||
JobLabel: 'AssetsPublishing' |
|||
|
|||
- template: ../../steps/add-build-to-channel.yml |
|||
parameters: |
|||
ChannelId: ${{ parameters.channelId }} |
|||
@ -1,95 +0,0 @@ |
|||
parameters: |
|||
artifactsPublishingAdditionalParameters: '' |
|||
publishInstallersAndChecksums: false |
|||
|
|||
stages: |
|||
- stage: NetCore_3_Tools_Validation_Publish |
|||
dependsOn: validate |
|||
variables: |
|||
- template: ../common-variables.yml |
|||
displayName: .NET 3 Tools - Validation Publishing |
|||
jobs: |
|||
- template: ../setup-maestro-vars.yml |
|||
|
|||
- job: publish_assets |
|||
displayName: Publish Assets |
|||
dependsOn: setupMaestroVars |
|||
variables: |
|||
- group: DotNet-Blob-Feed |
|||
- group: AzureDevOps-Artifact-Feeds-Pats |
|||
- name: BARBuildId |
|||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ] |
|||
- name: IsStableBuild |
|||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ] |
|||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.NETCore_3_Tools_Validation_Channel_Id)) |
|||
pool: |
|||
vmImage: 'windows-2019' |
|||
steps: |
|||
- task: DownloadBuildArtifacts@0 |
|||
displayName: Download Package Artifacts |
|||
inputs: |
|||
buildType: current |
|||
artifactName: PackageArtifacts |
|||
|
|||
- task: DownloadBuildArtifacts@0 |
|||
displayName: Download Blob Artifacts |
|||
inputs: |
|||
buildType: current |
|||
artifactName: BlobArtifacts |
|||
|
|||
- task: DownloadBuildArtifacts@0 |
|||
displayName: Download Asset Manifests |
|||
inputs: |
|||
buildType: current |
|||
artifactName: AssetManifests |
|||
|
|||
- task: NuGetToolInstaller@1 |
|||
displayName: 'Install NuGet.exe' |
|||
|
|||
# This is necessary whenever we want to publish/restore to an AzDO private feed |
|||
- task: NuGetAuthenticate@0 |
|||
displayName: 'Authenticate to AzDO Feeds' |
|||
|
|||
- task: PowerShell@2 |
|||
displayName: Enable cross-org publishing |
|||
inputs: |
|||
filePath: eng\common\enable-cross-org-publishing.ps1 |
|||
arguments: -token $(dn-bot-dnceng-artifact-feeds-rw) |
|||
|
|||
- task: PowerShell@2 |
|||
displayName: Publish Assets |
|||
inputs: |
|||
filePath: eng\common\sdk-task.ps1 |
|||
arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet |
|||
/p:ArtifactsCategory=$(_DotNetValidationArtifactsCategory) |
|||
/p:IsStableBuild=$(IsStableBuild) |
|||
/p:IsInternalBuild=$(IsInternalBuild) |
|||
/p:RepositoryName=$(Build.Repository.Name) |
|||
/p:CommitSha=$(Build.SourceVersion) |
|||
/p:NugetPath=$(NuGetExeToolPath) |
|||
/p:AzdoTargetFeedPAT='$(dn-bot-dnceng-universal-packages-rw)' |
|||
/p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)' |
|||
/p:BARBuildId=$(BARBuildId) |
|||
/p:MaestroApiEndpoint='$(MaestroApiEndPoint)' |
|||
/p:BuildAssetRegistryToken='$(MaestroApiAccessToken)' |
|||
/p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/' |
|||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/' |
|||
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/' |
|||
/p:Configuration=Release |
|||
/p:PublishInstallersAndChecksums=${{ parameters.publishInstallersAndChecksums }} |
|||
/p:InstallersTargetStaticFeed=$(InstallersBlobFeedUrl) |
|||
/p:InstallersAzureAccountKey=$(dotnetcli-storage-key) |
|||
/p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl) |
|||
/p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key) |
|||
/p:PublishToAzureDevOpsNuGetFeeds=true |
|||
/p:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' |
|||
/p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' |
|||
/p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' |
|||
/p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' |
|||
/p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-symbols/nuget/v3/index.json' |
|||
/p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' |
|||
${{ parameters.artifactsPublishingAdditionalParameters }} |
|||
|
|||
- template: ../../steps/promote-build.yml |
|||
parameters: |
|||
ChannelId: ${{ variables.NETCore_3_Tools_Validation_Channel_Id }} |
|||
@ -1,130 +0,0 @@ |
|||
parameters: |
|||
symbolPublishingAdditionalParameters: '' |
|||
artifactsPublishingAdditionalParameters: '' |
|||
publishInstallersAndChecksums: false |
|||
|
|||
stages: |
|||
- stage: NetCore_3_Tools_Publish |
|||
dependsOn: validate |
|||
variables: |
|||
- template: ../common-variables.yml |
|||
displayName: .NET 3 Tools Publishing |
|||
jobs: |
|||
- template: ../setup-maestro-vars.yml |
|||
|
|||
- job: |
|||
displayName: Symbol Publishing |
|||
dependsOn: setupMaestroVars |
|||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.NetCore_3_Tools_Channel_Id)) |
|||
variables: |
|||
- group: DotNet-Symbol-Server-Pats |
|||
pool: |
|||
vmImage: 'windows-2019' |
|||
steps: |
|||
- task: DownloadBuildArtifacts@0 |
|||
displayName: Download Blob Artifacts |
|||
inputs: |
|||
artifactName: 'BlobArtifacts' |
|||
continueOnError: true |
|||
|
|||
- task: DownloadBuildArtifacts@0 |
|||
displayName: Download PDB Artifacts |
|||
inputs: |
|||
artifactName: 'PDBArtifacts' |
|||
continueOnError: true |
|||
|
|||
- task: PowerShell@2 |
|||
displayName: Publish |
|||
inputs: |
|||
filePath: eng\common\sdk-task.ps1 |
|||
arguments: -task PublishToSymbolServers -restore -msbuildEngine dotnet |
|||
/p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat) |
|||
/p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat) |
|||
/p:PDBArtifactsDirectory='$(Build.ArtifactStagingDirectory)/PDBArtifacts/' |
|||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/' |
|||
/p:SymbolPublishingExclusionsFile='$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt' |
|||
/p:Configuration=Release |
|||
${{ parameters.symbolPublishingAdditionalParameters }} |
|||
|
|||
- job: publish_assets |
|||
displayName: Publish Assets |
|||
dependsOn: setupMaestroVars |
|||
variables: |
|||
- group: DotNet-Blob-Feed |
|||
- group: AzureDevOps-Artifact-Feeds-Pats |
|||
- name: BARBuildId |
|||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ] |
|||
- name: IsStableBuild |
|||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ] |
|||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.NetCore_3_Tools_Channel_Id)) |
|||
pool: |
|||
vmImage: 'windows-2019' |
|||
steps: |
|||
- task: DownloadBuildArtifacts@0 |
|||
displayName: Download Package Artifacts |
|||
inputs: |
|||
buildType: current |
|||
artifactName: PackageArtifacts |
|||
|
|||
- task: DownloadBuildArtifacts@0 |
|||
displayName: Download Blob Artifacts |
|||
inputs: |
|||
buildType: current |
|||
artifactName: BlobArtifacts |
|||
|
|||
- task: DownloadBuildArtifacts@0 |
|||
displayName: Download Asset Manifests |
|||
inputs: |
|||
buildType: current |
|||
artifactName: AssetManifests |
|||
|
|||
- task: NuGetToolInstaller@1 |
|||
displayName: 'Install NuGet.exe' |
|||
|
|||
# This is necessary whenever we want to publish/restore to an AzDO private feed |
|||
- task: NuGetAuthenticate@0 |
|||
displayName: 'Authenticate to AzDO Feeds' |
|||
|
|||
- task: PowerShell@2 |
|||
displayName: Enable cross-org publishing |
|||
inputs: |
|||
filePath: eng\common\enable-cross-org-publishing.ps1 |
|||
arguments: -token $(dn-bot-dnceng-artifact-feeds-rw) |
|||
|
|||
- task: PowerShell@2 |
|||
displayName: Publish Assets |
|||
inputs: |
|||
filePath: eng\common\sdk-task.ps1 |
|||
arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet |
|||
/p:ArtifactsCategory=$(_DotNetArtifactsCategory) |
|||
/p:IsStableBuild=$(IsStableBuild) |
|||
/p:IsInternalBuild=$(IsInternalBuild) |
|||
/p:RepositoryName=$(Build.Repository.Name) |
|||
/p:CommitSha=$(Build.SourceVersion) |
|||
/p:NugetPath=$(NuGetExeToolPath) |
|||
/p:AzdoTargetFeedPAT='$(dn-bot-dnceng-universal-packages-rw)' |
|||
/p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)' |
|||
/p:BARBuildId=$(BARBuildId) |
|||
/p:MaestroApiEndpoint='$(MaestroApiEndPoint)' |
|||
/p:BuildAssetRegistryToken='$(MaestroApiAccessToken)' |
|||
/p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/' |
|||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/' |
|||
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/' |
|||
/p:Configuration=Release |
|||
/p:PublishInstallersAndChecksums=${{ parameters.publishInstallersAndChecksums }} |
|||
/p:InstallersTargetStaticFeed=$(InstallersBlobFeedUrl) |
|||
/p:InstallersAzureAccountKey=$(dotnetcli-storage-key) |
|||
/p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl) |
|||
/p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key) |
|||
/p:PublishToAzureDevOpsNuGetFeeds=true |
|||
/p:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' |
|||
/p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' |
|||
/p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' |
|||
/p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' |
|||
/p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-symbols/nuget/v3/index.json' |
|||
/p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' |
|||
${{ parameters.artifactsPublishingAdditionalParameters }} |
|||
|
|||
- template: ../../steps/promote-build.yml |
|||
parameters: |
|||
ChannelId: ${{ variables.NetCore_3_Tools_Channel_Id }} |
|||
@ -1,130 +0,0 @@ |
|||
parameters: |
|||
symbolPublishingAdditionalParameters: '' |
|||
artifactsPublishingAdditionalParameters: '' |
|||
publishInstallersAndChecksums: false |
|||
|
|||
stages: |
|||
- stage: NetCore_Dev31_Publish |
|||
dependsOn: validate |
|||
variables: |
|||
- template: ../common-variables.yml |
|||
displayName: .NET Core 3.1 Dev Publishing |
|||
jobs: |
|||
- template: ../setup-maestro-vars.yml |
|||
|
|||
- job: |
|||
displayName: Symbol Publishing |
|||
dependsOn: setupMaestroVars |
|||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.PublicDevRelease_31_Channel_Id)) |
|||
variables: |
|||
- group: DotNet-Symbol-Server-Pats |
|||
pool: |
|||
vmImage: 'windows-2019' |
|||
steps: |
|||
- task: DownloadBuildArtifacts@0 |
|||
displayName: Download Blob Artifacts |
|||
inputs: |
|||
artifactName: 'BlobArtifacts' |
|||
continueOnError: true |
|||
|
|||
- task: DownloadBuildArtifacts@0 |
|||
displayName: Download PDB Artifacts |
|||
inputs: |
|||
artifactName: 'PDBArtifacts' |
|||
continueOnError: true |
|||
|
|||
- task: PowerShell@2 |
|||
displayName: Publish |
|||
inputs: |
|||
filePath: eng\common\sdk-task.ps1 |
|||
arguments: -task PublishToSymbolServers -restore -msbuildEngine dotnet |
|||
/p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat) |
|||
/p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat) |
|||
/p:PDBArtifactsDirectory='$(Build.ArtifactStagingDirectory)/PDBArtifacts/' |
|||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/' |
|||
/p:SymbolPublishingExclusionsFile='$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt' |
|||
/p:Configuration=Release |
|||
${{ parameters.symbolPublishingAdditionalParameters }} |
|||
|
|||
- job: publish_assets |
|||
displayName: Publish Assets |
|||
dependsOn: setupMaestroVars |
|||
variables: |
|||
- group: DotNet-Blob-Feed |
|||
- group: AzureDevOps-Artifact-Feeds-Pats |
|||
- name: BARBuildId |
|||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ] |
|||
- name: IsStableBuild |
|||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ] |
|||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.PublicDevRelease_31_Channel_Id)) |
|||
pool: |
|||
vmImage: 'windows-2019' |
|||
steps: |
|||
- task: DownloadBuildArtifacts@0 |
|||
displayName: Download Package Artifacts |
|||
inputs: |
|||
buildType: current |
|||
artifactName: PackageArtifacts |
|||
|
|||
- task: DownloadBuildArtifacts@0 |
|||
displayName: Download Blob Artifacts |
|||
inputs: |
|||
buildType: current |
|||
artifactName: BlobArtifacts |
|||
|
|||
- task: DownloadBuildArtifacts@0 |
|||
displayName: Download Asset Manifests |
|||
inputs: |
|||
buildType: current |
|||
artifactName: AssetManifests |
|||
|
|||
- task: NuGetToolInstaller@1 |
|||
displayName: 'Install NuGet.exe' |
|||
|
|||
# This is necessary whenever we want to publish/restore to an AzDO private feed |
|||
- task: NuGetAuthenticate@0 |
|||
displayName: 'Authenticate to AzDO Feeds' |
|||
|
|||
- task: PowerShell@2 |
|||
displayName: Enable cross-org publishing |
|||
inputs: |
|||
filePath: eng\common\enable-cross-org-publishing.ps1 |
|||
arguments: -token $(dn-bot-dnceng-artifact-feeds-rw) |
|||
|
|||
- task: PowerShell@2 |
|||
displayName: Publish Assets |
|||
inputs: |
|||
filePath: eng\common\sdk-task.ps1 |
|||
arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet |
|||
/p:ArtifactsCategory=$(_DotNetArtifactsCategory) |
|||
/p:IsStableBuild=$(IsStableBuild) |
|||
/p:IsInternalBuild=$(IsInternalBuild) |
|||
/p:RepositoryName=$(Build.Repository.Name) |
|||
/p:CommitSha=$(Build.SourceVersion) |
|||
/p:NugetPath=$(NuGetExeToolPath) |
|||
/p:AzdoTargetFeedPAT='$(dn-bot-dnceng-universal-packages-rw)' |
|||
/p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)' |
|||
/p:BARBuildId=$(BARBuildId) |
|||
/p:MaestroApiEndpoint='$(MaestroApiEndPoint)' |
|||
/p:BuildAssetRegistryToken='$(MaestroApiAccessToken)' |
|||
/p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/' |
|||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/' |
|||
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/' |
|||
/p:Configuration=Release |
|||
/p:PublishInstallersAndChecksums=${{ parameters.publishInstallersAndChecksums }} |
|||
/p:InstallersTargetStaticFeed=$(InstallersBlobFeedUrl) |
|||
/p:InstallersAzureAccountKey=$(dotnetcli-storage-key) |
|||
/p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl) |
|||
/p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key) |
|||
/p:PublishToAzureDevOpsNuGetFeeds=true |
|||
/p:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1/nuget/v3/index.json' |
|||
/p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' |
|||
/p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json' |
|||
/p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' |
|||
/p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-symbols/nuget/v3/index.json' |
|||
/p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' |
|||
${{ parameters.artifactsPublishingAdditionalParameters }} |
|||
|
|||
- template: ../../steps/promote-build.yml |
|||
parameters: |
|||
ChannelId: ${{ variables.PublicDevRelease_31_Channel_Id }} |
|||
@ -1,130 +0,0 @@ |
|||
parameters: |
|||
symbolPublishingAdditionalParameters: '' |
|||
artifactsPublishingAdditionalParameters: '' |
|||
publishInstallersAndChecksums: false |
|||
|
|||
stages: |
|||
- stage: NetCore_Dev5_Publish |
|||
dependsOn: validate |
|||
variables: |
|||
- template: ../common-variables.yml |
|||
displayName: .NET Core 5 Dev Publishing |
|||
jobs: |
|||
- template: ../setup-maestro-vars.yml |
|||
|
|||
- job: |
|||
displayName: Symbol Publishing |
|||
dependsOn: setupMaestroVars |
|||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.NetCore_5_Dev_Channel_Id)) |
|||
variables: |
|||
- group: DotNet-Symbol-Server-Pats |
|||
pool: |
|||
vmImage: 'windows-2019' |
|||
steps: |
|||
- task: DownloadBuildArtifacts@0 |
|||
displayName: Download Blob Artifacts |
|||
inputs: |
|||
artifactName: 'BlobArtifacts' |
|||
continueOnError: true |
|||
|
|||
- task: DownloadBuildArtifacts@0 |
|||
displayName: Download PDB Artifacts |
|||
inputs: |
|||
artifactName: 'PDBArtifacts' |
|||
continueOnError: true |
|||
|
|||
- task: PowerShell@2 |
|||
displayName: Publish |
|||
inputs: |
|||
filePath: eng\common\sdk-task.ps1 |
|||
arguments: -task PublishToSymbolServers -restore -msbuildEngine dotnet |
|||
/p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat) |
|||
/p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat) |
|||
/p:PDBArtifactsDirectory='$(Build.ArtifactStagingDirectory)/PDBArtifacts/' |
|||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/' |
|||
/p:SymbolPublishingExclusionsFile='$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt' |
|||
/p:Configuration=Release |
|||
${{ parameters.symbolPublishingAdditionalParameters }} |
|||
|
|||
- job: publish_assets |
|||
displayName: Publish Assets |
|||
dependsOn: setupMaestroVars |
|||
variables: |
|||
- group: DotNet-Blob-Feed |
|||
- group: AzureDevOps-Artifact-Feeds-Pats |
|||
- name: BARBuildId |
|||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ] |
|||
- name: IsStableBuild |
|||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ] |
|||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.NetCore_5_Dev_Channel_Id)) |
|||
pool: |
|||
vmImage: 'windows-2019' |
|||
steps: |
|||
- task: DownloadBuildArtifacts@0 |
|||
displayName: Download Package Artifacts |
|||
inputs: |
|||
buildType: current |
|||
artifactName: PackageArtifacts |
|||
|
|||
- task: DownloadBuildArtifacts@0 |
|||
displayName: Download Blob Artifacts |
|||
inputs: |
|||
buildType: current |
|||
artifactName: BlobArtifacts |
|||
|
|||
- task: DownloadBuildArtifacts@0 |
|||
displayName: Download Asset Manifests |
|||
inputs: |
|||
buildType: current |
|||
artifactName: AssetManifests |
|||
|
|||
- task: NuGetToolInstaller@1 |
|||
displayName: 'Install NuGet.exe' |
|||
|
|||
# This is necessary whenever we want to publish/restore to an AzDO private feed |
|||
- task: NuGetAuthenticate@0 |
|||
displayName: 'Authenticate to AzDO Feeds' |
|||
|
|||
- task: PowerShell@2 |
|||
displayName: Enable cross-org publishing |
|||
inputs: |
|||
filePath: eng\common\enable-cross-org-publishing.ps1 |
|||
arguments: -token $(dn-bot-dnceng-artifact-feeds-rw) |
|||
|
|||
- task: PowerShell@2 |
|||
displayName: Publish Assets |
|||
inputs: |
|||
filePath: eng\common\sdk-task.ps1 |
|||
arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet |
|||
/p:ArtifactsCategory=$(_DotNetArtifactsCategory) |
|||
/p:IsStableBuild=$(IsStableBuild) |
|||
/p:IsInternalBuild=$(IsInternalBuild) |
|||
/p:RepositoryName=$(Build.Repository.Name) |
|||
/p:CommitSha=$(Build.SourceVersion) |
|||
/p:NugetPath=$(NuGetExeToolPath) |
|||
/p:AzdoTargetFeedPAT='$(dn-bot-dnceng-universal-packages-rw)' |
|||
/p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)' |
|||
/p:BARBuildId=$(BARBuildId) |
|||
/p:MaestroApiEndpoint='$(MaestroApiEndPoint)' |
|||
/p:BuildAssetRegistryToken='$(MaestroApiAccessToken)' |
|||
/p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/' |
|||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/' |
|||
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/' |
|||
/p:Configuration=Release |
|||
/p:PublishInstallersAndChecksums=${{ parameters.publishInstallersAndChecksums }} |
|||
/p:InstallersTargetStaticFeed=$(InstallersBlobFeedUrl) |
|||
/p:InstallersAzureAccountKey=$(dotnetcli-storage-key) |
|||
/p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl) |
|||
/p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key) |
|||
/p:PublishToAzureDevOpsNuGetFeeds=true |
|||
/p:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json' |
|||
/p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' |
|||
/p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-transport/nuget/v3/index.json' |
|||
/p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' |
|||
/p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-symbols/nuget/v3/index.json' |
|||
/p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' |
|||
${{ parameters.artifactsPublishingAdditionalParameters }} |
|||
|
|||
- template: ../../steps/promote-build.yml |
|||
parameters: |
|||
ChannelId: ${{ variables.NetCore_5_Dev_Channel_Id }} |
|||
@ -1,130 +0,0 @@ |
|||
parameters: |
|||
symbolPublishingAdditionalParameters: '' |
|||
artifactsPublishingAdditionalParameters: '' |
|||
publishInstallersAndChecksums: false |
|||
|
|||
stages: |
|||
- stage: NetCore_Release30_Publish |
|||
dependsOn: validate |
|||
variables: |
|||
- template: ../common-variables.yml |
|||
displayName: .NET Core 3.0 Release Publishing |
|||
jobs: |
|||
- template: ../setup-maestro-vars.yml |
|||
|
|||
- job: |
|||
displayName: Symbol Publishing |
|||
dependsOn: setupMaestroVars |
|||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.PublicRelease_30_Channel_Id)) |
|||
variables: |
|||
- group: DotNet-Symbol-Server-Pats |
|||
pool: |
|||
vmImage: 'windows-2019' |
|||
steps: |
|||
- task: DownloadBuildArtifacts@0 |
|||
displayName: Download Blob Artifacts |
|||
inputs: |
|||
artifactName: 'BlobArtifacts' |
|||
continueOnError: true |
|||
|
|||
- task: DownloadBuildArtifacts@0 |
|||
displayName: Download PDB Artifacts |
|||
inputs: |
|||
artifactName: 'PDBArtifacts' |
|||
continueOnError: true |
|||
|
|||
- task: PowerShell@2 |
|||
displayName: Publish |
|||
inputs: |
|||
filePath: eng\common\sdk-task.ps1 |
|||
arguments: -task PublishToSymbolServers -restore -msbuildEngine dotnet |
|||
/p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat) |
|||
/p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat) |
|||
/p:PDBArtifactsDirectory='$(Build.ArtifactStagingDirectory)/PDBArtifacts/' |
|||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/' |
|||
/p:SymbolPublishingExclusionsFile='$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt' |
|||
/p:Configuration=Release |
|||
${{ parameters.symbolPublishingAdditionalParameters }} |
|||
|
|||
- job: publish_assets |
|||
displayName: Publish Assets |
|||
dependsOn: setupMaestroVars |
|||
variables: |
|||
- group: DotNet-Blob-Feed |
|||
- group: AzureDevOps-Artifact-Feeds-Pats |
|||
- name: BARBuildId |
|||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ] |
|||
- name: IsStableBuild |
|||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ] |
|||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.PublicRelease_30_Channel_Id)) |
|||
pool: |
|||
vmImage: 'windows-2019' |
|||
steps: |
|||
- task: DownloadBuildArtifacts@0 |
|||
displayName: Download Package Artifacts |
|||
inputs: |
|||
buildType: current |
|||
artifactName: PackageArtifacts |
|||
|
|||
- task: DownloadBuildArtifacts@0 |
|||
displayName: Download Blob Artifacts |
|||
inputs: |
|||
buildType: current |
|||
artifactName: BlobArtifacts |
|||
|
|||
- task: DownloadBuildArtifacts@0 |
|||
displayName: Download Asset Manifests |
|||
inputs: |
|||
buildType: current |
|||
artifactName: AssetManifests |
|||
|
|||
- task: NuGetToolInstaller@1 |
|||
displayName: 'Install NuGet.exe' |
|||
|
|||
# This is necessary whenever we want to publish/restore to an AzDO private feed |
|||
- task: NuGetAuthenticate@0 |
|||
displayName: 'Authenticate to AzDO Feeds' |
|||
|
|||
- task: PowerShell@2 |
|||
displayName: Enable cross-org publishing |
|||
inputs: |
|||
filePath: eng\common\enable-cross-org-publishing.ps1 |
|||
arguments: -token $(dn-bot-dnceng-artifact-feeds-rw) |
|||
|
|||
- task: PowerShell@2 |
|||
displayName: Publish Assets |
|||
inputs: |
|||
filePath: eng\common\sdk-task.ps1 |
|||
arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet |
|||
/p:ArtifactsCategory=$(_DotNetArtifactsCategory) |
|||
/p:IsStableBuild=$(IsStableBuild) |
|||
/p:IsInternalBuild=$(IsInternalBuild) |
|||
/p:RepositoryName=$(Build.Repository.Name) |
|||
/p:CommitSha=$(Build.SourceVersion) |
|||
/p:NugetPath=$(NuGetExeToolPath) |
|||
/p:AzdoTargetFeedPAT='$(dn-bot-dnceng-universal-packages-rw)' |
|||
/p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)' |
|||
/p:BARBuildId=$(BARBuildId) |
|||
/p:MaestroApiEndpoint='$(MaestroApiEndPoint)' |
|||
/p:BuildAssetRegistryToken='$(MaestroApiAccessToken)' |
|||
/p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/' |
|||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/' |
|||
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/' |
|||
/p:Configuration=Release |
|||
/p:PublishInstallersAndChecksums=${{ parameters.publishInstallersAndChecksums }} |
|||
/p:InstallersTargetStaticFeed=$(InstallersBlobFeedUrl) |
|||
/p:InstallersAzureAccountKey=$(dotnetcli-storage-key) |
|||
/p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl) |
|||
/p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key) |
|||
/p:PublishToAzureDevOpsNuGetFeeds=true |
|||
/p:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3/nuget/v3/index.json' |
|||
/p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' |
|||
/p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3-transport/nuget/v3/index.json' |
|||
/p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' |
|||
/p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3-symbols/nuget/v3/index.json' |
|||
/p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' |
|||
${{ parameters.artifactsPublishingAdditionalParameters }} |
|||
|
|||
- template: ../../steps/promote-build.yml |
|||
parameters: |
|||
ChannelId: ${{ variables.PublicRelease_30_Channel_Id }} |
|||
@ -1,130 +0,0 @@ |
|||
parameters: |
|||
symbolPublishingAdditionalParameters: '' |
|||
artifactsPublishingAdditionalParameters: '' |
|||
publishInstallersAndChecksums: false |
|||
|
|||
stages: |
|||
- stage: NetCore_Release31_Publish |
|||
dependsOn: validate |
|||
variables: |
|||
- template: ../common-variables.yml |
|||
displayName: .NET Core 3.1 Release Publishing |
|||
jobs: |
|||
- template: ../setup-maestro-vars.yml |
|||
|
|||
- job: |
|||
displayName: Symbol Publishing |
|||
dependsOn: setupMaestroVars |
|||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.PublicRelease_31_Channel_Id)) |
|||
variables: |
|||
- group: DotNet-Symbol-Server-Pats |
|||
pool: |
|||
vmImage: 'windows-2019' |
|||
steps: |
|||
- task: DownloadBuildArtifacts@0 |
|||
displayName: Download Blob Artifacts |
|||
inputs: |
|||
artifactName: 'BlobArtifacts' |
|||
continueOnError: true |
|||
|
|||
- task: DownloadBuildArtifacts@0 |
|||
displayName: Download PDB Artifacts |
|||
inputs: |
|||
artifactName: 'PDBArtifacts' |
|||
continueOnError: true |
|||
|
|||
- task: PowerShell@2 |
|||
displayName: Publish |
|||
inputs: |
|||
filePath: eng\common\sdk-task.ps1 |
|||
arguments: -task PublishToSymbolServers -restore -msbuildEngine dotnet |
|||
/p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat) |
|||
/p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat) |
|||
/p:PDBArtifactsDirectory='$(Build.ArtifactStagingDirectory)/PDBArtifacts/' |
|||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/' |
|||
/p:SymbolPublishingExclusionsFile='$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt' |
|||
/p:Configuration=Release |
|||
${{ parameters.symbolPublishingAdditionalParameters }} |
|||
|
|||
- job: publish_assets |
|||
displayName: Publish Assets |
|||
dependsOn: setupMaestroVars |
|||
variables: |
|||
- group: DotNet-Blob-Feed |
|||
- group: AzureDevOps-Artifact-Feeds-Pats |
|||
- name: BARBuildId |
|||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ] |
|||
- name: IsStableBuild |
|||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ] |
|||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.PublicRelease_31_Channel_Id)) |
|||
pool: |
|||
vmImage: 'windows-2019' |
|||
steps: |
|||
- task: DownloadBuildArtifacts@0 |
|||
displayName: Download Package Artifacts |
|||
inputs: |
|||
buildType: current |
|||
artifactName: PackageArtifacts |
|||
|
|||
- task: DownloadBuildArtifacts@0 |
|||
displayName: Download Blob Artifacts |
|||
inputs: |
|||
buildType: current |
|||
artifactName: BlobArtifacts |
|||
|
|||
- task: DownloadBuildArtifacts@0 |
|||
displayName: Download Asset Manifests |
|||
inputs: |
|||
buildType: current |
|||
artifactName: AssetManifests |
|||
|
|||
- task: NuGetToolInstaller@1 |
|||
displayName: 'Install NuGet.exe' |
|||
|
|||
# This is necessary whenever we want to publish/restore to an AzDO private feed |
|||
- task: NuGetAuthenticate@0 |
|||
displayName: 'Authenticate to AzDO Feeds' |
|||
|
|||
- task: PowerShell@2 |
|||
displayName: Enable cross-org publishing |
|||
inputs: |
|||
filePath: eng\common\enable-cross-org-publishing.ps1 |
|||
arguments: -token $(dn-bot-dnceng-artifact-feeds-rw) |
|||
|
|||
- task: PowerShell@2 |
|||
displayName: Publish Assets |
|||
inputs: |
|||
filePath: eng\common\sdk-task.ps1 |
|||
arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet |
|||
/p:ArtifactsCategory=$(_DotNetArtifactsCategory) |
|||
/p:IsStableBuild=$(IsStableBuild) |
|||
/p:IsInternalBuild=$(IsInternalBuild) |
|||
/p:RepositoryName=$(Build.Repository.Name) |
|||
/p:CommitSha=$(Build.SourceVersion) |
|||
/p:NugetPath=$(NuGetExeToolPath) |
|||
/p:AzdoTargetFeedPAT='$(dn-bot-dnceng-universal-packages-rw)' |
|||
/p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)' |
|||
/p:BARBuildId=$(BARBuildId) |
|||
/p:MaestroApiEndpoint='$(MaestroApiEndPoint)' |
|||
/p:BuildAssetRegistryToken='$(MaestroApiAccessToken)' |
|||
/p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/' |
|||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/' |
|||
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/' |
|||
/p:Configuration=Release |
|||
/p:PublishInstallersAndChecksums=${{ parameters.publishInstallersAndChecksums }} |
|||
/p:InstallersTargetStaticFeed=$(InstallersBlobFeedUrl) |
|||
/p:InstallersAzureAccountKey=$(dotnetcli-storage-key) |
|||
/p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl) |
|||
/p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key) |
|||
/p:PublishToAzureDevOpsNuGetFeeds=true |
|||
/p:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1/nuget/v3/index.json' |
|||
/p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' |
|||
/p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json' |
|||
/p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' |
|||
/p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-symbols/nuget/v3/index.json' |
|||
/p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' |
|||
${{ parameters.artifactsPublishingAdditionalParameters }} |
|||
|
|||
- template: ../../steps/promote-build.yml |
|||
parameters: |
|||
ChannelId: ${{ variables.PublicRelease_31_Channel_Id }} |
|||
@ -1,130 +0,0 @@ |
|||
parameters: |
|||
symbolPublishingAdditionalParameters: '' |
|||
artifactsPublishingAdditionalParameters: '' |
|||
publishInstallersAndChecksums: false |
|||
|
|||
stages: |
|||
- stage: NetCore_Tools_Latest_Publish |
|||
dependsOn: validate |
|||
variables: |
|||
- template: ../common-variables.yml |
|||
displayName: .NET Tools - Latest Publishing |
|||
jobs: |
|||
- template: ../setup-maestro-vars.yml |
|||
|
|||
- job: |
|||
displayName: Symbol Publishing |
|||
dependsOn: setupMaestroVars |
|||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.NetCore_Tools_Latest_Channel_Id)) |
|||
variables: |
|||
- group: DotNet-Symbol-Server-Pats |
|||
pool: |
|||
vmImage: 'windows-2019' |
|||
steps: |
|||
- task: DownloadBuildArtifacts@0 |
|||
displayName: Download Blob Artifacts |
|||
inputs: |
|||
artifactName: 'BlobArtifacts' |
|||
continueOnError: true |
|||
|
|||
- task: DownloadBuildArtifacts@0 |
|||
displayName: Download PDB Artifacts |
|||
inputs: |
|||
artifactName: 'PDBArtifacts' |
|||
continueOnError: true |
|||
|
|||
- task: PowerShell@2 |
|||
displayName: Publish |
|||
inputs: |
|||
filePath: eng\common\sdk-task.ps1 |
|||
arguments: -task PublishToSymbolServers -restore -msbuildEngine dotnet |
|||
/p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat) |
|||
/p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat) |
|||
/p:PDBArtifactsDirectory='$(Build.ArtifactStagingDirectory)/PDBArtifacts/' |
|||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/' |
|||
/p:SymbolPublishingExclusionsFile='$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt' |
|||
/p:Configuration=Release |
|||
${{ parameters.symbolPublishingAdditionalParameters }} |
|||
|
|||
- job: publish_assets |
|||
displayName: Publish Assets |
|||
dependsOn: setupMaestroVars |
|||
variables: |
|||
- group: DotNet-Blob-Feed |
|||
- group: AzureDevOps-Artifact-Feeds-Pats |
|||
- name: BARBuildId |
|||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ] |
|||
- name: IsStableBuild |
|||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ] |
|||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.NetCore_Tools_Latest_Channel_Id)) |
|||
pool: |
|||
vmImage: 'windows-2019' |
|||
steps: |
|||
- task: DownloadBuildArtifacts@0 |
|||
displayName: Download Package Artifacts |
|||
inputs: |
|||
buildType: current |
|||
artifactName: PackageArtifacts |
|||
|
|||
- task: DownloadBuildArtifacts@0 |
|||
displayName: Download Blob Artifacts |
|||
inputs: |
|||
buildType: current |
|||
artifactName: BlobArtifacts |
|||
|
|||
- task: DownloadBuildArtifacts@0 |
|||
displayName: Download Asset Manifests |
|||
inputs: |
|||
buildType: current |
|||
artifactName: AssetManifests |
|||
|
|||
- task: NuGetToolInstaller@1 |
|||
displayName: 'Install NuGet.exe' |
|||
|
|||
# This is necessary whenever we want to publish/restore to an AzDO private feed |
|||
- task: NuGetAuthenticate@0 |
|||
displayName: 'Authenticate to AzDO Feeds' |
|||
|
|||
- task: PowerShell@2 |
|||
displayName: Enable cross-org publishing |
|||
inputs: |
|||
filePath: eng\common\enable-cross-org-publishing.ps1 |
|||
arguments: -token $(dn-bot-dnceng-artifact-feeds-rw) |
|||
|
|||
- task: PowerShell@2 |
|||
displayName: Publish Assets |
|||
inputs: |
|||
filePath: eng\common\sdk-task.ps1 |
|||
arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet |
|||
/p:ArtifactsCategory=$(_DotNetArtifactsCategory) |
|||
/p:IsStableBuild=$(IsStableBuild) |
|||
/p:IsInternalBuild=$(IsInternalBuild) |
|||
/p:RepositoryName=$(Build.Repository.Name) |
|||
/p:CommitSha=$(Build.SourceVersion) |
|||
/p:NugetPath=$(NuGetExeToolPath) |
|||
/p:AzdoTargetFeedPAT='$(dn-bot-dnceng-universal-packages-rw)' |
|||
/p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)' |
|||
/p:BARBuildId=$(BARBuildId) |
|||
/p:MaestroApiEndpoint='$(MaestroApiEndPoint)' |
|||
/p:BuildAssetRegistryToken='$(MaestroApiAccessToken)' |
|||
/p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/' |
|||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/' |
|||
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/' |
|||
/p:Configuration=Release |
|||
/p:PublishInstallersAndChecksums=${{ parameters.publishInstallersAndChecksums }} |
|||
/p:InstallersTargetStaticFeed=$(InstallersBlobFeedUrl) |
|||
/p:InstallersAzureAccountKey=$(dotnetcli-storage-key) |
|||
/p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl) |
|||
/p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key) |
|||
/p:PublishToAzureDevOpsNuGetFeeds=true |
|||
/p:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' |
|||
/p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' |
|||
/p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' |
|||
/p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' |
|||
/p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-symbols/nuget/v3/index.json' |
|||
/p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' |
|||
${{ parameters.artifactsPublishingAdditionalParameters }} |
|||
|
|||
- template: ../../steps/promote-build.yml |
|||
parameters: |
|||
ChannelId: ${{ variables.NetCore_Tools_Latest_Channel_Id }} |
|||
@ -1,95 +0,0 @@ |
|||
parameters: |
|||
artifactsPublishingAdditionalParameters: '' |
|||
publishInstallersAndChecksums: false |
|||
|
|||
stages: |
|||
- stage: PVR_Publish |
|||
dependsOn: validate |
|||
variables: |
|||
- template: ../common-variables.yml |
|||
displayName: .NET Tools - Validation Publishing |
|||
jobs: |
|||
- template: ../setup-maestro-vars.yml |
|||
|
|||
- job: publish_assets |
|||
displayName: Publish Assets |
|||
dependsOn: setupMaestroVars |
|||
variables: |
|||
- group: DotNet-Blob-Feed |
|||
- group: AzureDevOps-Artifact-Feeds-Pats |
|||
- name: BARBuildId |
|||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ] |
|||
- name: IsStableBuild |
|||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ] |
|||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.NetCore_Tools_Validation_Channel_Id)) |
|||
pool: |
|||
vmImage: 'windows-2019' |
|||
steps: |
|||
- task: DownloadBuildArtifacts@0 |
|||
displayName: Download Package Artifacts |
|||
inputs: |
|||
buildType: current |
|||
artifactName: PackageArtifacts |
|||
|
|||
- task: DownloadBuildArtifacts@0 |
|||
displayName: Download Blob Artifacts |
|||
inputs: |
|||
buildType: current |
|||
artifactName: BlobArtifacts |
|||
|
|||
- task: DownloadBuildArtifacts@0 |
|||
displayName: Download Asset Manifests |
|||
inputs: |
|||
buildType: current |
|||
artifactName: AssetManifests |
|||
|
|||
- task: NuGetToolInstaller@1 |
|||
displayName: 'Install NuGet.exe' |
|||
|
|||
# This is necessary whenever we want to publish/restore to an AzDO private feed |
|||
- task: NuGetAuthenticate@0 |
|||
displayName: 'Authenticate to AzDO Feeds' |
|||
|
|||
- task: PowerShell@2 |
|||
displayName: Enable cross-org publishing |
|||
inputs: |
|||
filePath: eng\common\enable-cross-org-publishing.ps1 |
|||
arguments: -token $(dn-bot-dnceng-artifact-feeds-rw) |
|||
|
|||
- task: PowerShell@2 |
|||
displayName: Publish Assets |
|||
inputs: |
|||
filePath: eng\common\sdk-task.ps1 |
|||
arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet |
|||
/p:ArtifactsCategory=$(_DotNetValidationArtifactsCategory) |
|||
/p:IsStableBuild=$(IsStableBuild) |
|||
/p:IsInternalBuild=$(IsInternalBuild) |
|||
/p:RepositoryName=$(Build.Repository.Name) |
|||
/p:CommitSha=$(Build.SourceVersion) |
|||
/p:NugetPath=$(NuGetExeToolPath) |
|||
/p:AzdoTargetFeedPAT='$(dn-bot-dnceng-universal-packages-rw)' |
|||
/p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)' |
|||
/p:BARBuildId=$(BARBuildId) |
|||
/p:MaestroApiEndpoint='$(MaestroApiEndPoint)' |
|||
/p:BuildAssetRegistryToken='$(MaestroApiAccessToken)' |
|||
/p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/' |
|||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/' |
|||
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/' |
|||
/p:Configuration=Release |
|||
/p:PublishInstallersAndChecksums=${{ parameters.publishInstallersAndChecksums }} |
|||
/p:InstallersTargetStaticFeed=$(InstallersBlobFeedUrl) |
|||
/p:InstallersAzureAccountKey=$(dotnetcli-storage-key) |
|||
/p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl) |
|||
/p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key) |
|||
/p:PublishToAzureDevOpsNuGetFeeds=true |
|||
/p:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' |
|||
/p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' |
|||
/p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' |
|||
/p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' |
|||
/p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-symbols/nuget/v3/index.json' |
|||
/p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' |
|||
${{ parameters.artifactsPublishingAdditionalParameters }} |
|||
|
|||
- template: ../../steps/promote-build.yml |
|||
parameters: |
|||
ChannelId: ${{ variables.NetCore_Tools_Validation_Channel_Id }} |
|||
@ -1,23 +0,0 @@ |
|||
parameters: |
|||
ChannelId: 0 |
|||
|
|||
jobs: |
|||
- job: gatherDrop |
|||
displayName: Gather Drop |
|||
dependsOn: setupMaestroVars |
|||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.ChannelId }})) |
|||
variables: |
|||
- name: BARBuildId |
|||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ] |
|||
pool: |
|||
vmImage: 'windows-2019' |
|||
steps: |
|||
- task: PowerShell@2 |
|||
displayName: Darc gather-drop |
|||
inputs: |
|||
filePath: $(Build.SourcesDirectory)/eng/common/post-build/darc-gather-drop.ps1 |
|||
arguments: -BarBuildId $(BARBuildId) |
|||
-DropLocation $(Agent.BuildDirectory)/Temp/Drop/ |
|||
-MaestroApiAccessToken $(MaestroApiAccessToken) |
|||
-MaestroApiEndPoint $(MaestroApiEndPoint) |
|||
-MaestroApiVersion $(MaestroApiVersion) |
|||
@ -1,25 +0,0 @@ |
|||
parameters: |
|||
ChannelId: 0 |
|||
|
|||
jobs: |
|||
- job: |
|||
displayName: Promote Build |
|||
dependsOn: setupMaestroVars |
|||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.ChannelId }})) |
|||
variables: |
|||
- name: BARBuildId |
|||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ] |
|||
- name: ChannelId |
|||
value: ${{ parameters.ChannelId }} |
|||
pool: |
|||
vmImage: 'windows-2019' |
|||
steps: |
|||
- task: PowerShell@2 |
|||
displayName: Add Build to Channel |
|||
inputs: |
|||
filePath: $(Build.SourcesDirectory)/eng/common/post-build/promote-build.ps1 |
|||
arguments: -BuildId $(BARBuildId) |
|||
-ChannelId $(ChannelId) |
|||
-MaestroApiAccessToken $(MaestroApiAccessToken) |
|||
-MaestroApiEndPoint $(MaestroApiEndPoint) |
|||
-MaestroApiVersion $(MaestroApiVersion) |
|||
@ -0,0 +1,23 @@ |
|||
parameters: |
|||
StageLabel: '' |
|||
JobLabel: '' |
|||
|
|||
steps: |
|||
- task: Powershell@2 |
|||
displayName: Prepare Binlogs to Upload |
|||
inputs: |
|||
targetType: inline |
|||
script: | |
|||
New-Item -ItemType Directory $(Build.SourcesDirectory)/PostBuildLogs/${{parameters.StageLabel}}/${{parameters.JobLabel}}/ |
|||
Move-Item -Path $(Build.SourcesDirectory)/artifacts/log/Debug/* $(Build.SourcesDirectory)/PostBuildLogs/${{parameters.StageLabel}}/${{parameters.JobLabel}}/ |
|||
continueOnError: true |
|||
condition: always() |
|||
|
|||
- task: PublishBuildArtifacts@1 |
|||
displayName: Publish Logs |
|||
inputs: |
|||
PathtoPublish: '$(Build.SourcesDirectory)/PostBuildLogs' |
|||
PublishLocation: Container |
|||
ArtifactName: PostBuildLogs |
|||
continueOnError: true |
|||
condition: always() |
|||
Loading…
Reference in new issue