Skip to content

Instantly share code, notes, and snippets.

@mattstep
Created December 7, 2016 18:29
Show Gist options
  • Save mattstep/0f3abde47f828b20022c829f73fc24c7 to your computer and use it in GitHub Desktop.
Save mattstep/0f3abde47f828b20022c829f73fc24c7 to your computer and use it in GitHub Desktop.
Sample Jenkinsfile
timestamps {
node('my-docker-agent-template') {
withDir('work') {
checkout scm
withEnv(["JAVA_HOME=${tool 'jdk8' }",
"PATH+MAVEN=${tool 'maven3'}/bin:${env.JAVA_HOME}/bin"]) {
sh 'mvn clean install'
}
junit 'target/surefire-reports/**/*.xml'
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment