From b21abfa57813f4e8780e6aa93d2fc3e380ac72b8 Mon Sep 17 00:00:00 2001 From: chris Date: Sat, 30 May 2020 03:26:20 +0200 Subject: [PATCH 01/22] 3.12.0 --- Dockerfile | 2 +- Jenkinsfile | 2 +- README.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index f6accfe..45a9a18 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM alpine as build ARG VERSION -ENV ALPINE_SERIES 3.11 +ENV ALPINE_SERIES 3.12 ENV ALPINE_MIRROR https://uk.alpinelinux.org/alpine/v${ALPINE_SERIES} ENV ALPINE_ARCH x86_64 diff --git a/Jenkinsfile b/Jenkinsfile index 7c7d148..3a5fb0a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,6 +1,6 @@ project = "alpine" repo = "zknt" -version = "3.11.6" +version = "3.12.0" registry = "reg.zknt.org" registry_credentials = "6ff44976-23cd-4cc2-902c-de8c340e65e5" diff --git a/README.md b/README.md index f3f1543..d95a05d 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ stock alpine Basic Alpine base image, pulling Alpines minirootfs and extracting to `scratch`. -Builds both `edge` and latest release (currently `3.11`) in branches. +Builds both `edge` and latest release (currently `3.12`) in branches. Source repository: https://git.zknt.org/dockers/alpine From 5072eef93dfe45b5269b6350a1487dc2b639c827 Mon Sep 17 00:00:00 2001 From: chris Date: Sun, 31 May 2020 16:29:11 +0200 Subject: [PATCH 02/22] add date label, switch mirror --- Dockerfile | 6 +++--- Jenkinsfile | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 45a9a18..8ff8a44 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM alpine as build ARG VERSION ENV ALPINE_SERIES 3.12 -ENV ALPINE_MIRROR https://uk.alpinelinux.org/alpine/v${ALPINE_SERIES} +ENV ALPINE_MIRROR https://ftp.halifax.rwth-aachen.de/alpine/v${ALPINE_SERIES} ENV ALPINE_ARCH x86_64 WORKDIR /root @@ -17,7 +17,7 @@ RUN set -xo pipefail; apk add --no-cache curl gnupg &&\ FROM scratch ARG VERSION -LABEL version.alpine=$VERSION +ARG DATE COPY --from=build /dest / CMD ["/bin/sh"] - +LABEL version.alpine=$VERSION build.date=$DATE diff --git a/Jenkinsfile b/Jenkinsfile index 3a5fb0a..8d20711 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -3,6 +3,7 @@ repo = "zknt" version = "3.12.0" registry = "reg.zknt.org" registry_credentials = "6ff44976-23cd-4cc2-902c-de8c340e65e5" +timeStamp = Calendar.getInstance().getTime().format('YYYY-MM-dd',TimeZone.getTimeZone('UTC')) pipeline { agent any @@ -12,7 +13,7 @@ pipeline { withDockerRegistry([ credentialsId: registry_credentials, url: "https://"+registry ]) { echo 'Starting to build docker image' script { - def customImage = docker.build(registry+'/'+repo+'/'+project, "--build-arg VERSION=$version .") + def customImage = docker.build(registry+'/'+repo+'/'+project, "--build-arg VERSION=$version --build-arg DATE=$timeStamp .") customImage.push(version) customImage.push(version.split(/\./)[0,1].join('.')) customImage.push(version.split(/\./)[0]) From fb3f490148375a54b09a2a4e7622821959424fee Mon Sep 17 00:00:00 2001 From: chris Date: Sun, 31 May 2020 16:34:45 +0200 Subject: [PATCH 03/22] preinstall ca-certificates and curl --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 8ff8a44..2d67410 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,5 +19,6 @@ FROM scratch ARG VERSION ARG DATE COPY --from=build /dest / +RUN apk add --no-cache ca-certificates curl CMD ["/bin/sh"] LABEL version.alpine=$VERSION build.date=$DATE From b87b11572e8b0b0835f5d4983fc7c70b3db91dbb Mon Sep 17 00:00:00 2001 From: chris Date: Sun, 31 May 2020 16:34:45 +0200 Subject: [PATCH 04/22] preinstall ca-certificates --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 8ff8a44..9c9220a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,5 +19,6 @@ FROM scratch ARG VERSION ARG DATE COPY --from=build /dest / +RUN apk add --no-cache ca-certificates CMD ["/bin/sh"] LABEL version.alpine=$VERSION build.date=$DATE From ae1da58a9088fe2d8d5d9ddfd456767a3c1a8cbb Mon Sep 17 00:00:00 2001 From: chris Date: Wed, 26 Aug 2020 15:02:34 +0200 Subject: [PATCH 05/22] push to quay --- Jenkinsfile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 8d20711..05a82b1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -27,6 +27,15 @@ pipeline { sh "docker push " + official_image sh "docker push " + official_image.split(/\:/)[0] } + + quay_credentials= "18fb6f7e-c6bc-4d06-9bf9-08c2af6bfc1a" + withDockerRegistry([ credentialsId: quay_registry_credentials, url: "https://quay.io" ]) { + def official_image = 'https://quay.io'+repo+'/'+project+':'+version.split(/\./)[0,1].join('.') + sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + official_image + sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + official_image.split(/\:/)[0] + sh "docker push " + official_image + sh "docker push " + official_image.split(/\:/)[0] + } } } } From ec7cb46d55b8545a0ddbe349a82646b1cb2e3909 Mon Sep 17 00:00:00 2001 From: chris Date: Wed, 26 Aug 2020 15:07:26 +0200 Subject: [PATCH 06/22] specify keyserver --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 2d67410..264bbab 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ WORKDIR /root RUN set -xo pipefail; apk add --no-cache curl gnupg &&\ curl -LO ${ALPINE_MIRROR}/releases/${ALPINE_ARCH}/alpine-minirootfs-${VERSION}-${ALPINE_ARCH}.tar.gz &&\ curl -LO ${ALPINE_MIRROR}/releases/${ALPINE_ARCH}/alpine-minirootfs-${VERSION}-${ALPINE_ARCH}.tar.gz.asc &&\ - gpg --recv 0482D84022F52DF1C4E7CD43293ACD0907D9495A &&\ + gpg --keyserver pool.sks-keyservers.net --recv 0482D84022F52DF1C4E7CD43293ACD0907D9495A &&\ gpg --verify alpine-minirootfs-${VERSION}-${ALPINE_ARCH}.tar.gz.asc alpine-minirootfs-${VERSION}-${ALPINE_ARCH}.tar.gz &&\ mkdir /dest &&\ tar -C /dest -xvzf alpine-minirootfs-${VERSION}-${ALPINE_ARCH}.tar.gz &&\ From ec22356fead5827f419cc59b968b366ead60c80b Mon Sep 17 00:00:00 2001 From: chris Date: Wed, 26 Aug 2020 15:08:52 +0200 Subject: [PATCH 07/22] var fix --- Jenkinsfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 05a82b1..46bfcfb 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -19,8 +19,8 @@ pipeline { customImage.push(version.split(/\./)[0]) customImage.push("latest") - registry_credentials = "3deeee3d-6fce-4430-98dd-9b4db56f43f7" - withDockerRegistry([ credentialsId: registry_credentials ]) { + def io_registry_credentials = "3deeee3d-6fce-4430-98dd-9b4db56f43f7" + withDockerRegistry([ credentialsId: io_registry_credentials ]) { def official_image = repo+'/'+project+':'+version.split(/\./)[0,1].join('.') sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + official_image sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + official_image.split(/\:/)[0] @@ -28,9 +28,9 @@ pipeline { sh "docker push " + official_image.split(/\:/)[0] } - quay_credentials= "18fb6f7e-c6bc-4d06-9bf9-08c2af6bfc1a" - withDockerRegistry([ credentialsId: quay_registry_credentials, url: "https://quay.io" ]) { - def official_image = 'https://quay.io'+repo+'/'+project+':'+version.split(/\./)[0,1].join('.') + def quay_credentials= "18fb6f7e-c6bc-4d06-9bf9-08c2af6bfc1a" + withDockerRegistry([ credentialsId: quay_credentials, url: "https://quay.io" ]) { + def official_image = 'quay.io/'+repo+'/'+project+':'+version.split(/\./)[0,1].join('.') sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + official_image sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + official_image.split(/\:/)[0] sh "docker push " + official_image From a2ff103a2daef6211b86e02e404ba09c7596f83d Mon Sep 17 00:00:00 2001 From: chris Date: Thu, 22 Oct 2020 18:00:37 +0200 Subject: [PATCH 08/22] 3.12.1 --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 46bfcfb..3215f57 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,6 +1,6 @@ project = "alpine" repo = "zknt" -version = "3.12.0" +version = "3.12.1" registry = "reg.zknt.org" registry_credentials = "6ff44976-23cd-4cc2-902c-de8c340e65e5" timeStamp = Calendar.getInstance().getTime().format('YYYY-MM-dd',TimeZone.getTimeZone('UTC')) From 0d293e4fcff674075900b34c79e2f11cae5c34e9 Mon Sep 17 00:00:00 2001 From: chris Date: Fri, 23 Oct 2020 19:49:27 +0200 Subject: [PATCH 09/22] manage artifacts --- Jenkinsfile | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3215f57..b557eab 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -13,7 +13,7 @@ pipeline { withDockerRegistry([ credentialsId: registry_credentials, url: "https://"+registry ]) { echo 'Starting to build docker image' script { - def customImage = docker.build(registry+'/'+repo+'/'+project, "--build-arg VERSION=$version --build-arg DATE=$timeStamp .") + def customImage = docker.build(registry+'/'+repo+'/'+project, "--pull --build-arg VERSION=$version --build-arg DATE=$timeStamp .") customImage.push(version) customImage.push(version.split(/\./)[0,1].join('.')) customImage.push(version.split(/\./)[0]) @@ -43,8 +43,36 @@ pipeline { } 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 { emailext body: 'build finished', subject: '[jenkins] docker '+project+': ' + currentBuild.result, to: 'cg@zknt.org', from: 'sysadm@zknt.org', attachLog: true } } + options { + buildDiscarder(BuildHistoryManager([ + [ + conditions: [ + BuildResult(matchFailure: true) + ], + matchAtMost: 4, + continueAfterMatch: false + ], + [ + conditions: [ + BuildResult(matchSuccess: true) + ], + matchAtMost: 4, + continueAfterMatch: false + ], + [ + conditions: [ + BuildResult(matchSuccess: true, matchFailure: true) + ], + actions: [DeleteBuild()] + ] + ])) + } } From 90f3292d9dcdbd565d1e0dbe198ccc1212d49ea5 Mon Sep 17 00:00:00 2001 From: chris Date: Wed, 28 Oct 2020 16:46:30 +0100 Subject: [PATCH 10/22] generate jenkinsfile --- Jenkinsfile | 61 +++++++++++++++++++++++++++-------------------------- build.yaml | 5 +++++ 2 files changed, 36 insertions(+), 30 deletions(-) create mode 100644 build.yaml diff --git a/Jenkinsfile b/Jenkinsfile index b557eab..24b4fcb 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,46 +1,47 @@ +version = "3.12.1" project = "alpine" repo = "zknt" -version = "3.12.1" registry = "reg.zknt.org" registry_credentials = "6ff44976-23cd-4cc2-902c-de8c340e65e5" timeStamp = Calendar.getInstance().getTime().format('YYYY-MM-dd',TimeZone.getTimeZone('UTC')) pipeline { agent any - stages { - stage('Build image') { - steps { - withDockerRegistry([ credentialsId: registry_credentials, url: "https://"+registry ]) { - echo 'Starting to build docker image' - script { - def customImage = docker.build(registry+'/'+repo+'/'+project, "--pull --build-arg VERSION=$version --build-arg DATE=$timeStamp .") - customImage.push(version) - customImage.push(version.split(/\./)[0,1].join('.')) - customImage.push(version.split(/\./)[0]) - customImage.push("latest") + stages { + stage('Build image') { + steps { + withDockerRegistry([ credentialsId: registry_credentials, url: "https://"+registry ]) { + script { + def customImage = docker.build(registry+'/'+repo+'/'+project, "--pull --build-arg VERSION=$version --build-arg DATE=$timeStamp .") + customImage.push(version) + customImage.push("latest") + customImage.push("3.12") - def io_registry_credentials = "3deeee3d-6fce-4430-98dd-9b4db56f43f7" - withDockerRegistry([ credentialsId: io_registry_credentials ]) { - def official_image = repo+'/'+project+':'+version.split(/\./)[0,1].join('.') - sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + official_image - sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + official_image.split(/\:/)[0] - sh "docker push " + official_image - sh "docker push " + official_image.split(/\:/)[0] - } + def io_registry_credentials = "3deeee3d-6fce-4430-98dd-9b4db56f43f7" + withDockerRegistry([ credentialsId: io_registry_credentials ]) { + def io_registry_image = repo + '/' + project + ':' + version + sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + io_registry_image + sh "docker push " + io_registry_image + sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + io_registry_image.split(/\:/)[0] + "latest" + sh "docker push " + io_registry_image.split(/\:/)[0] + "latest" + sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + io_registry_image.split(/\:/)[0] + "3.12" + sh "docker push " + io_registry_image.split(/\:/)[0] + "3.12" + } - def quay_credentials= "18fb6f7e-c6bc-4d06-9bf9-08c2af6bfc1a" - withDockerRegistry([ credentialsId: quay_credentials, url: "https://quay.io" ]) { - def official_image = 'quay.io/'+repo+'/'+project+':'+version.split(/\./)[0,1].join('.') - sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + official_image - sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + official_image.split(/\:/)[0] - sh "docker push " + official_image - sh "docker push " + official_image.split(/\:/)[0] + def quay_credentials= "18fb6f7e-c6bc-4d06-9bf9-08c2af6bfc1a" + withDockerRegistry([ credentialsId: quay_credentials, url: "https://quay.io" ]) { + def quay_image = 'quay.io/' + repo + '/' + project + ':' + version + sh "docker push " + quay_image + sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + official_image.split(/\:/)[0] + "latest" + sh "docker push " + official_image.split(/\:/)[0] + "latest" + sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + official_image.split(/\:/)[0] + "3.12" + sh "docker push " + official_image.split(/\:/)[0] + "3.12" + } } } } } } - } post { success { @@ -48,7 +49,7 @@ pipeline { sh """for image in \$(grep FROM Dockerfile | cut -d ' ' -f 2); do docker rmi -f \$(docker images -q \${image}); done""" } always { - emailext body: 'build finished', subject: '[jenkins] docker '+project+': ' + 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 } } options { @@ -75,4 +76,4 @@ pipeline { ] ])) } -} +} \ No newline at end of file diff --git a/build.yaml b/build.yaml new file mode 100644 index 0000000..65cfccc --- /dev/null +++ b/build.yaml @@ -0,0 +1,5 @@ +version: 3.12.1 +project: alpine +additional_tags: + - latest + - 3.12 From 1b1fa57e00c5fe33c0cedbfe92e4978cb42a06de Mon Sep 17 00:00:00 2001 From: chris Date: Wed, 28 Oct 2020 17:46:21 +0100 Subject: [PATCH 11/22] generate jenkinsfile --- Jenkinsfile | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 24b4fcb..ae48863 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -16,26 +16,25 @@ pipeline { customImage.push(version) customImage.push("latest") customImage.push("3.12") - def io_registry_credentials = "3deeee3d-6fce-4430-98dd-9b4db56f43f7" withDockerRegistry([ credentialsId: io_registry_credentials ]) { def io_registry_image = repo + '/' + project + ':' + version sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + io_registry_image sh "docker push " + io_registry_image - sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + io_registry_image.split(/\:/)[0] + "latest" - sh "docker push " + io_registry_image.split(/\:/)[0] + "latest" - sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + io_registry_image.split(/\:/)[0] + "3.12" - sh "docker push " + io_registry_image.split(/\:/)[0] + "3.12" + sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + io_registry_image.split(/\:/)[0] + ":latest" + sh "docker push " + io_registry_image.split(/\:/)[0] + ":latest" + sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + io_registry_image.split(/\:/)[0] + ":3.12" + sh "docker push " + io_registry_image.split(/\:/)[0] + ":3.12" } def quay_credentials= "18fb6f7e-c6bc-4d06-9bf9-08c2af6bfc1a" withDockerRegistry([ credentialsId: quay_credentials, url: "https://quay.io" ]) { def quay_image = 'quay.io/' + repo + '/' + project + ':' + version sh "docker push " + quay_image - sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + official_image.split(/\:/)[0] + "latest" - sh "docker push " + official_image.split(/\:/)[0] + "latest" - sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + official_image.split(/\:/)[0] + "3.12" - sh "docker push " + official_image.split(/\:/)[0] + "3.12" + sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + official_image.split(/\:/)[0] + ":latest" + sh "docker push " + official_image.split(/\:/)[0] + ":latest" + sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + official_image.split(/\:/)[0] + ":3.12" + sh "docker push " + official_image.split(/\:/)[0] + ":3.12" } } } From 9aa09d664b0d809992cf75fe67a56b4326e78e35 Mon Sep 17 00:00:00 2001 From: chris Date: Wed, 28 Oct 2020 17:49:09 +0100 Subject: [PATCH 12/22] generate jenkinsfile --- Jenkinsfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index ae48863..8c25204 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -30,10 +30,11 @@ pipeline { def quay_credentials= "18fb6f7e-c6bc-4d06-9bf9-08c2af6bfc1a" withDockerRegistry([ credentialsId: quay_credentials, url: "https://quay.io" ]) { def quay_image = 'quay.io/' + repo + '/' + project + ':' + version + sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + quay_image sh "docker push " + quay_image - sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + official_image.split(/\:/)[0] + ":latest" + sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + quay_image.split(/\:/)[0] + ":latest" sh "docker push " + official_image.split(/\:/)[0] + ":latest" - sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + official_image.split(/\:/)[0] + ":3.12" + sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + quay_image.split(/\:/)[0] + ":3.12" sh "docker push " + official_image.split(/\:/)[0] + ":3.12" } } From 64c4699dd793f875ff0040866e6bda24b4080bd4 Mon Sep 17 00:00:00 2001 From: chris Date: Wed, 28 Oct 2020 17:51:30 +0100 Subject: [PATCH 13/22] generate jenkinsfile --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 8c25204..a914a71 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -33,9 +33,9 @@ pipeline { sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + quay_image sh "docker push " + quay_image sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + quay_image.split(/\:/)[0] + ":latest" - sh "docker push " + official_image.split(/\:/)[0] + ":latest" + sh "docker push " + quay_image.split(/\:/)[0] + ":latest" sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + quay_image.split(/\:/)[0] + ":3.12" - sh "docker push " + official_image.split(/\:/)[0] + ":3.12" + sh "docker push " + quay_image.split(/\:/)[0] + ":3.12" } } } From 5cda8ff0b0321e6ebf55b09a0fe1280d53568acd Mon Sep 17 00:00:00 2001 From: chris Date: Wed, 28 Oct 2020 17:59:20 +0100 Subject: [PATCH 14/22] generate jenkinsfile --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index a914a71..8a63b45 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -45,6 +45,7 @@ pipeline { post { success { + sh """docker image prune -f""" 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""" } From 0002d1810d3846a05a23911ed0cbc4838c782b92 Mon Sep 17 00:00:00 2001 From: chris Date: Wed, 28 Oct 2020 18:02:05 +0100 Subject: [PATCH 15/22] generate jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 8a63b45..825017f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -47,7 +47,7 @@ pipeline { success { sh """docker image prune -f""" 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""" + sh """for image in \$(grep FROM Dockerfile | cut -d ' ' -f 2); do [[ $image == "test" ]] || docker rmi -f \$(docker images -q \${image}); done""" } always { emailext body: 'build finished', subject: '[jenkins] docker '+project+'('+version+'): ' + currentBuild.result, to: 'cg@zknt.org', from: 'sysadm@zknt.org', attachLog: true From 586fe25f4ff28c5db6a8a1229d84d943dba8ec7c Mon Sep 17 00:00:00 2001 From: chris Date: Wed, 28 Oct 2020 18:04:34 +0100 Subject: [PATCH 16/22] generate jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 825017f..a6eab1f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -47,7 +47,7 @@ pipeline { success { sh """docker image prune -f""" sh """docker rmi -f \$(docker images -q $registry/$repo/$project:$version)""" - sh """for image in \$(grep FROM Dockerfile | cut -d ' ' -f 2); do [[ $image == "test" ]] || docker rmi -f \$(docker images -q \${image}); done""" + sh """for image in \$(grep FROM Dockerfile | cut -d ' ' -f 2); do [[ \$image == "test" ]] || docker rmi -f \$(docker images -q \${image}); done""" } always { emailext body: 'build finished', subject: '[jenkins] docker '+project+'('+version+'): ' + currentBuild.result, to: 'cg@zknt.org', from: 'sysadm@zknt.org', attachLog: true From eb89879930aa5c9a238086861c41aef9c58d83cd Mon Sep 17 00:00:00 2001 From: chris Date: Wed, 28 Oct 2020 18:13:28 +0100 Subject: [PATCH 17/22] generate jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index a6eab1f..6df6bd6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -47,7 +47,7 @@ pipeline { success { sh """docker image prune -f""" sh """docker rmi -f \$(docker images -q $registry/$repo/$project:$version)""" - sh """for image in \$(grep FROM Dockerfile | cut -d ' ' -f 2); do [[ \$image == "test" ]] || docker rmi -f \$(docker images -q \${image}); done""" + sh """for image in \$(grep FROM Dockerfile | cut -d ' ' -f 2 | grep -vi SCRATCH); do docker rmi -f \$(docker images -q \${image}); done""" } always { emailext body: 'build finished', subject: '[jenkins] docker '+project+'('+version+'): ' + currentBuild.result, to: 'cg@zknt.org', from: 'sysadm@zknt.org', attachLog: true From c6ad11f608fc1716351393ae337c31b691573f94 Mon Sep 17 00:00:00 2001 From: chris Date: Thu, 29 Oct 2020 15:47:48 +0100 Subject: [PATCH 18/22] generated Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6df6bd6..673c6c8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -47,7 +47,7 @@ pipeline { success { sh """docker image prune -f""" 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); do docker rmi -f \$(docker images -q \${image}); done""" + sh """for image in \$(grep FROM Dockerfile | cut -d ' ' -f 2 | grep -vi SCRATCH | uniq); do docker rmi -f \$(docker images -q \${image}); done""" } always { emailext body: 'build finished', subject: '[jenkins] docker '+project+'('+version+'): ' + currentBuild.result, to: 'cg@zknt.org', from: 'sysadm@zknt.org', attachLog: true From a5978b96dabbe18b4d350ed27544e703594156a2 Mon Sep 17 00:00:00 2001 From: chris Date: Thu, 29 Oct 2020 15:58:19 +0100 Subject: [PATCH 19/22] generated Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 673c6c8..ab299bb 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -47,7 +47,7 @@ pipeline { success { sh """docker image prune -f""" 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 { emailext body: 'build finished', subject: '[jenkins] docker '+project+'('+version+'): ' + currentBuild.result, to: 'cg@zknt.org', from: 'sysadm@zknt.org', attachLog: true From a8f443fe3c998c27724a1c7e78080eee9aa119e4 Mon Sep 17 00:00:00 2001 From: chris Date: Wed, 4 Nov 2020 01:55:56 +0100 Subject: [PATCH 20/22] generated Jenkinsfile --- Jenkinsfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index ab299bb..0706c58 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -44,12 +44,11 @@ pipeline { } post { - success { + always { + sh """docker container prune -f""" sh """docker image prune -f""" sh """docker rmi -f \$(docker images -q $registry/$repo/$project:$version)""" 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 { emailext body: 'build finished', subject: '[jenkins] docker '+project+'('+version+'): ' + currentBuild.result, to: 'cg@zknt.org', from: 'sysadm@zknt.org', attachLog: true } } From 12c574abf762f4430bb6da5a9fdb1a9a329e87ac Mon Sep 17 00:00:00 2001 From: chris Date: Fri, 11 Dec 2020 17:35:52 +0100 Subject: [PATCH 21/22] 3.12.2 --- Jenkinsfile | 2 +- build.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 0706c58..3d78803 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,4 +1,4 @@ -version = "3.12.1" +version = "3.12.2" project = "alpine" repo = "zknt" registry = "reg.zknt.org" diff --git a/build.yaml b/build.yaml index 65cfccc..5f4f9b6 100644 --- a/build.yaml +++ b/build.yaml @@ -1,4 +1,4 @@ -version: 3.12.1 +version: 3.12.2 project: alpine additional_tags: - latest From 869466b50bd681e90579b103fe16c50c63d0624b Mon Sep 17 00:00:00 2001 From: chris Date: Fri, 18 Dec 2020 00:25:26 +0100 Subject: [PATCH 22/22] 3.12.3 --- Jenkinsfile | 2 +- build.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3d78803..3468c91 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,4 +1,4 @@ -version = "3.12.2" +version = "3.12.3" project = "alpine" repo = "zknt" registry = "reg.zknt.org" diff --git a/build.yaml b/build.yaml index 5f4f9b6..613f41f 100644 --- a/build.yaml +++ b/build.yaml @@ -1,4 +1,4 @@ -version: 3.12.2 +version: 3.12.3 project: alpine additional_tags: - latest