-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGetTCBuildStatus.ps1
More file actions
30 lines (28 loc) · 877 Bytes
/
Copy pathGetTCBuildStatus.ps1
File metadata and controls
30 lines (28 loc) · 877 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
function printStatus($buildName, $buildID)
{
$wc = new-object system.net.webclient
$wc.credentials = new-object system.net.networkcredential($as["username"], $as["password"])
$url = "http://tc.unitymg.com:8111/httpAuth/feed.html?buildTypeId=bt$buildID&itemsType=builds&itemsCount=1"
[xml]$xml = $wc.DownloadString($url)
$i = 25
$i = $i - [string]$buildName.Length
if($xml.feed.entry.creator -eq "Successful Build")
{
$i = $i-2
$space = repeatString " " $i
$buildName + $space + "OK"
}
else
{
$i = $i-4
$space = repeatString " " $i
$buildName + $space + "FAIL"
}
}
$as = getConfigs ($MyInvocation.MyCommand).Definition.replace(".ps1", "")
$builds = getConfigs ($MyInvocation.MyCommand).Definition.replace(".ps1", ".build")
"-------------------------"
foreach ($build in $builds.keys)
{
printStatus $build $builds[$build]
}