pidgin/nest

b644a312fabe
Parents 6dbc685768a7
Children 1037b335c2e4
Add more build info to footline

+ add `BUILD_NAME` to Dockerfile
--- a/Dockerfile Mon Jun 10 22:34:53 2019 +0100
+++ b/Dockerfile Mon Jun 10 22:42:52 2019 +0100
@@ -8,8 +8,11 @@
apt-get install -y hugo && \
apt-get clean && \
rm -rf /var/lib/apt/lists
-ARG BUILD_DATE=unknown
-ARG COMMIT=unknown
+
+ARG BUILD_NAME
+ARG BUILD_DATE
+ARG COMMIT
+
COPY hugo /nest/hugo
RUN hugo -s /nest/hugo -d /nest/public
--- a/hugo/layouts/partials/footline.html Mon Jun 10 22:34:53 2019 +0100
+++ b/hugo/layouts/partials/footline.html Mon Jun 10 22:42:52 2019 +0100
@@ -72,4 +72,12 @@
</div>
</footer>
-<div class="build-info">Built: {{ now.Format "02 Jan 06 15:04" }}</div>
+<div class="build-info">
+ Hugo: {{ now.Format "02 Jan 06 15:04" }}
+ - Job:
+ {{ with getenv "BUILD_NAME" }}{{ . }}{{ else }}n/a{{ end }}
+ {{ with getenv "BUILD_DATE" }}{{ . | time.Format "02 Jan 06 15:04" }}{{ else }}n/a{{ end }}
+ - Commit: {{ with getenv "COMMIT" }}{{ . }}{{ else }}n/a{{ end }}
+ - Hugo Version: {{ hugo.Version }}
+ - {{ hugo.Environment }}
+</div>