Skip to content

Commit

Permalink
Improve deleting old images and containers
Browse files Browse the repository at this point in the history
  • Loading branch information
stggn committed Dec 14, 2018
1 parent 0d5ffff commit 14b2b17
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pipeline {

stage('Docker image') {
steps {
sh "docker rmi -f warp10io/warp10:latest"
sh "docker system prune --force --all --volumes --filter 'label=maintainer=contact@senx.io'"
sh "docker build -t warp10io/warp10:${version} --build-arg WARP10_VERSION=${version} ."
sh "docker build -t warp10io/warp10:${version}-ci predictible-tokens-for-ci"
sh "docker tag warp10io/warp10:${version} warp10io/warp10"
Expand All @@ -60,9 +60,7 @@ pipeline {
sh "docker push warp10io/warp10:${version}"
sh "docker push warp10io/warp10:${version}-ci"
sh "docker push warp10io/warp10:latest"
sh "docker rmi warp10io/warp10:${version}"
sh "docker rmi warp10io/warp10:${version}-ci"
sh "docker rmi warp10io/warp10:latest"
sh "docker system prune --force --all --volumes --filter 'label=maintainer=contact@senx.io'"
this.notifyBuild('PUBLISHED', version)
}
}
Expand Down

0 comments on commit 14b2b17

Please sign in to comment.