mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-27 17:35: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 {
|
pipeline {
|
||||||
|
|
||||||
agent any
|
agent none
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ pipeline {
|
||||||
dockerfile {
|
dockerfile {
|
||||||
filename 'Dockerfile.build'
|
filename 'Dockerfile.build'
|
||||||
dir '.'
|
dir '.'
|
||||||
args '-v $HOME/.m2:/root/.m2 -v ./app:/root/app'
|
args '-v $HOME/.m2:/root/.m2 -v $HOME/app:/root/app'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
steps {
|
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') {
|
stage('Run') {
|
||||||
agent {
|
agent {
|
||||||
dockerfile {
|
dockerfile {
|
||||||
filename 'Dockerfile.run'
|
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 {
|
steps {
|
||||||
echo 'App Running'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue