Created
February 5, 2020 20:17
-
-
Save jbleduigou/13ec96c7cbb93a6be08a37908ce3778d to your computer and use it in GitHub Desktop.
boucles.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/groovy | |
pipeline { | |
agent any | |
tools { | |
// Install the Maven version configured as "M3" and add it to the path. | |
maven "M3" | |
} | |
stages { | |
stage('Build') { | |
steps { | |
// Get the code from GitHub repository | |
git 'https://github.com/jbleduigou/boucles.git' | |
// Run Maven on the amazon linux agent. | |
sh "mvn clean package" | |
} | |
post { | |
// If Maven was able to run the tests, even if some of the test | |
// failed, record the test results and archive the jar file. | |
success { | |
junit '**/target/surefire-reports/TEST-*.xml' | |
archiveArtifacts 'target/boucles*.jar' | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment