Compare commits
4 Commits
1.0.8.post
...
1.0.8.post
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7b9752a17a | ||
|
|
879a7ca03d | ||
|
|
bd3389aeb2 | ||
|
|
886a22bef2 |
9
Jenkinsfile
vendored
9
Jenkinsfile
vendored
@@ -11,6 +11,7 @@ import static javax.xml.xpath.XPathConstants.*
|
||||
import javax.xml.xpath.*
|
||||
import groovy.xml.DOMBuilder
|
||||
import groovy.xml.dom.DOMCategory
|
||||
import java.math.RoundingMode
|
||||
|
||||
// configurable settings:
|
||||
// use to send email if workflow problem
|
||||
@@ -90,7 +91,7 @@ int GetCoverageValue_line_rate(String CoverageFilePath) { return GetCoverageValu
|
||||
int GetCoverageValue_branches_valid(String CoverageFilePath) { return GetCoverageValue(CoverageFilePath,"/coverage/@branches-valid") }
|
||||
int GetCoverageValue_branches_covered(String CoverageFilePath) { return GetCoverageValue(CoverageFilePath,"/coverage/@branches-covered") }
|
||||
int GetCoverageValue_branch_rate(String CoverageFilePath) { return GetCoverageValue(CoverageFilePath,"/coverage/@branch-rate") }
|
||||
int GetCoverageValue_branches_complexity(String CoverageFilePath) { return GetCoverageValue(CoverageFilePath,"/coverage/@branches-complexity") }
|
||||
int GetCoverageValue_complexity(String CoverageFilePath) { return GetCoverageValue(CoverageFilePath,"/coverage/@complexity") }
|
||||
|
||||
|
||||
pipeline {
|
||||
@@ -438,13 +439,13 @@ pipeline {
|
||||
println GetCoverageValue_branches_valid(coverage_report_path)
|
||||
println GetCoverageValue_branches_covered(coverage_report_path)
|
||||
println GetCoverageValue_branch_rate(coverage_report_path)
|
||||
println GetCoverageValue_branches_complexity(coverage_report_path)
|
||||
println GetCoverageValue_complexity(coverage_report_path)
|
||||
|
||||
full_rate = (GetCoverageValue_line_rate(coverage_report_path) + GetCoverageValue_branch_rate(coverage_report_path)) / 2
|
||||
full_rate = DecimalFormat( (GetCoverageValue_line_rate(coverage_report_path) + GetCoverageValue_branch_rate(coverage_report_path)) / 2 )
|
||||
sz_full_rate =Float.toString(full_rate.setScale(2, RoundingMode.HALF_EVEN))
|
||||
badge_coverage.setStatus(sz_full_rate)
|
||||
|
||||
complexity = GetCoverageValue_branches_complexity(coverage_report_path)
|
||||
complexity = DecimalFormat( GetCoverageValue_complexity(coverage_report_path))
|
||||
sz_complexity =Float.toString(complexity.setScale(2, RoundingMode.HALF_EVEN))
|
||||
badge_complexity.setStatus(sz_complexity)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user