Skip to content

Add scripts for VSTS to pick PSES branches to include #1498

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 31, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions tools/releaseBuild/findPsesBuild.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
$branch = [uri]::EscapeDataString($env:PSES_BRANCH)
$buildsUrl = $env:VSTS_PSES_URL_TEMPLATE -f $branch
$headers = @{Authorization = "Bearer $env:SYSTEM_ACCESSTOKEN"}
$builds = Invoke-RestMethod -ContentType application/json -Uri $buildsUrl -Headers $headers
Write-Host "Got PSES_BRANCH: ${env:PSES_BRANCH}"
Write-Host "Requested URL: $buildsUrl"
Write-Host "Got response:`n$(ConvertTo-Json $builds)"
Write-Host "setting PSES_BUILDID to $($builds.value[0].Id)"
Write-Host "##vso[task.setvariable variable=PSES_BUILDID]$($builds.value[0].Id)"
11 changes: 11 additions & 0 deletions tools/releaseBuild/setVstsVariables.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
$vstsVariables = @{
PSES_BRANCH = 'master'
}

# Use VSTS's API to set an env vars
foreach ($var in $vstsVariables.Keys)
{
$val = $vstsVariables[$var]
Write-Host "Setting var '$var' to value '$val'"
Write-Host "##vso[task.setvariable variable=$var]$val"
}