diff --git a/jenkinsfile b/jenkinsfile new file mode 100644 index 000000000..9acb62687 --- /dev/null +++ b/jenkinsfile @@ -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' + } + } + } +}