edge version
dockers/alpine/pipeline/head Something is wrong with the build of this commit Details

This commit is contained in:
chris 2020-05-23 16:39:38 +02:00
parent 5836e1bddf
commit af961f1860
2 changed files with 8 additions and 14 deletions

View File

@ -1,20 +1,16 @@
FROM alpine as build
ARG VERSION
ENV ALPINE_SERIES 3.11
ENV ALPINE_MIRROR https://uk.alpinelinux.org/alpine/v${ALPINE_SERIES}
ENV ALPINE_SERIES edge
ENV ALPINE_MIRROR https://uk.alpinelinux.org/alpine/${ALPINE_SERIES}
ENV ALPINE_ARCH x86_64
WORKDIR /root
RUN set -x; apk add --no-cache curl &&\
curl -LO ${ALPINE_MIRROR}/releases/${ALPINE_ARCH}/alpine-minirootfs-${VERSION}-${ALPINE_ARCH}.tar.gz &&\
mkdir /dest &&\
tar -C /dest -xvzf alpine-minirootfs-${VERSION}-${ALPINE_ARCH}.tar.gz &&\
sed -i "s#http://dl-cdn.alpinelinux.org/alpine/v${ALPINE_SERIES}#${ALPINE_MIRROR}#g" /dest/etc/apk/repositories
tar -C /dest -xvzf alpine-minirootfs-${VERSION}-${ALPINE_ARCH}.tar.gz
FROM scratch
ARG VERSION
LABEL version.alpine=$VERSION
COPY --from=build /dest /
CMD ["/bin/sh"]

12
Jenkinsfile vendored
View File

@ -1,6 +1,6 @@
project = "alpine"
repo = "zknt"
version = "3.11.6"
version = "20200428"
registry = "reg.zknt.org"
registry_credentials = "6ff44976-23cd-4cc2-902c-de8c340e65e5"
@ -14,17 +14,15 @@ pipeline {
script {
def customImage = docker.build(registry+'/'+repo+'/'+project, "--build-arg VERSION=$version .")
customImage.push(version)
customImage.push(version.split(/\./)[0,1].join('.'))
customImage.push(version.split(/\./)[0])
customImage.push("latest")
customImage.push("edge")
registry_credentials = "3deeee3d-6fce-4430-98dd-9b4db56f43f7"
withDockerRegistry([ credentialsId: registry_credentials ]) {
def official_image = repo+'/'+project+':'+version.split(/\./)[0,1].join('.')
def official_image = repo+'/'+project+':'+version
sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + official_image
sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + official_image.split(/\:/)[0]
sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + official_image.split(/:/)[0]+":edge"
sh "docker push " + official_image
sh "docker push " + official_image.split(/\:/)[0]
sh "docker push " + official_image.split(/:/)[0]+":edge"
}
}
}