improve jenkins (#11)
All checks were successful
Intrepid/Prometeu/Runtime/pipeline/head This commit looks good
All checks were successful
Intrepid/Prometeu/Runtime/pipeline/head This commit looks good
Reviewed-on: #11 Co-authored-by: bQUARKz <bquarkz@gmail.com> Co-committed-by: bQUARKz <bquarkz@gmail.com>
This commit is contained in:
parent
3453494341
commit
c4aca95635
2
Makefile
2
Makefile
@ -19,7 +19,7 @@ clean:
|
|||||||
cargo llvm-cov clean --workspace
|
cargo llvm-cov clean --workspace
|
||||||
|
|
||||||
coverage:
|
coverage:
|
||||||
cargo llvm-cov --workspace --all-features --html --output-dir target/llvm-cov/html
|
cargo llvm-cov --workspace --all-features --html --output-dir target/llvm-cov
|
||||||
|
|
||||||
coverage-xml:
|
coverage-xml:
|
||||||
cargo llvm-cov report --cobertura --output-path target/llvm-cov/cobertura.xml
|
cargo llvm-cov report --cobertura --output-path target/llvm-cov/cobertura.xml
|
||||||
|
|||||||
15
files/config/Jenkinsfile
vendored
15
files/config/Jenkinsfile
vendored
@ -2,6 +2,9 @@ pipeline {
|
|||||||
agent any
|
agent any
|
||||||
|
|
||||||
environment {
|
environment {
|
||||||
|
CARGO_HOME = '/var/jenkins_home/.cargo'
|
||||||
|
CARGO_TARGET_DIR = 'target'
|
||||||
|
|
||||||
CARGO_TERM_COLOR = 'always'
|
CARGO_TERM_COLOR = 'always'
|
||||||
|
|
||||||
MIN_LINES = '60'
|
MIN_LINES = '60'
|
||||||
@ -12,7 +15,6 @@ pipeline {
|
|||||||
stages {
|
stages {
|
||||||
stage('Build') {
|
stage('Build') {
|
||||||
steps {
|
steps {
|
||||||
withChecks(name: 'Test', includeStage: true) {
|
|
||||||
sh '''
|
sh '''
|
||||||
set -eux
|
set -eux
|
||||||
make ci cobertura
|
make ci cobertura
|
||||||
@ -50,6 +52,11 @@ pipeline {
|
|||||||
|
|
||||||
echo "Coverage gate passed."
|
echo "Coverage gate passed."
|
||||||
'''
|
'''
|
||||||
|
// withChecks(name: 'Test', includeStage: true) {
|
||||||
|
// sh '''
|
||||||
|
// set -eux
|
||||||
|
// make ci cobertura
|
||||||
|
// '''
|
||||||
// recordCoverage(
|
// recordCoverage(
|
||||||
// tools: [[parser: 'COBERTURA', pattern: 'target/llvm-cov/cobertura.xml']],
|
// tools: [[parser: 'COBERTURA', pattern: 'target/llvm-cov/cobertura.xml']],
|
||||||
// sourceCodeRetention: 'LAST_BUILD',
|
// sourceCodeRetention: 'LAST_BUILD',
|
||||||
@ -65,13 +72,12 @@ pipeline {
|
|||||||
// [metric: 'BRANCH', baseline: 'PROJECT', threshold: 0.0]
|
// [metric: 'BRANCH', baseline: 'PROJECT', threshold: 0.0]
|
||||||
// ]
|
// ]
|
||||||
// )
|
// )
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
} // Test
|
} // Test
|
||||||
|
|
||||||
stage('Reports') {
|
stage('Reports') {
|
||||||
steps {
|
steps {
|
||||||
script {
|
|
||||||
publishHTML(target: [
|
publishHTML(target: [
|
||||||
allowMissing: false,
|
allowMissing: false,
|
||||||
alwaysLinkToLastBuild: true,
|
alwaysLinkToLastBuild: true,
|
||||||
@ -81,7 +87,8 @@ pipeline {
|
|||||||
reportName: 'Rust Coverage HTML',
|
reportName: 'Rust Coverage HTML',
|
||||||
reportTitles: 'Coverage Report'
|
reportTitles: 'Coverage Report'
|
||||||
])
|
])
|
||||||
}
|
|
||||||
|
archiveArtifacts artifacts: 'target/llvm-cov/**', fingerprint: true
|
||||||
}
|
}
|
||||||
} // Reports
|
} // Reports
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user