Merge branch '3.12' into edge

This commit is contained in:
chris 2020-12-18 13:06:02 +01:00
commit 4d87c809d6
4 changed files with 46 additions and 7 deletions

View File

@ -2,17 +2,22 @@ FROM alpine as build
ARG VERSION
ENV ALPINE_SERIES edge
ENV ALPINE_MIRROR https://uk.alpinelinux.org/alpine/${ALPINE_SERIES}
ENV ALPINE_MIRROR https://ftp.halifax.rwth-aachen.de/alpine/v${ALPINE_SERIES}
ENV ALPINE_ARCH x86_64
WORKDIR /root
RUN set -xo pipefail; apk add --no-cache curl &&\
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 http://nl.alpinelinux.org/alpine/${ALPINE_SERIES}/releases/${ALPINE_ARCH}/alpine-minirootfs-${VERSION}-${ALPINE_ARCH}.tar.gz.sha512 &&\
sha512sum -c alpine-minirootfs-${VERSION}-${ALPINE_ARCH}.tar.gz.sha512 &&\
curl -LO ${ALPINE_MIRROR}/releases/${ALPINE_ARCH}/alpine-minirootfs-${VERSION}-${ALPINE_ARCH}.tar.gz.asc &&\
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 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

33
Jenkinsfile vendored
View File

@ -1,8 +1,10 @@
version = "3.12.3"
project = "alpine"
repo = "zknt"
version = "20200428"
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
@ -28,11 +30,38 @@ pipeline {
}
}
}
}
post {
always {
emailext body: 'build finished', subject: '[jenkins] docker '+project+': ' + currentBuild.result, to: 'cg@zknt.org', from: 'sysadm@zknt.org', attachLog: true
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"""
emailext body: 'build finished', subject: '[jenkins] docker '+project+'('+version+'): ' + 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()]
]
]))
}
}

View File

@ -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

5
build.yaml Normal file
View File

@ -0,0 +1,5 @@
version: 3.12.3
project: alpine
additional_tags:
- latest
- 3.12