Merge branch '3.12' into edge
This commit is contained in:
commit
4d87c809d6
13
Dockerfile
13
Dockerfile
|
@ -2,17 +2,22 @@ FROM alpine as build
|
||||||
|
|
||||||
ARG VERSION
|
ARG VERSION
|
||||||
ENV ALPINE_SERIES edge
|
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
|
ENV ALPINE_ARCH x86_64
|
||||||
|
|
||||||
WORKDIR /root
|
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 ${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 &&\
|
curl -LO ${ALPINE_MIRROR}/releases/${ALPINE_ARCH}/alpine-minirootfs-${VERSION}-${ALPINE_ARCH}.tar.gz.asc &&\
|
||||||
sha512sum -c alpine-minirootfs-${VERSION}-${ALPINE_ARCH}.tar.gz.sha512 &&\
|
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 &&\
|
mkdir /dest &&\
|
||||||
tar -C /dest -xvzf alpine-minirootfs-${VERSION}-${ALPINE_ARCH}.tar.gz
|
tar -C /dest -xvzf alpine-minirootfs-${VERSION}-${ALPINE_ARCH}.tar.gz
|
||||||
|
|
||||||
FROM scratch
|
FROM scratch
|
||||||
|
ARG VERSION
|
||||||
|
ARG DATE
|
||||||
COPY --from=build /dest /
|
COPY --from=build /dest /
|
||||||
|
RUN apk add --no-cache ca-certificates curl
|
||||||
CMD ["/bin/sh"]
|
CMD ["/bin/sh"]
|
||||||
|
LABEL version.alpine=$VERSION build.date=$DATE
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
|
version = "3.12.3"
|
||||||
project = "alpine"
|
project = "alpine"
|
||||||
repo = "zknt"
|
repo = "zknt"
|
||||||
version = "20200428"
|
version = "20200428"
|
||||||
registry = "reg.zknt.org"
|
registry = "reg.zknt.org"
|
||||||
registry_credentials = "6ff44976-23cd-4cc2-902c-de8c340e65e5"
|
registry_credentials = "6ff44976-23cd-4cc2-902c-de8c340e65e5"
|
||||||
|
timeStamp = Calendar.getInstance().getTime().format('YYYY-MM-dd',TimeZone.getTimeZone('UTC'))
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
|
@ -28,11 +30,38 @@ pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
post {
|
post {
|
||||||
always {
|
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()]
|
||||||
|
]
|
||||||
|
]))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@ stock alpine
|
||||||
|
|
||||||
Basic Alpine base image, pulling Alpines minirootfs and extracting to `scratch`.
|
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
|
Source repository: https://git.zknt.org/dockers/alpine
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
version: 3.12.3
|
||||||
|
project: alpine
|
||||||
|
additional_tags:
|
||||||
|
- latest
|
||||||
|
- 3.12
|
Loading…
Reference in New Issue