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

Gordon Oliver commented on JENKINS-4422:
----------------------------------------

I can reproduce a variant of this bug. The problem is that the BuildChooser 
takes the last build if there are no builds found, and that build may not 
exist. Specifically, I am using Jenkins to auto-merge branches, and once 
merged, the original branch is deleted. This leads to a stream of 'success, 
failure' builds from Jenkins (i.e. if the merge build succeeds, Jenkins always 
runs a second build, and that second build always fails).

To reproduce: pre-merge, and a post commit + 'git push :remotebranch'.

I can provide you with the scripts that duplicate this behavior if you wish. I 
had to roll my own pre/post scripts to make it do what I wanted...

My personal preference would be a different strategy, making a build chooser 
that chooses nothing if it finds no builds, rather than choosing the last 
build. This means that you won't be able to kick off a manual build if there 
are no builds that match. This probably means that it can't be the default.

                
> Previous built branch builds again even if removed
> --------------------------------------------------
>
>                 Key: JENKINS-4422
>                 URL: https://issues.jenkins-ci.org/browse/JENKINS-4422
>             Project: Jenkins
>          Issue Type: Bug
>          Components: git
>    Affects Versions: current
>         Environment: Platform: Macintosh, OS: All
>            Reporter: jacobat
>            Assignee: abayer
>
> After having a build where origin/branchA was built (and failed) and then
> removing origin/branchA from the configuration, on the next build it will try 
> to
> build origin/branchA again.
> Hudson should not try to build branches that are not configured for building.
> Only way I could find to get out of the problem was to delete all builds 
> trying
> to build branchA until I got back to another build.

--
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