Mark, did you get a chance to read my reply? If I understood you correctly, 
what I'm seeing is probably unexpected behavior and I can very easily 
reproduce it, so I'd be happy to file an issue in JIRA if needed.

On Thursday, April 26, 2018 at 2:39:23 PM UTC-5, Alejandro Villarreal wrote:
>
> Wow, sorry for the delay, I thought I was going to get some notification 
> if someone replied, but if I did I missed it.
>
> My setup is pretty simple so I'd like to think this issue is easy to 
> reproduce. I'm only using the Git plugin 
> <https://wiki.jenkins.io/display/JENKINS/Git+Plugin>, not the GitHub 
> Branch Source plugin 
> <https://wiki.jenkins.io/display/JENKINS/GitHub+Branch+Source+Plugin>, 
> and I have the "Jenkins (Git plugin)" Service installed on my GitHub repo 
> (under Settings -> Integrations and Services). Per the Git Plugin's 
> documenation, my jobs only have a build trigger of "Poll SCM" without a 
> schedule (so they are only triggered by push notifications from github). 
> What is that setup supposed to do if I delete a branch? The notification 
> sent to Jenkins seems to be identical for a regular push and when the 
> branch gets deleted:
>
> Received notification from <github IP> ⇒ 
> http://<my-jenkins-url>/git/notifyCommit for uri = 
> https://github.com/<my-repo> 
> ; sha1 = null ; branches = [<my-branch>]
>
> I should also note that I have a single Jenkins job with a wildcard branch 
> name to catch and build several feature branches, so I wouldn't want a 
> branch deletion to disable or delete the job, but I think it shouldn't be 
> triggered either. Since you've never seen it happen, I imagine that's the 
> desired behavior, right?
>
>
> On Thursday, April 12, 2018 at 3:43:46 PM UTC-5, Mark Waite wrote:
>>
>> I have never seen a case where a job is triggered by branch deletion.
>>
>> The GitHub Branch Source plugin will (correctly) disable a job associated 
>> with a branch when branch deletion is detected, and will (correctly) remove 
>> the job according to the settings for that repository.
>>
>> If the GitHub webhooks are notifying Jenkins of a branch deletion, that 
>> seems like a good thing, not a bad thing.
>>
>> Mark Waite
>>
>> On Thu, Apr 12, 2018 at 2:26 PM Alejandro Villarreal <al...@alexvy86.com> 
>> wrote:
>>
>>> I noticed that the github service/integration for the Jenkins Git Plugin 
>>> <https://wiki.jenkins.io/display/JENKINS/Git+Plugin> triggers builds 
>>> when branches are deleted in Github. Those builds fail because they try to 
>>> checkout a SHA1 that just got deleted from the repository, and they're 
>>> "polluting" my Jenkins dashboard, since I'm seeing projects with failed 
>>> builds when the actual code builds just fine.
>>>
>>>
>>> Is that expected? That a branch deletion in Github triggers a build in 
>>> Jenkins? I'm thinking that if anything needs to change, or at least be more 
>>> configurable, it's probably the Github integration. If it didn't send 
>>> notifications for branch deletions, this problem would go away.
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Jenkins Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to jenkinsci-use...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/jenkinsci-users/bbd05bc3-315a-4264-9937-26ac710ade07%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/jenkinsci-users/bbd05bc3-315a-4264-9937-26ac710ade07%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/338f6ce7-6452-4504-945b-13e7c941168c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to