Compare commits

...

10 Commits

Author SHA1 Message Date
260354a009 add withChecks into pipeline
Some checks failed
test-coverage / build occurred while executing withChecks step.
2025-02-19 15:53:23 +00:00
407bc6311c add withChecks into pipeline
Some checks are pending
test-coverage / build
JaCoCo Coverage #### Project Overview No changes detected, that affect the code coverage. * Line Coverage: 50.00% (2/4) * Lines of Code: 4 * Cyclomatic Complexity: 3 #### Quality Gates Summary No active quality gates.
2025-02-19 15:43:41 +00:00
39a361ec41 add withChecks into pipeline 2025-02-19 15:39:04 +00:00
9ec20b53e3 add withChecks into pipeline 2025-02-19 15:29:54 +00:00
a86ddef535 add withChecks into pipeline 2025-02-19 15:00:51 +00:00
b3e3a68736 add withChecks into pipeline 2025-02-19 14:38:25 +00:00
f26cfa6950 add withChecks into pipeline 2025-02-19 14:34:54 +00:00
4b57b3d45a add withChecks into pipeline 2025-02-19 14:28:27 +00:00
983b67833b add withChecks into pipeline 2025-02-19 14:27:33 +00:00
aae261ffa3 add withChecks into pipeline 2025-02-19 14:20:06 +00:00
2 changed files with 22 additions and 7 deletions

16
Jenkinsfile vendored
View File

@ -2,12 +2,18 @@ pipeline {
agent any
stages {
stage('Test') {
stage('build') {
steps {
withChecks(name: 'Test') {
echo 'Testing..'
sh './gradlew clean jacocoTestReport jacocoTestCoverageVerification'
junit '**/build/test-results/test/TEST-*.xml'
withChecks(name: 'test-coverage', includeStage: true) {
sh './gradlew clean test jacocoTestReport jacocoTestCoverageVerification'
// junit '**/build/test-results/test/TEST-*.xml'
recordCoverage(tools: [[parser: 'JACOCO']],
id: 'jacoco', name: 'JaCoCo Coverage',
sourceCodeRetention: 'EVERY_BUILD'
// , qualityGates: [
// [threshold: 40.0, metric: 'LINE', baseline: 'PROJECT', unstable: true],
// [threshold: 40.0, metric: 'BRANCH', baseline: 'PROJECT', unstable: true]]
)
}
}
}

View File

@ -37,11 +37,20 @@ jacoco {
toolVersion = "0.8.12"
}
tasks.jacocoTestReport {
reports {
xml.required.set(true)
xml.outputLocation.set(file("build/reports/jacoco/test/jacoco.xml"))
csv.required.set(false)
html.required.set(false)
}
}
tasks.jacocoTestCoverageVerification {
violationRules {
rule {
limit {
minimum = "0.4".toBigDecimal()
minimum = "0.9".toBigDecimal()
}
}
@ -53,7 +62,7 @@ tasks.jacocoTestCoverageVerification {
limit {
counter = "LINE"
value = "TOTALCOUNT"
maximum = "0.3".toBigDecimal()
minimum = "0.3".toBigDecimal()
}
}
}