manage artifacts
Some checks failed
dockers/debian/pipeline/head There was a failure building this commit
Some checks failed
dockers/debian/pipeline/head There was a failure building this commit
This commit is contained in:
parent
f248913ce8
commit
caf07e253a
1 changed files with 5 additions and 1 deletions
6
Jenkinsfile
vendored
6
Jenkinsfile
vendored
|
@ -9,7 +9,7 @@ pipeline {
|
||||||
steps {
|
steps {
|
||||||
withDockerRegistry([ credentialsId: "6ff44976-23cd-4cc2-902c-de8c340e65e5", url: "https://reg.zknt.org" ]) {
|
withDockerRegistry([ credentialsId: "6ff44976-23cd-4cc2-902c-de8c340e65e5", url: "https://reg.zknt.org" ]) {
|
||||||
script {
|
script {
|
||||||
def customImage = docker.build("reg.zknt.org/zknt/debian", "--build-arg DATE=$timeStamp --build-arg GOSU_VERSION=$gosu_version --build-arg DUMB_INIT_VERSION=$dumb_init_version --no-cache --pull .")
|
def customImage = docker.build("reg.zknt.org/zknt/debian", "--pull --build-arg DATE=$timeStamp --build-arg GOSU_VERSION=$gosu_version --build-arg DUMB_INIT_VERSION=$dumb_init_version --no-cache .")
|
||||||
customImage.push("buster")
|
customImage.push("buster")
|
||||||
customImage.push("stable")
|
customImage.push("stable")
|
||||||
customImage.push("10")
|
customImage.push("10")
|
||||||
|
@ -26,6 +26,10 @@ pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
post {
|
post {
|
||||||
|
success {
|
||||||
|
sh """docker rmi -f \$(docker images -q $registry/$repo/$project:$version)"""
|
||||||
|
sh """for image in \$(grep FROM Dockerfile | cut -d ' ' -f 2); do docker rmi -f \$(docker images -q \${image}); done"""
|
||||||
|
}
|
||||||
always {
|
always {
|
||||||
emailext body: 'build finished', subject: '[jenkins] docker debian: ' + currentBuild.result, to: 'cg@zknt.org', from: 'sysadm@zknt.org', attachLog: true
|
emailext body: 'build finished', subject: '[jenkins] docker debian: ' + currentBuild.result, to: 'cg@zknt.org', from: 'sysadm@zknt.org', attachLog: true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue