Skip to content

Instantly share code, notes, and snippets.

@dacr
Created May 10, 2017 14:04
Show Gist options
  • Save dacr/a2576dee980c5c9bd29cf538a093ca72 to your computer and use it in GitHub Desktop.
Save dacr/a2576dee980c5c9bd29cf538a093ca72 to your computer and use it in GitHub Desktop.
pipeline {
agent any
stages {
stage('init') {
steps {
script {
def sbtHome = tool 'sbt-0.13.15'
env.sbt= "${sbtHome}/bin/sbt -no-colors -batch"
}
}
}
stage('Build') {
steps {
sh "${sbt} 'set test in assembly := {}' assembly"
archive includes: 'target/scala-*/toto.jar'
}
}
stage('Test') {
when { branch 'master' }
agent { docker 'openjdk:7-jre' }
steps {
echo 'Hello, JDK'
sh 'java -version'
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment