1a828392f7
* Update dependencies from https://github.com/dotnet/arcade build 20220121.6 Microsoft.DotNet.CMake.Sdk , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Arcade.Sdk From Version 7.0.0-beta.22068.3 -> To Version 7.0.0-beta.22071.6 Dependency coherency updates Microsoft.DotNet.XliffTasks From Version 1.0.0-beta.22065.1 -> To Version 1.0.0-beta.22069.1 (parent: Microsoft.DotNet.Arcade.Sdk * Update dependencies from https://github.com/dotnet/arcade build 20220124.13 Microsoft.DotNet.CMake.Sdk , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Arcade.Sdk From Version 7.0.0-beta.22068.3 -> To Version 7.0.0-beta.22074.13 Dependency coherency updates Microsoft.SourceLink.GitHub,Microsoft.DotNet.XliffTasks From Version 1.2.0-beta-22056-02 -> To Version 1.2.0-beta-22071-02 (parent: Microsoft.DotNet.Arcade.Sdk Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
70 lines
2.8 KiB
YAML
70 lines
2.8 KiB
YAML
parameters:
|
|
BARBuildId: ''
|
|
PromoteToChannelIds: ''
|
|
|
|
steps:
|
|
- ${{ if eq(coalesce(parameters.PromoteToChannelIds, 0), 0) }}:
|
|
- task: DownloadBuildArtifacts@0
|
|
displayName: Download Release Configs
|
|
inputs:
|
|
buildType: current
|
|
artifactName: ReleaseConfigs
|
|
checkDownloadedFiles: true
|
|
|
|
- task: PowerShell@2
|
|
name: setReleaseVars
|
|
displayName: Set Release Configs Vars
|
|
inputs:
|
|
targetType: inline
|
|
pwsh: true
|
|
script: |
|
|
try {
|
|
if (!$Env:PromoteToMaestroChannels -or $Env:PromoteToMaestroChannels.Trim() -eq '') {
|
|
$Content = Get-Content $(Build.StagingDirectory)/ReleaseConfigs/ReleaseConfigs.txt
|
|
|
|
$BarId = $Content | Select -Index 0
|
|
$Channels = $Content | Select -Index 1
|
|
$IsStableBuild = $Content | Select -Index 2
|
|
|
|
$AzureDevOpsProject = $Env:System_TeamProject
|
|
$AzureDevOpsBuildDefinitionId = $Env:System_DefinitionId
|
|
$AzureDevOpsBuildId = $Env:Build_BuildId
|
|
}
|
|
else {
|
|
$buildApiEndpoint = "${Env:MaestroApiEndPoint}/api/builds/${Env:BARBuildId}?api-version=${Env:MaestroApiVersion}"
|
|
|
|
$apiHeaders = New-Object 'System.Collections.Generic.Dictionary[[String],[String]]'
|
|
$apiHeaders.Add('Accept', 'application/json')
|
|
$apiHeaders.Add('Authorization',"Bearer ${Env:MAESTRO_API_TOKEN}")
|
|
|
|
$buildInfo = try { Invoke-WebRequest -Method Get -Uri $buildApiEndpoint -Headers $apiHeaders | ConvertFrom-Json } catch { Write-Host "Error: $_" }
|
|
|
|
$BarId = $Env:BARBuildId
|
|
$Channels = $Env:PromoteToMaestroChannels -split ","
|
|
$Channels = $Channels -join "]["
|
|
$Channels = "[$Channels]"
|
|
|
|
$IsStableBuild = $buildInfo.stable
|
|
$AzureDevOpsProject = $buildInfo.azureDevOpsProject
|
|
$AzureDevOpsBuildDefinitionId = $buildInfo.azureDevOpsBuildDefinitionId
|
|
$AzureDevOpsBuildId = $buildInfo.azureDevOpsBuildId
|
|
}
|
|
|
|
Write-Host "##vso[task.setvariable variable=BARBuildId]$BarId"
|
|
Write-Host "##vso[task.setvariable variable=TargetChannels]$Channels"
|
|
Write-Host "##vso[task.setvariable variable=IsStableBuild]$IsStableBuild"
|
|
|
|
Write-Host "##vso[task.setvariable variable=AzDOProjectName]$AzureDevOpsProject"
|
|
Write-Host "##vso[task.setvariable variable=AzDOPipelineId]$AzureDevOpsBuildDefinitionId"
|
|
Write-Host "##vso[task.setvariable variable=AzDOBuildId]$AzureDevOpsBuildId"
|
|
}
|
|
catch {
|
|
Write-Host $_
|
|
Write-Host $_.Exception
|
|
Write-Host $_.ScriptStackTrace
|
|
exit 1
|
|
}
|
|
env:
|
|
MAESTRO_API_TOKEN: $(MaestroApiAccessToken)
|
|
BARBuildId: ${{ parameters.BARBuildId }}
|
|
PromoteToMaestroChannels: ${{ parameters.PromoteToChannelIds }}
|