add withChecks into pipeline
Some checks are pending
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.
build
test-coverage
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 Overall result: Success Output truncated.
Tests / Post passed: 1

This commit is contained in:
bQUARKz 2025-02-19 15:56:55 +00:00
parent 260354a009
commit 137ab417ec
2 changed files with 9 additions and 6 deletions

13
Jenkinsfile vendored
View File

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

View File

@ -50,7 +50,7 @@ tasks.jacocoTestCoverageVerification {
violationRules {
rule {
limit {
minimum = "0.9".toBigDecimal()
minimum = "0.2".toBigDecimal()
}
}