From 7810fb668913f7a55aabaf6332261034313675f1 Mon Sep 17 00:00:00 2001 From: mario Date: Sat, 28 Sep 2019 14:16:29 +0200 Subject: [PATCH] Add jenkinsfile --- Jenkinsfile | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..17a2eab --- /dev/null +++ b/Jenkinsfile @@ -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: 'support@quantargo.com', + subject: "Build Success: ${currentBuild.fullDisplayName}", + body: "Everything worked at ${env.BUILD_URL}" + } + failure { + mail to: 'support@quantargo.com', + subject: "Failed Pipeline: ${currentBuild.fullDisplayName}", + body: "Something is wrong with ${env.BUILD_URL}" + } + } +} \ No newline at end of file