mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-26 17:35:49 +00:00
supports jenkinsfile with dockerfile
This commit is contained in:
parent
33a55bf51b
commit
2afdb382b6
1 changed files with 16 additions and 13 deletions
21
Jenkinsfile
vendored
21
Jenkinsfile
vendored
|
@ -1,15 +1,18 @@
|
||||||
pipeline {
|
node {
|
||||||
agent { dockerfile true }
|
stage("Clone the project") {
|
||||||
stages {
|
git branch: 'main', url: 'https://github.com/sukrucakmak/spring-petclinic.git'
|
||||||
stage('Build') {
|
|
||||||
steps {
|
|
||||||
sh 'mvn clean install'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stage("Compilation") {
|
||||||
|
sh "./mvnw clean install -DskipTests"
|
||||||
}
|
}
|
||||||
stage('Test') {
|
|
||||||
steps {
|
stage("Tests and Deployment") {
|
||||||
sh 'java --version'
|
stage("Runing unit tests") {
|
||||||
|
sh "./mvnw test -Punit"
|
||||||
}
|
}
|
||||||
|
stage("Deployment") {
|
||||||
|
sh 'nohup ./mvnw spring-boot:run -Dserver.port=8001 &'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue