project-config/nodepool/elements/nodepool-base/install.d/06-record-builddate
Ian Wienand 2badcc1893 Add a dib-builddate file
Add a build-date timestamp file to the nodepool-base element and
output that as part of the "network-info" macro that we run at the
start of most tests.

This will allow non-priviledged users to quickly see the date the node
running their test was built on, which can be correlated to the logs
on nodepool.openstack.org to help debug issues that might have to do
with the underlying image build.

Change-Id: Id0c9f6203ed487350285031d3965bc6290370a27
2016-03-01 15:16:15 +11:00

13 lines
285 B
Bash
Executable File

#!/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