Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sandro/video55 #68

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update Jenkinsfile_part_1
  • Loading branch information
mj-maclife authored Mar 27, 2021
commit a8a1b6560242a390e8b6b7dbdc72e27d6556f97c
6 changes: 3 additions & 3 deletions section_4/code/cd_pipeline/Jenkinsfile_part_1
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ def deploy(environment) {
System.exit(0)
}

//sh "docker ps -f name=${containerName} -q | xargs --no-run-if-empty docker stop"
//sh "docker ps -a -f name=${containerName} -q | xargs -r docker rm"
//sh "docker run -d -p ${port}:5000 --name ${containerName} hands-on-jenkins/myapp:${BUILD_NUMBER}"
sh "docker ps -f name=${containerName} -q | xargs --no-run-if-empty docker stop"
sh "docker ps -a -f name=${containerName} -q | xargs -r docker rm"
sh "docker run -d -p ${port}:5000 --name ${containerName} hands-on-jenkins/myapp:${BUILD_NUMBER}"

}