Compare commits
3 Commits
1.0.8.post
...
1.0.8.post
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
99f38741fd | ||
|
|
eee2bf551c | ||
|
|
01ce809823 |
14
Jenkinsfile
vendored
14
Jenkinsfile
vendored
@@ -12,6 +12,7 @@ import javax.xml.xpath.*
|
||||
import groovy.xml.DOMBuilder
|
||||
import groovy.xml.dom.DOMCategory
|
||||
import java.math.RoundingMode
|
||||
import java.math.BigDecimal
|
||||
|
||||
// configurable settings:
|
||||
// use to send email if workflow problem
|
||||
@@ -34,8 +35,9 @@ def _MkDocsWebCredentials = "2c5b684e-3787-4b37-8aca-b3dd4a383fe2"
|
||||
def _PypiCredentials = "Pypi"
|
||||
|
||||
|
||||
def badge_coverage = addEmbeddableBadgeConfiguration(id: "coverage", subject: "unit-test coverage")
|
||||
def badge_complexity = addEmbeddableBadgeConfiguration(id: "complexity", subject: "code complexity")
|
||||
def badge_coverage = addEmbeddableBadgeConfiguration(id: "coverage", subject: "coverage")
|
||||
def badge_complexity = addEmbeddableBadgeConfiguration(id: "complexity", subject: "code complexity")
|
||||
def badge_quality = addEmbeddableBadgeConfiguration(id: "quality", subject: "quality score")
|
||||
|
||||
// commands Helper: /!\ Made for GITEA /!\
|
||||
String determineRepoUserName() {
|
||||
@@ -365,6 +367,10 @@ pipeline {
|
||||
steps {
|
||||
dir("gitrepo") {
|
||||
sh(". ~/TEST_ENV/bin/activate && python -m helpers --type-check --quality-check")
|
||||
script {
|
||||
def jsonObj = readJSON file: "helpers-results/quality_check/metrics.json"
|
||||
badge_quality.setStatus(jsonObj["GlobalScore"])
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
@@ -441,11 +447,11 @@ pipeline {
|
||||
println GetCoverageValue_branch_rate(coverage_report_path)
|
||||
println GetCoverageValue_complexity(coverage_report_path)
|
||||
|
||||
full_rate = BigDecimal( (GetCoverageValue_line_rate(coverage_report_path) + GetCoverageValue_branch_rate(coverage_report_path)) / 2 )
|
||||
full_rate = new BigDecimal( (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 = BigDecimal( GetCoverageValue_complexity(coverage_report_path))
|
||||
complexity = new BigDecimal( 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