Skip to content

Commit 418ae78

Browse files
committed
Merge pull request #21 from mshmsh5000/master
Fixes #20: Adds CI service info for Wercker
2 parents 9b8377e + c104039 commit 418ae78

File tree

1 file changed

+15
-0
lines changed
  • src/CodeClimate/Bundle/TestReporterBundle/Entity

1 file changed

+15
-0
lines changed

src/CodeClimate/Bundle/TestReporterBundle/Entity/CiInfo.php

+15
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ public function toArray()
3333
return $this->buildboxProperties();
3434
}
3535

36+
if (isset($_SERVER["WERCKER"])) {
37+
return $this->werckerProperties();
38+
}
39+
3640
return array();
3741
}
3842

@@ -107,4 +111,15 @@ protected function buildboxProperties()
107111
"pull_request" => $_SERVER["BUILDBOX_PULL_REQUEST"]
108112
);
109113
}
114+
115+
protected function werckerProperties()
116+
{
117+
return array(
118+
"name" => "wercker",
119+
"build_identifier" => $_SERVER["WERCKER_BUILD_ID"],
120+
"build_url" => $_SERVER["WERCKER_BUILD_URL"],
121+
"branch" => $_SERVER["WERCKER_GIT_BRANCH"],
122+
"commit_sha" => $_SERVER["WERCKER_GIT_COMMIT"]
123+
);
124+
}
110125
}

0 commit comments

Comments
 (0)