This PR adds Prometheus metrics that support showing when the images were last built, and when they will be rebuilt. The two added metrics are the last build time and the time between builds, from which the next build time can be calculated.
This requires two features:
To initialise the last-build-time value when base-images starts, we read the OCurrent DB to find the timestamp of the latest build. Here we also set the time-between-builds value.
To update the value, when base-images reruns the pipeline we update last-build-time with the current timestamp. time-between-builds does not need to be updated as it doesn't change.
This PR adds Prometheus metrics that support showing when the images were last built, and when they will be rebuilt. The two added metrics are the last build time and the time between builds, from which the next build time can be calculated.
This requires two features:
base-images
starts, we read the OCurrent DB to find the timestamp of the latest build. Here we also set the time-between-builds value.base-images
reruns the pipeline we update last-build-time with the current timestamp. time-between-builds does not need to be updated as it doesn't change.Example Grafana output: