diff --git a/jenkins/jobs/macros.yaml b/jenkins/jobs/macros.yaml index e3a0ae8efb..bb9437ee86 100644 --- a/jenkins/jobs/macros.yaml +++ b/jenkins/jobs/macros.yaml @@ -593,14 +593,23 @@ - shell: | #!/bin/sh export PATH=$PATH:/sbin + if [ -f /etc/dib-builddate.txt ]; then + echo "Image build date" + echo "================" + cat /etc/dib-builddate.txt + fi echo "Host & kernel" + echo "=============" uname -a echo "Network interface addresses..." + echo "==============================" ip address show echo "Network routing tables..." + echo "=========================" ip route show ip -6 route show echo "Network neighbors..." + echo "====================" ip neighbor show - builder: diff --git a/nodepool/elements/nodepool-base/install.d/06-record-builddate b/nodepool/elements/nodepool-base/install.d/06-record-builddate new file mode 100755 index 0000000000..9db66e785e --- /dev/null +++ b/nodepool/elements/nodepool-base/install.d/06-record-builddate @@ -0,0 +1,12 @@ +#!/bin/bash + +if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then + set -x +fi +set -eu +set -o pipefail + +# Put a timestamp in the image file of the date the image was built. +# This is echoed into the logs on each run for easy cross-reference + +date --utc "+%Y-%m-%d %H:%M" > /etc/dib-builddate.txt