Create jenkinsfile

Signed-off-by: vinayasuresh <Vinaya@pionedata.com>
This commit is contained in:
vinayasuresh 2025-06-23 12:20:35 +05:30 committed by GitHub
parent b2a169a44c
commit 4d7c890483
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

27
jenkinsfile Normal file
View 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'
}
}
}
}