From 2fb137eefba11b1ca5139e4f6269451229586cf3 Mon Sep 17 00:00:00 2001 From: Marc Riegel Date: Sun, 26 Jun 2016 08:02:09 +0200 Subject: Feature: Support codeship docker environment variables --- lib/getOptions.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/getOptions.js b/lib/getOptions.js index e579eee..2536067 100644 --- a/lib/getOptions.js +++ b/lib/getOptions.js @@ -9,6 +9,7 @@ var getBaseOptions = function(cb){ var options = {}; var git_commit = process.env.COVERALLS_GIT_COMMIT; var git_branch = process.env.COVERALLS_GIT_BRANCH; + var git_committer_name, git_committer_email, git_message; var match = (process.env.CI_PULL_REQUEST || "").match(/(\d+)$/); @@ -57,6 +58,9 @@ var getBaseOptions = function(cb){ options.service_job_id = process.env.CI_BUILD_NUMBER; git_commit = process.env.CI_COMMIT_ID; git_branch = process.env.CI_BRANCH; + git_committer_name = process.env.CI_COMMITTER_NAME; + git_committer_email = process.env.CI_COMMITTER_EMAIL; + git_message = process.env.CI_COMMIT_MESSAGE; } if (process.env.WERCKER){ @@ -123,7 +127,10 @@ var getBaseOptions = function(cb){ if (git_commit){ fetchGitData({ head: { - id: git_commit + id: git_commit, + committer_name: git_committer_name, + committer_email: git_committer_email, + message: git_message }, branch: git_branch }, function(err, git){ -- cgit v1.2.3 From 2f636d2c193e5e35ef2b93f3fc1c46e2c3c97b71 Mon Sep 17 00:00:00 2001 From: Paul Betts Date: Wed, 17 Aug 2016 13:25:31 -0700 Subject: Wire up the code --- lib/getOptions.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib') diff --git a/lib/getOptions.js b/lib/getOptions.js index e579eee..70420b2 100644 --- a/lib/getOptions.js +++ b/lib/getOptions.js @@ -80,6 +80,11 @@ var getBaseOptions = function(cb){ git_commit = process.env.APPVEYOR_REPO_COMMIT; git_branch = process.env.APPVEYOR_REPO_BRANCH; } + if(process.env.SURF_SHA1){ + options.service_name = 'surf'; + git_commit = process.env.SURF_SHA1; + git_branch = process.env.SURF_REF; + } options.run_at = process.env.COVERALLS_RUN_AT || JSON.stringify(new Date()).slice(1, -1); if (process.env.COVERALLS_SERVICE_NAME){ options.service_name = process.env.COVERALLS_SERVICE_NAME; -- cgit v1.2.3