JenkinsTest/Jenkinsfile
bQUARKz 137ab417ec
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
add withChecks into pipeline
2025-02-19 15:56:55 +00:00

27 lines
986 B
Groovy

pipeline {
agent any
stages {
stage('app') {
steps {
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',
sourceCodeRetention: 'EVERY_BUILD'
// , qualityGates: [
// [threshold: 40.0, metric: 'LINE', baseline: 'PROJECT', unstable: true],
// [threshold: 40.0, metric: 'BRANCH', baseline: 'PROJECT', unstable: true]]
)
}
}
}
}
}