[ 
https://issues.jenkins-ci.org/browse/JENKINS-13056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=160281#comment-160281
 ] 

Roland Schulz commented on JENKINS-13056:
-----------------------------------------

{quote}
Ok, I understand. I.e. we need some kind of ancestor of a build. This might be 
not trivial since not every SCM change will lead to a new build.
{quote}
Yes. It is true, in general not every SCM change has to lead to a build. But I 
think in many important cases it does. Thus supporting only this case would 
already be very nice. But I would imagine supporting the general case shouldn't 
be too hard either. If the SCM interface has an API to ask for the ancestor, 
the plugin could ask for the ancestor of the SCM version of the current build. 
If no build exist corresponding to that build, the same API could be used to 
recursively walk back in the history until a version is found which has a 
corresponding build.

A bit more tricky might be the case that more than one build exist for a 
certain SCM version. In that case one needs to decide which build should be 
picked, e.g. the most recent or the most recent successful one.
                
> Obtain reference build from SCM/Trigger
> ---------------------------------------
>
>                 Key: JENKINS-13056
>                 URL: https://issues.jenkins-ci.org/browse/JENKINS-13056
>             Project: Jenkins
>          Issue Type: Bug
>          Components: analysis-core, core, warnings
>            Reporter: Roland Schulz
>            Assignee: Ulli Hafner
>
> It would be great if the SCM would be queried for the reference build. If the 
> builds are not in order (e.g. because the build are triggered by code review 
> (e.g. Gerrit)), it doesn't make sense to use the last build as reference. The 
> SCM (e.g. Git) or the Trigger (e.g. Gerrit) would know the previous commit 
> which should be used as reference. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to