lib/coveralls/configuration.rb in coveralls-0.8.11 vs lib/coveralls/configuration.rb in coveralls-0.8.12

- old
+ new

@@ -30,10 +30,12 @@ set_service_params_for_jenkins(config) elsif ENV['APPVEYOR'] set_service_params_for_appveyor(config) elsif ENV['TDDIUM'] set_service_params_for_tddium(config) + elsif ENV['GITLAB_CI'] + set_service_params_for_gitlab(config) elsif ENV['COVERALLS_RUN_LOCALLY'] || Coveralls.testing set_service_params_for_coveralls_local(config) end # standardized env vars @@ -81,9 +83,17 @@ config[:service_number] = ENV['TDDIUM_SESSION_ID'] config[:service_job_number] = ENV['TDDIUM_TID'] config[:service_pull_request] = ENV['TDDIUM_PR_ID'] config[:service_branch] = ENV['TDDIUM_CURRENT_BRANCH'] config[:service_build_url] = "https://ci.solanolabs.com/reports/#{ENV['TDDIUM_SESSION_ID']}" + end + + def self.set_service_params_for_gitlab(config) + config[:service_name] = 'gitlab-ci' + config[:service_job_number] = ENV['CI_BUILD_NAME'] + config[:service_job_id] = ENV['CI_BUILD_ID'] + config[:service_branch] = ENV['CI_BUILD_REF_NAME'] + config[:commit_sha] = ENV['CI_BUILD_REF'] end def self.set_service_params_for_coveralls_local(config) config[:service_job_id] = nil config[:service_name] = 'coveralls-ruby'