Skip to content

Instantly share code, notes, and snippets.

@ricardogarfe
Created November 6, 2017 08:48
Show Gist options
  • Save ricardogarfe/d94e61994a71eff293e5ba4e2f10bb80 to your computer and use it in GitHub Desktop.
Save ricardogarfe/d94e61994a71eff293e5ba4e2f10bb80 to your computer and use it in GitHub Desktop.
node {
// Mark the code checkout 'stage'....
stage 'Checkout'
checkout scm
stage 'Configure'
env.PATH = "${tool 'Maven 3'}/bin:${env.PATH}"
// Mark the code build 'stage'....
stage('Build') {
// Run the maven build
sh “mvn clean verify -Dmaven.test.failure.ignore=true”
}
stage('SonarQube analysis') {
withSonarQubeEnv('Sonarqube') {
sh 'mvn sonar:sonar'
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment