From cc4791053eca9592a02ace889f1e93150debdf18 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Fri, 22 Jan 2021 10:03:39 +0100 Subject: [PATCH] test BUILD_DATE generation --- .drone.jsonnet | 3 +++ .drone.yml | 8 +++++++- Dockerfile.amd64 | 10 ++++++---- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index 529275e..6050f47 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -64,6 +64,9 @@ local PipelineBuildContainer(arch='amd64') = { repo: 'thegeeklab/${DRONE_REPO_NAME}', username: { from_secret: 'docker_username' }, password: { from_secret: 'docker_password' }, + build_args: [ + 'BUILD_DATE=$$(date --rfc-3339=seconds)', + ], }, when: { ref: ['refs/heads/main', 'refs/tags/**'], diff --git a/.drone.yml b/.drone.yml index 5fecd4e..75f6a64 100644 --- a/.drone.yml +++ b/.drone.yml @@ -57,6 +57,8 @@ steps: - name: publish-dockerhub image: thegeeklab/drone-docker-buildx:20 settings: + build_args: + - BUILD_DATE=$$(date --rfc-3339=seconds) dockerfile: Dockerfile.amd64 password: from_secret: docker_password @@ -135,6 +137,8 @@ steps: - name: publish-dockerhub image: thegeeklab/drone-docker-buildx:20 settings: + build_args: + - BUILD_DATE=$$(date --rfc-3339=seconds) dockerfile: Dockerfile.arm64 password: from_secret: docker_password @@ -213,6 +217,8 @@ steps: - name: publish-dockerhub image: thegeeklab/drone-docker-buildx:20 settings: + build_args: + - BUILD_DATE=$$(date --rfc-3339=seconds) dockerfile: Dockerfile.arm password: from_secret: docker_password @@ -346,6 +352,6 @@ depends_on: --- kind: signature -hmac: b461e1964e0b2ac5b9154b81fa293d6dc99a082e63987d90a4e441b1667d26c8 +hmac: 22ccba5c75de7c2c8bbccd66f0c7c2550d6d4edf6610bded6adc8d8668e19605 ... diff --git a/Dockerfile.amd64 b/Dockerfile.amd64 index 621a447..7fa8e11 100644 --- a/Dockerfile.amd64 +++ b/Dockerfile.amd64 @@ -1,15 +1,17 @@ FROM amd64/alpine:3.13@sha256:d0710affa17fad5f466a70159cc458227bd25d4afb39514ef662ead3e6c99515 +ARG GOMPLATE_VERSION +ARG SUPERCRONIC_VERSION +ARG URL_PARSER_VERSION +ARG BUILD_DATE + LABEL maintainer="Robert Kaussow " LABEL org.opencontainers.image.authors="Robert Kaussow " LABEL org.opencontainers.image.title="alpine" LABEL org.opencontainers.image.url="https://gitea.rknet.org/docker/alpine" LABEL org.opencontainers.image.source="https://gitea.rknet.org/docker/alpine" LABEL org.opencontainers.image.documentation="https://gitea.rknet.org/docker/alpine" - -ARG GOMPLATE_VERSION -ARG SUPERCRONIC_VERSION -ARG URL_PARSER_VERSION +LABEL org.opencontainers.image.created="${BUILD_DATE}" # renovate: datasource=github-releases depName=hairyhenderson/gomplate ENV GOMPLATE_VERSION="${GOMPLATE_VERSION:-v3.8.0}"