jenkins fixup

This commit is contained in:
hllvc 2021-07-11 12:19:01 +02:00
parent 2edd04b1b1
commit caa1a1b4ca

21
Jenkinsfile vendored
View file

@ -4,6 +4,10 @@ pipeline {
stages { stages {
stage('Clone Repo') {
checkout scm
}
stage('Build') { stage('Build') {
agent { agent {
dockerfile { dockerfile {
@ -25,14 +29,17 @@ pipeline {
} }
stage('Run') { stage('Run') {
agent { def app = docker.build('petclinic-app:${env.BUILD_ID}', '-f Dockerfile.run')
dockerfile { app.push()
filename 'Dockerfile.run' app.push('latest')
args '-v $HOME/.m2:/root/.m2 -v $HOME/app:/root/app --network petclinic -t petclinic-app' /* agent { */
} /* dockerfile { */
} /* filename 'Dockerfile.run' */
/* args '-v $HOME/.m2:/root/.m2 -v $HOME/app:/root/app --network petclinic -t petclinic-app' */
/* } */
/* } */
steps { steps {
sh 'docker run --network petclinic -p8080:3000 -v $HOME/app:/root/app petclinic-app' sh 'docker run --network petclinic -p8080:3000 -v $HOME/app:/root/app petclinic-app:latest'
} }
} }