Alignment with readme & mypetclinic.sh clean fix

This commit is contained in:
Krishna 2024-03-08 12:36:32 -08:00
parent 54bf5c3fea
commit a8b3bbf251
3 changed files with 6 additions and 4 deletions

2
Jenkinsfile vendored
View file

@ -50,7 +50,7 @@ node {
} // stage: Jacoo
} // parallel
} // stage: tests
stage ("Docker") {
stage ("Container") {
stage('build') {
sh """ #!/bin/bash
docker image build -f Dockerfile -t ${projectName}:${env.BUILD_ID} .

View file

@ -23,6 +23,7 @@ clean() {
docker image prune -a -f --filter "until=1h"
docker container prune -f --filter "until=1h"
docker system prune -f --filter "until=1h"
sleep 3
docker rmi -f $(docker images -aq)
}
startContainer() {
@ -45,6 +46,7 @@ stopContainer() {
printf "\n -------- Stop container: ${containerName} -------- \n "
# docker container stop ${docker container ls -a | grep postgres | awk '{print $1}'}
docker stop $containerName -t 0
sleep 5
docker rm -f $containerName
}

View file

@ -9,7 +9,7 @@ Develop a DevOps pipeline to automate tasks such as code compile, unit testing,
Note: This process with not deploy to the envionrmnet platform.
### Changelog
- Original readme.md renamed as readme-orignial.md
- The original 'readme.md' file has been renamed to 'readme-orignial.md'.
- Add new files
- readme.md
- Dockerfile
@ -57,7 +57,7 @@ This sub-stage generates Jacoco code coverage reports using Apache Maven command
`````
mvn jacoco:report
`````
#### Stage: Docker
#### Stage: Container
The stage 'Docker' contains the following sub-stages:
##### build
This sub-stage builds the Docker image using the Dockerfile. The image is tagged with the project name and the Jenkins build ID.