mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-19 14:05:50 +00:00
Fixing jenkisfile
This commit is contained in:
parent
60cc11f9a2
commit
1e4ed072bc
1 changed files with 14 additions and 5 deletions
19
Jenkinsfile
vendored
19
Jenkinsfile
vendored
|
@ -24,16 +24,25 @@ pipeline {
|
|||
|
||||
stage('Sonar') {
|
||||
steps {
|
||||
sh 'mvn sonar:sonar -Dsonar.projectKey=villegasnaty_spring-petclinic -Dsonar.organization=villegasnaty-github -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=5f3fd10f7702318ee919ea4d55890502510b2448'
|
||||
}
|
||||
}
|
||||
sh 'mvn sonar:sonar -Dsonar.projectKey=villegasnaty_spring-petclinic -Dsonar.organization=villegasnaty-github -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=5f3fd10f7702318ee919ea4d55890502510b2448'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Build Container') {
|
||||
steps {
|
||||
echo 'Building..'
|
||||
sh 'docker rmi --force "natyramone/pet-clinic"'
|
||||
sh 'docker build -t pet-clinic .'
|
||||
sh 'docker tag pet-clinic $DOCKER_USER/pet-clinic:latest'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
stage('Run local container') {
|
||||
agent any
|
||||
steps {
|
||||
sh 'docker rm -f natyramone/pet-clinic:latest || true'
|
||||
sh 'docker run -d -p 8081:8080 natyramone/pet-clinic:latest'
|
||||
sh 'docker rm -f pet-clinic || true'
|
||||
sh 'docker run -d -p 8081:8080 --name pet-clinic natyramone/pet-clinic:latest'
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue