diff options
author | 2018-08-23 14:45:39 +0200 | |
---|---|---|
committer | 2018-08-27 14:53:20 +0200 | |
commit | 851d47037b1092d4c2991289eef3bddb4439bd7a (patch) | |
tree | af8e5919f74f75a7321c43910a77bfffea89af41 /hv-collector-coverage/pom.xml | |
parent | 1d9f81b69b5caad88373d3fcece4654df4729161 (diff) |
Fail build when coverage is too low
Minimum coverage set to 60%. It works by parsing aggregated Jacoco
report as oposed to jacoco:check goal which checks coverage at most
on submodule level.
Change-Id: Ie6f50ce9b2f15e62ad84480611897a98321a7af2
Issue-ID: DCAEGEN2-681
Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
Diffstat (limited to 'hv-collector-coverage/pom.xml')
-rw-r--r-- | hv-collector-coverage/pom.xml | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/hv-collector-coverage/pom.xml b/hv-collector-coverage/pom.xml index f988f8ec..970d4b41 100644 --- a/hv-collector-coverage/pom.xml +++ b/hv-collector-coverage/pom.xml @@ -71,6 +71,27 @@ </execution> </executions> </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>exec-maven-plugin</artifactId> + <executions> + <execution> + <id>check-coverage</id> + <phase>verify</phase> + <goals> + <goal>exec</goal> + </goals> + </execution> + </executions> + <configuration> + <executable>${project.basedir}/check-coverage.sh</executable> + <workingDirectory>${project.basedir}</workingDirectory> + <arguments> + <argument>target/site/jacoco-aggregate/jacoco.xml</argument> + <argument>${jacoco.minimum.coverage}</argument> + </arguments> + </configuration> + </plugin> </plugins> </build> |