mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-21 07:15:49 +00:00
Alignment with readme & mypetclinic.sh clean fix
This commit is contained in:
parent
54bf5c3fea
commit
a8b3bbf251
3 changed files with 6 additions and 4 deletions
2
Jenkinsfile
vendored
2
Jenkinsfile
vendored
|
@ -50,7 +50,7 @@ node {
|
||||||
} // stage: Jacoo
|
} // stage: Jacoo
|
||||||
} // parallel
|
} // parallel
|
||||||
} // stage: tests
|
} // stage: tests
|
||||||
stage ("Docker") {
|
stage ("Container") {
|
||||||
stage('build') {
|
stage('build') {
|
||||||
sh """ #!/bin/bash
|
sh """ #!/bin/bash
|
||||||
docker image build -f Dockerfile -t ${projectName}:${env.BUILD_ID} .
|
docker image build -f Dockerfile -t ${projectName}:${env.BUILD_ID} .
|
||||||
|
|
|
@ -23,6 +23,7 @@ clean() {
|
||||||
docker image prune -a -f --filter "until=1h"
|
docker image prune -a -f --filter "until=1h"
|
||||||
docker container prune -f --filter "until=1h"
|
docker container prune -f --filter "until=1h"
|
||||||
docker system prune -f --filter "until=1h"
|
docker system prune -f --filter "until=1h"
|
||||||
|
sleep 3
|
||||||
docker rmi -f $(docker images -aq)
|
docker rmi -f $(docker images -aq)
|
||||||
}
|
}
|
||||||
startContainer() {
|
startContainer() {
|
||||||
|
@ -45,6 +46,7 @@ stopContainer() {
|
||||||
printf "\n -------- Stop container: ${containerName} -------- \n "
|
printf "\n -------- Stop container: ${containerName} -------- \n "
|
||||||
# docker container stop ${docker container ls -a | grep postgres | awk '{print $1}'}
|
# docker container stop ${docker container ls -a | grep postgres | awk '{print $1}'}
|
||||||
docker stop $containerName -t 0
|
docker stop $containerName -t 0
|
||||||
|
sleep 5
|
||||||
docker rm -f $containerName
|
docker rm -f $containerName
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,8 +8,8 @@ Develop a DevOps pipeline to automate tasks such as code compile, unit testing,
|
||||||
|
|
||||||
Note: This process with not deploy to the envionrmnet platform.
|
Note: This process with not deploy to the envionrmnet platform.
|
||||||
|
|
||||||
### Change log
|
### Changelog
|
||||||
- Original readme.md renamed as readme-orignial.md
|
- The original 'readme.md' file has been renamed to 'readme-orignial.md'.
|
||||||
- Add new files
|
- Add new files
|
||||||
- readme.md
|
- readme.md
|
||||||
- Dockerfile
|
- Dockerfile
|
||||||
|
@ -57,7 +57,7 @@ This sub-stage generates Jacoco code coverage reports using Apache Maven command
|
||||||
`````
|
`````
|
||||||
mvn jacoco:report
|
mvn jacoco:report
|
||||||
`````
|
`````
|
||||||
#### Stage: Docker
|
#### Stage: Container
|
||||||
The stage 'Docker' contains the following sub-stages:
|
The stage 'Docker' contains the following sub-stages:
|
||||||
##### build
|
##### build
|
||||||
This sub-stage builds the Docker image using the Dockerfile. The image is tagged with the project name and the Jenkins build ID.
|
This sub-stage builds the Docker image using the Dockerfile. The image is tagged with the project name and the Jenkins build ID.
|
||||||
|
|
Loading…
Reference in a new issue