diff --git a/src/CodeClimate/Bundle/TestReporterBundle/Entity/CiInfo.php b/src/CodeClimate/Bundle/TestReporterBundle/Entity/CiInfo.php index f965a9a..94bb555 100644 --- a/src/CodeClimate/Bundle/TestReporterBundle/Entity/CiInfo.php +++ b/src/CodeClimate/Bundle/TestReporterBundle/Entity/CiInfo.php @@ -29,6 +29,10 @@ public function toArray() return $this->codeshipProperties(); } + if (isset($_SERVER["BUILDBOX"])) { + return $this->buildboxProperties(); + } + return array(); } @@ -91,4 +95,16 @@ protected function codeshipProperties() "commit_sha" => $_SERVER["CI_COMMIT_ID"] ); } + + protected function buildboxProperties() + { + return array( + "name" => "buildbox", + "build_identifier" => $_SERVER["BUILDBOX_BUILD_ID"], + "build_url" => $_SERVER["BUILDBOX_BUILD_URL"], + "branch" => $_SERVER["BUILDBOX_BRANCH"], + "commit_sha" => $_SERVER["BUILDBOX_COMMIT"], + "pull_request" => $_SERVER["BUILDBOX_PULL_REQUEST"] + ); + } }