mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-17 05:15:50 +00:00
Create jenkinsfile
Signed-off-by: vinayasuresh <Vinaya@pionedata.com>
This commit is contained in:
parent
b2a169a44c
commit
4d7c890483
1 changed files with 27 additions and 0 deletions
27
jenkinsfile
Normal file
27
jenkinsfile
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
pipeline {
|
||||||
|
agent any
|
||||||
|
|
||||||
|
environment {
|
||||||
|
IMAGE_NAME = 'app'
|
||||||
|
}
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage('Clone') {
|
||||||
|
steps {
|
||||||
|
git 'https://github.com/vinayasuresh/spring-petclinic'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Build Docker Image') {
|
||||||
|
steps {
|
||||||
|
sh 'docker build -t $IMAGE_NAME .'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Run Container') {
|
||||||
|
steps {
|
||||||
|
sh 'docker run -d --rm --name spring-petfield -p 3000:3000 $IMAGE_NAME'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue