Skip to content

Instantly share code, notes, and snippets.

@CSchulz
Created May 25, 2016 10:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CSchulz/178cdd3852e9b86937e8eebc4e9334b2 to your computer and use it in GitHub Desktop.
Save CSchulz/178cdd3852e9b86937e8eebc4e9334b2 to your computer and use it in GitHub Desktop.
Jenkins Pipeline
node {
// Mark the code checkout 'stage'....
stage 'Checkout'
// Get some code from a GitHub repository
git url: 'https://github.com/jglick/simple-maven-project-with-tests.git'
// Get the maven tool.
// ** NOTE: This 'M3' maven tool must be configured
// ** in the global configuration.
def mvnHome = tool 'M3'
// Mark the code build 'stage'....
stage 'Build'
// Run the maven build
sh "${mvnHome}/bin/mvn clean install"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment