run-teamcity-tests/Run-TeamcityBuild.ps1
2024-10-24 09:37:32 +10:00

17 lines
426 B
PowerShell

param(
[Parameter(Mandatory=$true)] [string] $token,
[Parameter(Mandatory=$true)] [string] $branch,
[Parameter(Mandatory=$true)] [string] $buildId
)
$tcUrl = "https://build.lers.ru"
$params=@{
branchName = $branch
buildType = @{
id = $buildId
}
}
Invoke-RestMethod $tcUrl/app/rest/buildQueue -Headers @{Authorization = "Bearer $token"} -Method 'POST' -ContentType 'application/json' -Body ($params|ConvertTo-Json)