spotify/jenkins-coverage-poster

Name: jenkins-coverage-poster

Owner: Spotify

Description: a jenkins pipeline library for posting code coverage results

Created: 2017-04-22 23:55:02.0

Updated: 2018-05-18 10:58:41.0

Pushed: 2017-11-13 20:07:39.0

Homepage:

Size: 153

Language: Groovy

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Apache 2.0

A Jenkins 2.0 Pipeline library for automatically posting code coverage results to GitHub pull requests.

Currently supports:

Example usage

In your Jenkinsfile:

rary('github.com/spotify/jenkins-coverage-poster@1.0') _

e("Run tests") {
 "mvn test"


e("Post coverage") {
stJacocoCoverage(threshold: 75)

Example result

Parameters
What is “coverage”?

This library uses total instruction coverage for all code coverage calculations. Note that this is different from line coverage and branch coverage.

Requirements

In addition, in Jenkins there must be a defined Credential called github-user-token, containing as password a valid GitHub api token. The Credential username can be anything, as it is not used. The token's permissions must allow read access to repositories and posting comments to pull requests at minimum.

Code of conduct

This project adheres to the Open Code of Conduct. By participating, you are expected to honor this code.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.