Skip to content

Commit c3850d6

Browse files
authored
[Ignore] Add scripts for VSTS to pick PSES branches to include (#1498)
1 parent 0e1ad8d commit c3850d6

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

tools/releaseBuild/findPsesBuild.ps1

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
$branch = [uri]::EscapeDataString($env:PSES_BRANCH)
2+
$buildsUrl = $env:VSTS_PSES_URL_TEMPLATE -f $branch
3+
$headers = @{Authorization = "Bearer $env:SYSTEM_ACCESSTOKEN"}
4+
$builds = Invoke-RestMethod -ContentType application/json -Uri $buildsUrl -Headers $headers
5+
Write-Host "Got PSES_BRANCH: ${env:PSES_BRANCH}"
6+
Write-Host "Requested URL: $buildsUrl"
7+
Write-Host "Got response:`n$(ConvertTo-Json $builds)"
8+
Write-Host "setting PSES_BUILDID to $($builds.value[0].Id)"
9+
Write-Host "##vso[task.setvariable variable=PSES_BUILDID]$($builds.value[0].Id)"
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
$vstsVariables = @{
2+
PSES_BRANCH = 'master'
3+
}
4+
5+
# Use VSTS's API to set an env vars
6+
foreach ($var in $vstsVariables.Keys)
7+
{
8+
$val = $vstsVariables[$var]
9+
Write-Host "Setting var '$var' to value '$val'"
10+
Write-Host "##vso[task.setvariable variable=$var]$val"
11+
}

0 commit comments

Comments
 (0)