[Pkg-javascript-commits] [node-coveralls] 287/332: reenable drone
Bastien Roucariès
rouca at moszumanska.debian.org
Thu Nov 9 13:54:12 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-coveralls.
commit d117e3dc18325d9abc27f26d098b528671d0b5a1
Author: Kasper Lewau <lewauu at gmail.com>
Date: Tue Jan 31 15:49:26 2017 +0100
reenable drone
---
lib/getOptions.js | 7 +++++--
test/getOptions.js | 15 ++++++++-------
2 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/lib/getOptions.js b/lib/getOptions.js
index bb4248d..14028ef 100644
--- a/lib/getOptions.js
+++ b/lib/getOptions.js
@@ -24,14 +24,17 @@ var getBaseOptions = function(cb){
git_branch = process.env.TRAVIS_BRANCH;
}
- /*
+
if (process.env.DRONE){
options.service_name = 'drone';
options.service_job_id = process.env.DRONE_BUILD_NUMBER;
+ options.service_pull_request = process.env.DRONE_PULL_REQUEST;
+ git_committer_name = process.env.DRONE_COMMIT_AUTHOR;
+ git_committer_email = process.env.DRONE_COMMIT_AUTHOR_EMAIL;
git_commit = process.env.DRONE_COMMIT;
git_branch = process.env.DRONE_BRANCH;
+ git_message = process.env.DRONE_COMMIT_MESSAGE;
}
- */
if (process.env.JENKINS_URL){
options.service_name = 'jenkins';
diff --git a/test/getOptions.js b/test/getOptions.js
index bd38b7c..3124a83 100644
--- a/test/getOptions.js
+++ b/test/getOptions.js
@@ -49,11 +49,9 @@ describe("getBaseOptions", function(){
it ("should set service_name and service_job_id if it's running on codeship", function(done){
testCodeship(getBaseOptions, done);
});
- /*
it ("should set service_name and service_job_id if it's running on drone", function(done){
testDrone(getBaseOptions, done);
});
- */
it ("should set service_name and service_job_id if it's running on wercker", function(done){
testWercker(getBaseOptions, done);
});
@@ -133,11 +131,9 @@ describe("getOptions", function(){
it ("should set service_name and service_job_id if it's running on codeship", function(done){
testCodeship(getOptions, done);
});
- /*
it ("should set service_name and service_job_id if it's running on drone", function(done){
testDrone(getBaseOptions, done);
});
- */
it ("should set service_name and service_job_id if it's running on wercker", function(done){
testWercker(getOptions, done);
});
@@ -365,6 +361,11 @@ var testDrone = function(sut, done) {
process.env.DRONE_BUILD_NUMBER = '1234';
process.env.DRONE_COMMIT = "e3e3e3e3e3e3e3e3e";
process.env.DRONE_BRANCH = "master";
+ process.env.DRONE_PULL_REQUEST = '3';
+ process.env.DRONE_COMMIT_AUTHOR = 'john doe';
+ process.env.DRONE_COMMIT_AUTHOR_EMAIL = 'john at doe.com';
+ process.env.DRONE_COMMIT_MESSAGE = 'msgmsgmsg';
+
sut(function(err, options){
options.service_name.should.equal("drone");
options.service_job_id.should.equal("1234");
@@ -372,9 +373,9 @@ var testDrone = function(sut, done) {
{ id: 'e3e3e3e3e3e3e3e3e',
author_name: 'Unknown Author',
author_email: '',
- committer_name: 'Unknown Committer',
- committer_email: '',
- message: 'Unknown Commit Message' },
+ committer_name: 'john doe',
+ committer_email: 'john at doe.com',
+ message: 'msgmsgmsg' },
branch: 'master',
remotes: [] });
done();
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-coveralls.git
More information about the Pkg-javascript-commits
mailing list