Skip to content

Commit 0a51e54

Browse files
committed
Merge pull request #16 from xzyfer/feat/buildbox
Add buildbox CI info support
2 parents 8ed24ff + 9f92758 commit 0a51e54

File tree

1 file changed

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

1 file changed

+16
-0
lines changed

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

+16
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ public function toArray()
2929
return $this->codeshipProperties();
3030
}
3131

32+
if (isset($_SERVER["BUILDBOX"])) {
33+
return $this->buildboxProperties();
34+
}
35+
3236
return array();
3337
}
3438

@@ -91,4 +95,16 @@ protected function codeshipProperties()
9195
"commit_sha" => $_SERVER["CI_COMMIT_ID"]
9296
);
9397
}
98+
99+
protected function buildboxProperties()
100+
{
101+
return array(
102+
"name" => "buildbox",
103+
"build_identifier" => $_SERVER["BUILDBOX_BUILD_ID"],
104+
"build_url" => $_SERVER["BUILDBOX_BUILD_URL"],
105+
"branch" => $_SERVER["BUILDBOX_BRANCH"],
106+
"commit_sha" => $_SERVER["BUILDBOX_COMMIT"],
107+
"pull_request" => $_SERVER["BUILDBOX_PULL_REQUEST"]
108+
);
109+
}
94110
}

0 commit comments

Comments
 (0)