mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-27 09:25:49 +00:00
fixing volumes and mysql connection
This commit is contained in:
parent
5f384351ca
commit
9f0baac9d6
1 changed files with 10 additions and 4 deletions
14
Jenkinsfile
vendored
14
Jenkinsfile
vendored
|
@ -1,6 +1,6 @@
|
|||
pipeline {
|
||||
|
||||
agent any
|
||||
agent none
|
||||
|
||||
stages {
|
||||
|
||||
|
@ -9,7 +9,7 @@ pipeline {
|
|||
dockerfile {
|
||||
filename 'Dockerfile.build'
|
||||
dir '.'
|
||||
args '-v $HOME/.m2:/root/.m2 -v ./app:/root/app'
|
||||
args '-v $HOME/.m2:/root/.m2 -v $HOME/app:/root/app'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
|
@ -17,15 +17,21 @@ pipeline {
|
|||
}
|
||||
}
|
||||
|
||||
stage('MySQL setup') {
|
||||
steps {
|
||||
sh 'docker run --network petclinic -e MYSQL_USER=petclinic -e MYSQL_PASSWORD=petclinic -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=petclinic -p 3306:3306 mysql:5.7.8'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Run') {
|
||||
agent {
|
||||
dockerfile {
|
||||
filename 'Dockerfile.run'
|
||||
args '-v $HOME/.m2:/root/.m2 -v ./app:/root/app'
|
||||
args '-v $HOME/.m2:/root/.m2 -v $HOME/app:/root/app --network petclinic'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
echo 'App Running'
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue