-
Task
-
Resolution: Done
-
Medium
-
None
-
None
-
None
When using snapshot versions of microservices, it would be very handful to match the corresponding source code with the binary artifact.
Spring Boot automatically exposes Git information contained in the file git.properties [0]. The only thing missing is to configure the git-commit-id-plugin [1] to generate this file.
Example output of the endpoint /actuator/info:
{ "git": { "build": { "time": "2020-03-07T11:31:13Z", "version": "0.7.0-SNAPSHOT" }, "commit": { "id": { "abbrev": "c2c3792", "full": "c2c379246a6d231e9424308c398a15fcb6618fc3" } } } }
References:
[0] https://docs.spring.io/spring-boot/docs/2.2.x/reference/htmlsingle/#howto-git-info
[1] https://github.com/git-commit-id/git-commit-id-maven-plugin