Skip to content

Commit 7810fb6

Browse files
committed
Add jenkinsfile
1 parent c177452 commit 7810fb6

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

Jenkinsfile

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
pipeline {
2+
agent any
3+
stages {
4+
stage('Install') {
5+
steps {
6+
bat 'R --slave -e "devtools::install_dev_deps()"'
7+
}
8+
}
9+
stage('Test') {
10+
steps {
11+
bat 'R --slave -e "devtools::check()"'
12+
}
13+
}
14+
stage('Deploy') {
15+
steps {
16+
bat 'R --slave -e "devtools::build(binary = FALSE, path = \'C:/repo/src/contrib\')"'
17+
bat 'R --slave -e "devtools::build(binary = TRUE, args = c(\'--preclean\'), path = \'C:/repo/bin/windows/contrib/3.6\')"'
18+
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\'))"'
19+
}
20+
}
21+
}
22+
post {
23+
success {
24+
mail to: '[email protected]',
25+
subject: "Build Success: ${currentBuild.fullDisplayName}",
26+
body: "Everything worked at ${env.BUILD_URL}"
27+
}
28+
failure {
29+
mail to: '[email protected]',
30+
subject: "Failed Pipeline: ${currentBuild.fullDisplayName}",
31+
body: "Something is wrong with ${env.BUILD_URL}"
32+
}
33+
}
34+
}

0 commit comments

Comments
 (0)