metropolis/node: show build commit on startup
Previously it was not possible to identify the running version,
with this change the build commit and tree state gets stamped into the binary
and printed on boot.
Change-Id: I3916e3d40dc87f28a58eb74c6450218550fb3214
Reviewed-on: https://review.monogon.dev/c/monogon/+/1978
Tested-by: Jenkins CI
Reviewed-by: Serge Bazanski <serge@monogon.tech>
diff --git a/build/print-workspace-status.sh b/build/print-workspace-status.sh
index 93fee03..1aeebe0 100755
--- a/build/print-workspace-status.sh
+++ b/build/print-workspace-status.sh
@@ -24,12 +24,16 @@
cat <<EOF
KUBERNETES_gitCommit $(git rev-parse "HEAD^{commit}")
KUBERNETES_gitTreeState $KUBERNETES_gitTreeState
-STABLE_KUBERNETES_gitVersion $KUBERNETES_gitVersion
-STABLE_KUBERNETES_gitMajor $KUBERNETES_gitMajor
-STABLE_KUBERNETES_gitMinor $KUBERNETES_gitMinor
KUBERNETES_buildDate $(date \
${SOURCE_DATE_EPOCH:+"--date=@${SOURCE_DATE_EPOCH}"} \
-u +'%Y-%m-%dT%H:%M:%SZ')
+STABLE_KUBERNETES_gitVersion $KUBERNETES_gitVersion
+STABLE_KUBERNETES_gitMajor $KUBERNETES_gitMajor
+STABLE_KUBERNETES_gitMinor $KUBERNETES_gitMinor
+
+STABLE_METROPOLIS_gitCommit $(git rev-parse "HEAD^{commit}")
+STABLE_METROPOLIS_gitTreeState $KUBERNETES_gitTreeState
STABLE_METROPOLIS_version $METROPOLIS_VERSION
+
IMAGE_TAG $IMAGE_TAG
EOF