Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit 1d04174

Browse files
committed
Merge pull request #23 from buildkite/add-buildkite
Add Buildkite support
2 parents 9d89691 + d5c6949 commit 1d04174

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

ci_info.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,14 @@ module.exports = {
6060
commit_sha: env.APPVEYOR_REPO_COMMIT,
6161
pull_request: env.APPVEYOR_PULL_REQUEST_NUMBER,
6262
}
63+
} else if (env.BUILDKITE) {
64+
return {
65+
name: "buildkite",
66+
build_identifier: env.BUILDKITE_BUILD_ID,
67+
build_url: env.BUILDKITE_BUILD_URL,
68+
branch: env.BUILDKITE_BRANCH,
69+
commit_sha: env.BUILDKITE_COMMIT
70+
}
6371
} else {
6472
return {};
6573
}

test/test.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,12 @@ describe('ci_info', function() {
4848
assert.equal(ci.name, 'appveyor');
4949
});
5050

51+
it('should return buildkite as name if process.env.BUILDKITE is set', function() {
52+
process.env.BUILDKITE = 'true';
53+
54+
var ci = CiInfo.getInfo();
55+
assert.equal(ci.name, 'buildkite');
56+
});
57+
5158
});
5259
});

0 commit comments

Comments
 (0)