Skip to content

Instantly share code, notes, and snippets.

@Avik1993
Forked from muuki88/jenkins-sbt.groovy
Created August 2, 2019 09:40
Show Gist options
  • Save Avik1993/1ebf64266ed68c875dc39415e6a0e33d to your computer and use it in GitHub Desktop.
Save Avik1993/1ebf64266ed68c875dc39415e6a0e33d to your computer and use it in GitHub Desktop.
Jenkins 2.0 SBT build pipeline
node {
stage('Git') {
git 'https://github.com/muuki88/activator-play-cluster-sample.git'
}
stage('Build') {
def builds = [:]
builds['scala'] = {
// assumes you have the sbt plugin installed and created an sbt installation named 'sbt-0.13.13'
sh "${tool name: 'sbt-0.13.13', type: 'org.jvnet.hudson.plugins.SbtPluginBuilder$SbtInstallation'}/bin/sbt compile test"
}
builds['frontend'] = {
echo 'building the frontend'
}
parallel builds
}
stage('Results') {
junit '**/target/test-reports/*.xml'
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment