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

Add Buildkite support #23

Merged
merged 1 commit into from
Sep 8, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions ci_info.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@ module.exports = {
commit_sha: env.APPVEYOR_REPO_COMMIT,
pull_request: env.APPVEYOR_PULL_REQUEST_NUMBER,
}
} else if (env.BUILDKITE) {
return {
name: "buildkite",
build_identifier: env.BUILDKITE_BUILD_ID,
build_url: env.BUILDKITE_BUILD_URL,
branch: env.BUILDKITE_BRANCH,
commit_sha: env.BUILDKITE_COMMIT
}
} else {
return {};
}
Expand Down
7 changes: 7 additions & 0 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,12 @@ describe('ci_info', function() {
assert.equal(ci.name, 'appveyor');
});

it('should return buildkite as name if process.env.BUILDKITE is set', function() {
process.env.BUILDKITE = 'true';

var ci = CiInfo.getInfo();
assert.equal(ci.name, 'buildkite');
});

});
});