mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-30 03:05:49 +00:00
adding Jenkinsfile
This commit is contained in:
parent
214d78da5e
commit
351210791e
1 changed files with 22 additions and 0 deletions
22
Jenkinsfile
vendored
Normal file
22
Jenkinsfile
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
pipeline {
|
||||
agent any
|
||||
tools{
|
||||
maven '3.9.0'
|
||||
}
|
||||
stages{
|
||||
stage('Get Code and Build App'){
|
||||
steps{
|
||||
checkout scmGit(branches: [[name: '*/main']], extensions: [], userRemoteConfigs: [[url: 'https://github.com/mansiboriya/spring-petclinic']])
|
||||
sh 'docker build -t springpetclinic:test -f Dockerfile.test .'
|
||||
sh 'docker run springpetclinic:test'
|
||||
}
|
||||
}
|
||||
stage('Build docker image'){
|
||||
steps{
|
||||
script{
|
||||
sh 'docker build -t springpetclinic:latest .'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue