File tree Expand file tree Collapse file tree 3 files changed +19
-4
lines changed
Expand file tree Collapse file tree 3 files changed +19
-4
lines changed Original file line number Diff line number Diff line change 2222 format : ' YYYY-MM-DD'
2323
2424 - name : Set Release Version from Tag
25- # run: echo "RELEASE_VERSION=v0.6.3 " >> $GITHUB_ENV
25+ # run: echo "RELEASE_VERSION=v1.0.3.1 " >> $GITHUB_ENV
2626 run : echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
2727
2828 - name : Push to GitHub Packages for Base Build
3434 push : true
3535 build-args : |
3636 BUILD_DATE=${{ steps.date.outputs.time }}
37+ BUILD_TAG=base-${{ env.RELEASE_VERSION }}
3738 CDPY=true
3839
3940 - name : Get Time for Full Build
4748 build-args : |
4849 BASE_IMAGE_URI=ghcr.io/cloudera-labs/cldr-runner
4950 BASE_IMAGE_TAG=base-${{ env.RELEASE_VERSION }}
51+ BUILD_TAG=full-${{ env.RELEASE_VERSION }}
5052 AWS=true
5153 GCLOUD=true
5254 AZURE=true
6870 build-args : |
6971 BASE_IMAGE_URI=ghcr.io/cloudera-labs/cldr-runner
7072 BASE_IMAGE_TAG=base-${{ env.RELEASE_VERSION }}
73+ BUILD_TAG=aws-${{ env.RELEASE_VERSION }}
7174 AWS=true
7275 CDPY=true
7376 CACHE_TIME=${{ steps.awstime.outputs.time }}
8790 build-args : |
8891 BASE_IMAGE_URI=ghcr.io/cloudera-labs/cldr-runner
8992 BASE_IMAGE_TAG=base-${{ env.RELEASE_VERSION }}
93+ BUILD_TAG=gcp-${{ env.RELEASE_VERSION }}
9094 GCLOUD=true
9195 CDPY=true
9296 CACHE_TIME=${{ steps.gcptime.outputs.time }}
@@ -105,6 +109,7 @@ jobs:
105109 build-args : |
106110 BASE_IMAGE_URI=ghcr.io/cloudera-labs/cldr-runner
107111 BASE_IMAGE_TAG=base-${{ env.RELEASE_VERSION }}
112+ BUILD_TAG=azure-${{ env.RELEASE_VERSION }}
108113 AZURE=true
109114 CDPY=true
110115 CACHE_TIME=${{ steps.azuretime.outputs.time }}
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ ARG BASE_IMAGE_TAG=stable-2.10-devel
44FROM ${BASE_IMAGE_URI}:${BASE_IMAGE_TAG} AS base
55
66ARG BUILD_DATE
7- ARG IMAGE_FULL_NAME
7+ ARG BUILD_TAG
88ARG BASE_IMAGE_TAG
99
1010# Copy Payload
@@ -27,7 +27,7 @@ RUN rpm --import https://packages.microsoft.com/keys/microsoft.asc \
2727 && mv /runner/bashrc /home/runner/.bashrc
2828
2929ENV CLDR_BUILD_DATE=${BUILD_DATE}
30- ENV CLDR_BUILD_VER=${BASE_IMAGE_TAG }
30+ ENV CLDR_BUILD_VER=${BUILD_TAG }
3131
3232# Metadata
3333LABEL maintainer=
"Cloudera Labs <[email protected] >" \
@@ -53,9 +53,19 @@ ARG GCLOUD
5353ARG AZURE
5454ARG CDPY
5555
56+ # Update Build Information
57+ ARG BUILD_DATE
58+ ARG BUILD_TAG
59+
5660# Set random data to ensure this never caches
5761ARG CACHE_TIME=placeholder
5862
63+ ENV CLDR_BUILD_DATE=${BUILD_DATE}
64+ ENV CLDR_BUILD_VER=${BUILD_TAG}
65+ # Metadata
66+ LABEL org.label-schema.build-date="${CLDR_BUILD_DATE}" \
67+ org.label-schema.version="${CLDR_BUILD_VER}"
68+
5969RUN if [[ -z "$KUBECTL" ]] ; then echo KUBECTL not requested ; else dnf install -y kubectl ; fi \
6070 && if [[ -z "$AWS" ]] ; then echo AWS not requested ; else pip install --no-cache-dir -r /runner/deps/python_aws.txt ; fi \
6171 && if [[ -z "$GCLOUD" ]] ; then echo GCLOUD not requested ; else dnf install -y google-cloud-sdk && pip install --no-cache-dir -r /runner/deps/python_gcp.txt ; fi \
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ build_docker_image() {
2727 -t " ${IMAGE_FULL_NAME} " \
2828 --build-arg BASE_IMAGE_URI=${BASE_IMAGE_URI} \
2929 --build-arg BASE_IMAGE_TAG=${BASE_IMAGE_TAG} \
30- --build-arg IMAGE_FULL_NAME =" ${IMAGE_FULL_NAME } " \
30+ --build-arg BUILD_TAG =" ${IMAGE_TAG } " \
3131 --build-arg BUILD_DATE=" ${BUILD_DATE} " \
3232 .
3333}
You can’t perform that action at this time.
0 commit comments