Report build meta data

Authored by Eevans on Jul 1 2019, 7:11 PM.


Report build meta data

Introduces variables (scoped main) for a version, git hash, and build host and
date. These values are passed in at compile-time via the -ldflags argument
from the Makefile.

This build metadata, along with the Go version (ala runtime.Version()), is
both logged at startup, and returned as JSON in /healthz responses.

Finally, a dummy Prometheus gauge (kask_build_information) is exported with
the above metadata as labels, allowing series selection on one or more of these
values (see:

NOTE: This change makes Git a build dependency.

Bug: T226988
Change-Id: I18256953fb68e52850eb3bc19b5bc0be29be65a6