fix cleanup
Some checks reported errors
dockers/debian/pipeline/head Something is wrong with the build of this commit

This commit is contained in:
chris 2020-10-29 15:56:58 +01:00
parent 8bf12780a6
commit 5596d9364d

2
Jenkinsfile vendored
View file

@ -47,7 +47,7 @@ pipeline {
success { success {
sh """docker image prune -f""" sh """docker image prune -f"""
sh """docker rmi -f \$(docker images -q $registry/$repo/$project:$version)""" sh """docker rmi -f \$(docker images -q $registry/$repo/$project:$version)"""
sh """for image in \$(grep FROM Dockerfile | cut -d ' ' -f 2 | grep -vi SCRATCH | uniq); do docker rmi -f \$(docker images -q \${image}); done""" sh """for image in \$(grep FROM Dockerfile | cut -d ' ' -f 2 | grep -vi -e SCRATCH -e bootstrapped | uniq); do docker rmi -f \$(docker images -q \${image}); done"""
} }
always { always {
emailext body: 'build finished', subject: '[jenkins] docker '+project+'('+version+'): ' + currentBuild.result, to: 'cg@zknt.org', from: 'sysadm@zknt.org', attachLog: true emailext body: 'build finished', subject: '[jenkins] docker '+project+'('+version+'): ' + currentBuild.result, to: 'cg@zknt.org', from: 'sysadm@zknt.org', attachLog: true