mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-21 06:45:49 +00:00
Create jenkinsfile
Create Sample Jenkins File
This commit is contained in:
parent
adb702feb5
commit
ef1fca9267
1 changed files with 25 additions and 0 deletions
25
jenkinsfile
Normal file
25
jenkinsfile
Normal file
|
@ -0,0 +1,25 @@
|
|||
node {
|
||||
def mvnHome
|
||||
stage('Preparation') { // for display purposes
|
||||
// Get some code from a GitHub repository
|
||||
git '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.
|
||||
mvnHome = tool 'M3'
|
||||
}
|
||||
stage('Build') {
|
||||
// Run the maven build
|
||||
withEnv(["MVN_HOME=$mvnHome"]) {
|
||||
if (isUnix()) {
|
||||
sh '"$MVN_HOME/bin/mvn" -Dmaven.test.failure.ignore clean package'
|
||||
} else {
|
||||
bat(/"%MVN_HOME%\bin\mvn" -Dmaven.test.failure.ignore clean package/)
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Results') {
|
||||
junit '**/target/surefire-reports/TEST-*.xml'
|
||||
archiveArtifacts 'target/*.jar'
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue