parent
88c75e43ae
commit
44ebae30a9
92
files/config/Jenkinsfile
vendored
92
files/config/Jenkinsfile
vendored
@ -1,52 +1,54 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
|
|
||||||
environment {
|
environment {
|
||||||
CARGO_TERM_COLOR = 'always'
|
CARGO_TERM_COLOR = 'always'
|
||||||
}
|
}
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
stage('Build') {
|
stage('Build') {
|
||||||
steps {
|
steps {
|
||||||
withChecks(name: 'Test', includeStage: true) {
|
withChecks(name: 'Test', includeStage: true) {
|
||||||
sh '''
|
sh '''
|
||||||
set -eux
|
set -eux
|
||||||
make ci
|
make ci
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
publishHTML(target: [
|
publishHTML(target: [
|
||||||
allowMissing: false,
|
allowMissing: false,
|
||||||
alwaysLinkToLastBuild: true,
|
alwaysLinkToLastBuild: true,
|
||||||
keepAll: true,
|
keepAll: true,
|
||||||
reportDir: 'target/llvm-cov/html',
|
reportDir: 'target/llvm-cov/html',
|
||||||
reportFiles: 'index.html',
|
reportFiles: 'index.html',
|
||||||
reportName: 'Rust Coverage HTML',
|
reportName: 'Rust Coverage HTML',
|
||||||
reportTitles: 'Coverage Report'
|
reportTitles: 'Coverage Report'
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
} // Test
|
} // Test
|
||||||
stage('Coverage') {
|
|
||||||
steps {
|
stage('Coverage') {
|
||||||
sh '''
|
steps {
|
||||||
set -eux
|
sh '''
|
||||||
make cobertura
|
set -eux
|
||||||
'''
|
make cobertura
|
||||||
recordCoverage(
|
'''
|
||||||
tools: [[parser: 'COBERTURA', pattern: 'target/llvm-cov/cobertura.xml']],
|
recordCoverage(
|
||||||
sourceCodeRetention: 'LAST_BUILD',
|
tools: [[parser: 'COBERTURA', pattern: 'target/llvm-cov/cobertura.xml']],
|
||||||
enabledForFailure: true,
|
sourceCodeRetention: 'LAST_BUILD',
|
||||||
failOnError: true,
|
enabledForFailure: true,
|
||||||
checksAnnotationScope: 'MODIFIED_LINES',
|
failOnError: true,
|
||||||
checksName: 'Rust Coverage',
|
checksAnnotationScope: 'MODIFIED_LINES',
|
||||||
qualityGates: [
|
id: 'rust-coverage',
|
||||||
[metric: 'LINE', baseline: 'MODIFIED_LINES', threshold: 20.0],
|
name: 'Rust Coverage',
|
||||||
[metric: 'LINE', baseline: 'PROJECT', threshold: 20.0],
|
checksName: 'Rust Coverage',
|
||||||
[metric: 'BRANCH', baseline: 'PROJECT', threshold: 20.0]
|
qualityGates: [
|
||||||
]
|
[metric: 'LINE', baseline: 'MODIFIED_LINES', threshold: 20.0],
|
||||||
)
|
[metric: 'LINE', baseline: 'PROJECT', threshold: 20.0],
|
||||||
}
|
[metric: 'BRANCH', baseline: 'PROJECT', threshold: 20.0]
|
||||||
} // Cobertura
|
]
|
||||||
}
|
)
|
||||||
|
}
|
||||||
|
} // Cobertura
|
||||||
}
|
}
|
||||||
|
|
||||||
post {
|
post {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user