hermann/Jenkinsfile

34 lines
740 B
Plaintext
Raw Normal View History

2016-06-29 20:12:58 +00:00
#!groovy
/* Only keep the 10 most recent builds. */
properties([[$class: 'BuildDiscarderProperty',
strategy: [$class: 'LogRotator', numToKeepStr: '10']]])
stage 'Build'
node {
// Checkout
checkout scm
2016-07-07 00:01:35 +00:00
// install required bundles
sh 'bundle install'
2016-06-29 20:12:58 +00:00
2016-07-07 00:01:35 +00:00
// build and run tests with coverage
sh 'bundle exec rake build spec'
2016-06-29 20:12:58 +00:00
// Archive the built artifacts
archive (includes: 'pkg/*.gem')
// publish html
// "target:" shouldn't be needed, https://issues.jenkins-ci.org/browse/JENKINS-29711.
publishHTML (target: [
allowMissing: false,
alwaysLinkToLastBuild: false,
keepAll: true,
reportDir: 'coverage',
reportFiles: 'index.html',
reportName: "RCov Report"
])
}