Uploaded image for project: 'Common Controller SDK'
  1. Common Controller SDK
  2. CCSDK-2165

Expose key git properties to identify snapshot artifacts of Spring Boot Applications

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Medium Medium
    • Frankfurt Release
    • 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

       

            ebo ebo
            ebo ebo
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: