pipeline
This commit is contained in:
@@ -46,13 +46,15 @@ pipeline {
|
||||
|
||||
stage('dockerizing'){
|
||||
steps{
|
||||
sh 'docker build . -t crypto/drop-the-bit'
|
||||
sh 'docker build -t jenkins/cryptoapp .'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Deploy') {
|
||||
steps {
|
||||
sh 'docker run -d -p 40005:40005 --name crypto_drop-the-bit crypto/drop-the-bit'
|
||||
sh 'docker ps -q --filter "name=jenkins-cryptoapp" | grep -q . && docker stop jenkins-cryptoapp && docker rm jenkins-cryptoapp | true'
|
||||
sh 'docker run -p 8090:8080 -d --name=jenkins-cryptoapp jenkins/cryptoapp'
|
||||
sh 'docker rmi -f $(docker images -f "dangling=true" -q) || true'
|
||||
}
|
||||
|
||||
post {
|
||||
|
||||
Reference in New Issue
Block a user