Use `debug.BuildInfo` instead of stamping SHA
wilsonehusin opened this issue · 0 comments
wilsonehusin commented
Describe the solution you'd like
Instead of stamping with -ldflags
for Git SHA of a build, we can use debug.BuildInfo
to retrieve the vcs.revision
1 value for better integrity of build metadata.
Anything else you would like to add:
Happy to contribute the changes if desired, though would like to hear what maintainers think first :) This started as a discussion over at NixOS/nixpkgs#272983 where NixOS builds Sonobuoy from source.
Environment:
- Sonobuoy version: N/A
- Kubernetes version: (use
kubectl version
): N/A - Kubernetes installer & version: N/A
- Cloud provider or hardware configuration: N/A
- OS (e.g. from
/etc/os-release
): N/A