NMI
NMI

Reputation: 134

Jenkins: how to save changelog for build

I have Jenkins-CI and C++ project under SVN. How to save changelog between successfull builds into text (or html) file ? Does Jenkins have any variable/temp file with content of .../changes page?

Upvotes: 3

Views: 2895

Answers (1)

malenkiy_scot
malenkiy_scot

Reputation: 16605

Here is XPath code that can get you the changeset for a given build id via Jenkins API:

http://[jenkins_host]/api/xml?depth=2&xpath=//build/id[text()='${BUILD_ID}']/../changeSet

(Put actual build id instead of ${BUILD_ID}). This can be used by a script (say, a Pyhon script utilizing Python Jenkins) that collects changeset results in the end of every build and stores them in a temp locations. After a successful build the script can collect all results stored since the previous build and process them.

Upvotes: 2

Related Questions