On 26/02/15 08:15, John Mellor wrote:
> I'd like to extract the git commit messages for the changes since the last build, and insert them into the debian changelog in the product. This will in many ways make each build self-documenting, and does things in a way that is already very well supported when building .debs.
>
> Has anyone done this?
The SCM changes since the last build are stored with the build and can
be retrieved, for example, from the API during a build, e.g.:
http://jenkins:8080/job/$JOB_NAME/$BUILD_NUMBER/api/xml?wrapper=changes&xpath=//changeSet//comment
That would give you an XML document with each commit message in a
separate tag.
See also:
http://stackoverflow.com/a/11837662/234938
Regards,
Chris