mirror of
https://github.com/tribufu/ServerManagers
synced 2026-06-01 09:42:39 +00:00
Update azure-pipelines.yml for Azure Pipelines
This commit is contained in:
parent
7245de086e
commit
40f1a3e255
1 changed files with 2 additions and 0 deletions
|
|
@ -60,12 +60,14 @@ stages:
|
||||||
$uri = "$($baseUri)/distributedtask/pools?api-version=6.0"
|
$uri = "$($baseUri)/distributedtask/pools?api-version=6.0"
|
||||||
Write-Host $uri
|
Write-Host $uri
|
||||||
$responsePools = Invoke-RestMethod -Method Get -Uri $uri -Headers $headers -UseBasicParsing
|
$responsePools = Invoke-RestMethod -Method Get -Uri $uri -Headers $headers -UseBasicParsing
|
||||||
|
Write-Host $responsePools
|
||||||
|
|
||||||
foreach ($pool in $responsePools.Value) {
|
foreach ($pool in $responsePools.Value) {
|
||||||
|
|
||||||
$uri = "$($baseUri)/distributedtask/pools/$($pool.Id)/agents?api-version=6.0&includeCapabilities=true"
|
$uri = "$($baseUri)/distributedtask/pools/$($pool.Id)/agents?api-version=6.0&includeCapabilities=true"
|
||||||
Write-Host $uri
|
Write-Host $uri
|
||||||
$responseAgents = Invoke-RestMethod -Method Get -Uri $uri -Headers $headers -UseBasicParsing
|
$responseAgents = Invoke-RestMethod -Method Get -Uri $uri -Headers $headers -UseBasicParsing
|
||||||
|
Write-Host $responseAgents
|
||||||
|
|
||||||
$agents = $responseAgents.Value.Where({$_.id -eq $agentId -and $_.name -eq $agentName})
|
$agents = $responseAgents.Value.Where({$_.id -eq $agentId -and $_.name -eq $agentName})
|
||||||
if (!($agents) -or $agents.Count -eq 0) {
|
if (!($agents) -or $agents.Count -eq 0) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue