add date label, switch mirror
This commit is contained in:
parent
b21abfa578
commit
5072eef93d
2 changed files with 5 additions and 4 deletions
|
@ -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
|
||||
|
|
3
Jenkinsfile
vendored
3
Jenkinsfile
vendored
|
@ -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])
|
||||
|
|
Loading…
Reference in a new issue