Interrupting stage on jacoco failure

63 views
Skip to first unread message

Baubak G.

unread,
Jun 22, 2021, 9:16:21 AM6/22/21
to Jenkins JaCoCo plugin mailing list
Hi There,

I am trying to configure the jacoco plugin to fail my build if the delta changes. Although it is true that my build fails, it is not interrupted:

example:
pipeline {
agent any
stages {
steps {

sh """
mvn clean test --settings .mvn/settings.xml \
"""
jacoco(
buildOverBuild: true,
changeBuildStatus: true,
deltaBranchCoverage: '1',
deltaClassCoverage: '1',
deltaComplexityCoverage: '1',
deltaLineCoverage: '1',
deltaMethodCoverage: '1',
execPattern: 'target/**.exec',
minimumBranchCoverage: '70',
minimumClassCoverage: '70',
minimumComplexityCoverage: '70',
minimumLineCoverage: '70',
minimumMethodCoverage: '70',
sourceInclusionPattern: '**/*.java',
sourcePattern: 'src/main/java'
)
}}
stage ("Stage 2") {
steps {
echo "This is the next stage"
}
}
}}

If I execute this script with a sinking delta, the build fails, but the stage "Stage 2" is still executed it seems.
Has anyone had experience with this?

Reply all
Reply to author
Forward
0 new messages