Skip to content

Commit

Permalink
Add jenkinsfile
Browse files Browse the repository at this point in the history
  • Loading branch information
mannau committed Sep 28, 2019
1 parent c177452 commit 7810fb6
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
pipeline {
agent any
stages {
stage('Install') {
steps {
bat 'R --slave -e "devtools::install_dev_deps()"'
}
}
stage('Test') {
steps {
bat 'R --slave -e "devtools::check()"'
}
}
stage('Deploy') {
steps {
bat 'R --slave -e "devtools::build(binary = FALSE, path = \'C:/repo/src/contrib\')"'
bat 'R --slave -e "devtools::build(binary = TRUE, args = c(\'--preclean\'), path = \'C:/repo/bin/windows/contrib/3.6\')"'
bat 'R --slave -e "miniCRAN::makeRepo(sapply(remotes:::dev_package_deps(\'.\', dependencies = TRUE)\$remote, function(x) x\$name), path = \'C:/repo\', type = c(\'source\', \'win.binary\'))"'
}
}
}
post {
success {
mail to: '[email protected]',
subject: "Build Success: ${currentBuild.fullDisplayName}",
body: "Everything worked at ${env.BUILD_URL}"
}
failure {
mail to: '[email protected]',
subject: "Failed Pipeline: ${currentBuild.fullDisplayName}",
body: "Something is wrong with ${env.BUILD_URL}"
}
}
}

0 comments on commit 7810fb6

Please sign in to comment.