mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-21 07:15:49 +00:00
Create Jenkinsfile
This commit is contained in:
parent
aa9b9e7f43
commit
f5eea344bd
1 changed files with 39 additions and 0 deletions
39
Jenkinsfile
vendored
Normal file
39
Jenkinsfile
vendored
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
pipeline {
|
||||||
|
agent any
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage('Checkout') {
|
||||||
|
steps {
|
||||||
|
git 'https://github.com/spring-projects/spring-petclinic.git'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Build') {
|
||||||
|
steps {
|
||||||
|
// Using Maven to build the project
|
||||||
|
sh './mvnw clean install'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Test') {
|
||||||
|
steps {
|
||||||
|
// Run tests
|
||||||
|
sh './mvnw test'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Package') {
|
||||||
|
steps {
|
||||||
|
// Package the application
|
||||||
|
sh './mvnw package'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
post {
|
||||||
|
always {
|
||||||
|
archiveArtifacts artifacts: 'target/*.jar', allowEmptyArchive: true
|
||||||
|
junit 'target/surefire-reports/*.xml'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue