On Thu, Apr 12, 2012 at 12:44 PM, Ferenc Kovacs <tyr...@gmail.com> wrote:

>
>
> On Thu, Apr 12, 2012 at 11:35 AM, Patrick <petrikvanderve...@gmail.com>wrote:
>
>> Hi
>>
>> I'm trying to create a readme file based on the commit messages for all
>> the new revisions in the current build. Currently I do this by using the
>> Jenkins API to request the changesets for the last build (e.g. we're
>> currently building build  #6 so the last build is #5). These changesets
>> give me the last revision number for my VCS and then I can find out what
>> has changed since. However this doesn't work quite that nicely because:
>> * The first build doesn't have a change set, which seems a bit silly
>> because obviously all the changes from all the commits until then are
>> included
>> * Sometimes a build fails at a point where there are no changes (e.g.
>> failure to clear the workspace). Then this build has no change set
>> * A build is run multiple times on a given VCS revision.
>>
>> So the question is what is the best / easiest way to determine which
>> revisions are new in the current build in relation to the last successful
>> build.
>>
>> Thanks
>>
>> Patrick
>>
>
> what about using the Jenkins api?
> parsing xml output of
> http://yourjenkins/job/yourjob/yourrevision/api/xml?xpath=//changeSet
>
>
but most importantly, why don't you fetch the changes of the current build?
I mean the changes in the current build that interests you.
The build will be created as soon as it starts, and when you buildstep
kicks in, you can already have the changeset for your current build (and
you have an environment variable which holds the current job number, so you
have everything to fetch the changes for the current build imo.

-- 
Ferenc Kovács
@Tyr43l - http://tyrael.hu

Reply via email to