Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Commit

Permalink
Add snippet to show how to use this plugin in a pipeline/Jenkinsfile
Browse files Browse the repository at this point in the history
  • Loading branch information
centic9 authored Apr 11, 2023
1 parent 298f4b1 commit cfe0fa7
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,25 @@ More information can be found on the Wiki page https://wiki.jenkins-ci.org/displ
Note: Version 2.0.0 and higher requires using JaCoCo 0.7.5 or newer, if your projects still use JaCoCo 0.7.4,
the plugin will not display any code-coverage numbers any more! In this case please use version 1.0.19 until you can update jacoco in your codebase.

Using as part of a pipeline via Jenkinsfile
===========================================

The following is an example snippet that can be used in a `Jenkinsfile`

```
post {
success {
jacoco(
execPattern: '**/build/jacoco/*.exec',
classPattern: '**/build/classes/java/main',
sourcePattern: '**/src/main'
)
}
}
```

See https://www.jenkins.io/doc/pipeline/steps/jacoco/ for the list of available options.

Looking for ways to contribute?
===============================

Expand Down

0 comments on commit cfe0fa7

Please sign in to comment.