* Switch to using standard PAT tokens instead of base 64 For most of these we can use the standard System.AccessToken given to the build instead of maintaining a specific token. However that token isn't base 64 encoded so we need to encode it. With this we can stop explicitly passing PAT's unless we need to access another DevOps org and we also don't have to remember to keep the PAT's in KV base 64 encoded. Add error detection for queue build script to fail if we get login response. * PR Feedback --------- Co-authored-by: Wes Haggard <Wes.Haggard@microsoft.com>
41 lines
609 B
PowerShell
41 lines
609 B
PowerShell
function Test-SupportsDevOpsLogging()
|
|
{
|
|
return ($null -ne $env:SYSTEM_TEAMPROJECTID)
|
|
}
|
|
|
|
function LogWarning
|
|
{
|
|
if (Test-SupportsDevOpsLogging)
|
|
{
|
|
Write-Host "##vso[task.LogIssue type=warning;]$args"
|
|
}
|
|
else
|
|
{
|
|
Write-Warning "$args"
|
|
}
|
|
}
|
|
|
|
function LogError
|
|
{
|
|
if (Test-SupportsDevOpsLogging)
|
|
{
|
|
Write-Host "##vso[task.LogIssue type=error;]$args"
|
|
}
|
|
else
|
|
{
|
|
Write-Error "$args"
|
|
}
|
|
}
|
|
|
|
function LogDebug
|
|
{
|
|
if (Test-SupportsDevOpsLogging)
|
|
{
|
|
Write-Host "[debug]$args"
|
|
}
|
|
else
|
|
{
|
|
Write-Debug "$args"
|
|
}
|
|
}
|