mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-16 12:45:48 +00:00
added jenkinfile
This commit is contained in:
parent
98a7101c04
commit
f3d3a1f33a
1 changed files with 34 additions and 0 deletions
34
jenkinfile
Normal file
34
jenkinfile
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
pipeline {
|
||||||
|
agent any
|
||||||
|
tools {
|
||||||
|
maven 'Maven' // Ensure Maven is installed in Jenkins
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Clone the project') {
|
||||||
|
steps {
|
||||||
|
git branch: 'main', url: 'https://github.com/pranavi-23/spring-petclinic.git'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Build the project') {
|
||||||
|
steps {
|
||||||
|
sh 'mvn clean install'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Test') {
|
||||||
|
steps {
|
||||||
|
sh 'mvn test'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Publish the Test results') {
|
||||||
|
steps {
|
||||||
|
junit 'target/surefire-reports/*.xml'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Publish the artifacts results') {
|
||||||
|
steps {
|
||||||
|
archiveArtifacts artifacts: 'target/*.jar', followSymlinks: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue