Skip to content

a jenkins pipeline library for posting code coverage results

License

Notifications You must be signed in to change notification settings

mpavlov/test-jenkins-lib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Obsoleted

Development on this library has been moved to https://github.com/spotify/jenkins-coverage-poster. The current repository will receive no further updates.

Summary

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

Currently supports:

  • input
    • jacoco html
  • output
    • github.com
    • github enterprise

Example usage

In your Jenkinsfile:

@Library('github.com/mpavlov/test-jenkins-lib') _

stage("Run tests") {
  sh "mvn test"
}

stage("Post coverage") {
  postJacocoCoverage(threshold: 75)
}

Example result

Requirements

Your Jenkins must be version 2.0 or later and must define a Credential called github-user-token, which contains 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.

About

a jenkins pipeline library for posting code coverage results

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages