From af76689674b7350efa2ea4744f70d440e32f5c23 Mon Sep 17 00:00:00 2001 From: Sami Alajrami Date: Fri, 23 Feb 2018 15:21:24 +0000 Subject: [PATCH] adding a version timestamp. --- dockerfile/dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dockerfile/dockerfile b/dockerfile/dockerfile index ca17ee0c..2bc8b66a 100644 --- a/dockerfile/dockerfile +++ b/dockerfile/dockerfile @@ -5,7 +5,9 @@ RUN git clone https://github.com/Praqma/helmsman.git RUN go get github.com/Praqma/helmsman/gcs RUN go get github.com/Praqma/helmsman/aws # build a statically linked binary so that it works on stripped linux images such as alpine/busybox. -RUN CGO_ENABLED=0 GOOS=linux go install -a -ldflags '-extldflags "-static"' helmsman/. +RUN cd helmsman \ + && TAG=$(git describe --abbrev=0 --tags)-$(date +"%s") \ + && CGO_ENABLED=0 GOOS=linux go install -a -ldflags '-X main.version='$TAG' -extldflags "-static"' . FROM alpine:3.6 as kube ENV KUBE_LATEST_VERSION="v1.8.2"