Open GoogleCodeExporter opened 9 years ago
Original comment by nat.pr...@gmail.com
on 9 Jul 2007 at 4:14
This is already quite easily possible if the picture links point to a small
script
that parses TC's externalStatus. Here's a snippet from the php code we use:
if (!isset($_COOKIE["avatar-build-success"]) || isset($_GET["force"])) {
$fh = fopen("http://teamcity:8111/externalStatus.html?buildTypeId=bt72", 'r');
$contents = stream_get_contents($fh);
$success = preg_match("/success.gif/", $contents);
setcookie("avatar-build-success", $success, time() + 30);
} else {
$success=$_COOKIE["avatar-build-success"];
}
Depending on success the server returns a different image.
Original comment by andreas.kohn@gmail.com
on 27 Sep 2008 at 9:14
Original issue reported on code.google.com by
nat.pr...@gmail.com
on 9 Jul 2007 at 4:14