0.1.1 • Published 4 years ago

@ringcentral/gitlab-sonarqube-echo-coverage v0.1.1

Weekly downloads
14
License
ISC
Repository
github
Last release
4 years ago

@ringcentral/gitlab-sonarqube-echo-coverage

Description

Package sends a request to SonarQube API and prints coverage statistics inside gitlab pipeline.

Installation

npm install @ringcentral/gitlab-sonarqube-echo-coverage
// or
yarn add @ringcentral/gitlab-sonarqube-echo-coverage

Configuration

Package can be configured with environment variables below

VariableDescription
CI_COMMIT_REF_NAMEGitlab CI env variable containing the source branch
SONAR_HOSTVariable containing sonar host
SONAR_TOKENVariable containing sonar token
SONAR_PROJECTVariable containing sonar project name

Running

Run this script at the end of your pipeline (the best option is right after sonar coverage upload completed).

rc-gitlab-sonarqube-echo-coverage
// or add it to your package json scripts and do something like
npm run rc-gitlab-sonarqube-echo-coverage
// or
yarn rc-gitlab-sonarqube-echo-coverage