{"action":"created","issue":{"url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/4018","repository_url":"https://api.github.com/repos/jhipster/generator-jhipster","labels_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/4018/labels{/name}","comments_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/4018/comments","events_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/4018/events","html_url":"https://github.com/jhipster/generator-jhipster/pull/4018","id":172527250,"number":4018,"title":"Add git commit data to /info endpoint in prod build","user":{"login":"PierreBesson","id":513471,"avatar_url":"https://avatars.githubusercontent.com/u/513471?v=3","gravatar_id":"","url":"https://api.github.com/users/PierreBesson","html_url":"https://github.com/PierreBesson","followers_url":"https://api.github.com/users/PierreBesson/followers","following_url":"https://api.github.com/users/PierreBesson/following{/other_user}","gists_url":"https://api.github.com/users/PierreBesson/gists{/gist_id}","starred_url":"https://api.github.com/users/PierreBesson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PierreBesson/subscriptions","organizations_url":"https://api.github.com/users/PierreBesson/orgs","repos_url":"https://api.github.com/users/PierreBesson/repos","events_url":"https://api.github.com/users/PierreBesson/events{/privacy}","received_events_url":"https://api.github.com/users/PierreBesson/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jhipster/generator-jhipster/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-22T18:55:31Z","updated_at":"2016-09-02T13:14:06Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/jhipster/generator-jhipster/pulls/4018","html_url":"https://github.com/jhipster/generator-jhipster/pull/4018","diff_url":"https://github.com/jhipster/generator-jhipster/pull/4018.diff","patch_url":"https://github.com/jhipster/generator-jhipster/pull/4018.patch"},"body":"Finally fixes #3574 \r\ncc @gmarziou\r\nAdd the following in the /info endpoint **only when doing a prod build**\r\n```\r\n\t\"git\": {\r\n\t\t\"commit\": {\r\n\t\t\t\"id\": {\r\n\t\t\t\t\"abbrev\": \"324b701\",\r\n\t\t\t\t\"describe\": \"v1-2-324b701\"//only for maven as the gradle git-commit plugin doesn't support it yet\r\n\t\t\t}\r\n\t\t},\r\n\t\t\"branch\": \"master\"\r\n\t}\r\n```\r\nWhat it does:\r\n- Set `management.info.git.mode` to `full` this is needed so that every property present in the `git.properties` file will end up in /info. I think this is the natural way to use it since in the default `simple` mode it will only put the commit id and branch in /info.\r\n- Setup the git-commit plugin for both maven and gradle and restrict it to a subset of git properties : `git.commit.abbrev`, `git.branch` and `git.commit.id.describe` (unfortunately not available for gradle).\r\nAnother advantage of restricting the properties is that this way there won't be any unwanted properties like commit user name or email in the `git.properties` file that ship with the war."},"comment":{"url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/comments/244371250","html_url":"https://github.com/jhipster/generator-jhipster/pull/4018#issuecomment-244371250","issue_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/4018","id":244371250,"user":{"login":"PierreBesson","id":513471,"avatar_url":"https://avatars.githubusercontent.com/u/513471?v=3","gravatar_id":"","url":"https://api.github.com/users/PierreBesson","html_url":"https://github.com/PierreBesson","followers_url":"https://api.github.com/users/PierreBesson/followers","following_url":"https://api.github.com/users/PierreBesson/following{/other_user}","gists_url":"https://api.github.com/users/PierreBesson/gists{/gist_id}","starred_url":"https://api.github.com/users/PierreBesson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PierreBesson/subscriptions","organizations_url":"https://api.github.com/users/PierreBesson/orgs","repos_url":"https://api.github.com/users/PierreBesson/repos","events_url":"https://api.github.com/users/PierreBesson/events{/privacy}","received_events_url":"https://api.github.com/users/PierreBesson/received_events","type":"User","site_admin":false},"created_at":"2016-09-02T13:14:06Z","updated_at":"2016-09-02T13:14:06Z","body":"I agree that the fact that it adds dependencies is an issue. However I think it adds interesting data for microservice deployments especially to do continuous delivery.\r\n\r\nAnd yes it doesn't do anything as long as you have not initialized the git repo of the app, then data will appear in /management/info.\r\n\r\nI agree that this should be displayed in the UI but for now client side development is freezed waiting for angular 2. But I would like to display this info in the registry.\r\n\r\nAnother use I have for this is to add the git version number to the logs. So that when doing blue/green deployment, you can distinguish different versions of the same service."}}
{"actor":{"display_login":"PierreBesson"}}