-
Bug
-
Resolution: Unresolved
-
Minor
-
None
Jenkins version: 2.163
Github plugin version: 1.29.3
Git plugin version: 3.9.3
Git client plugin version: 2.7.6
Job Type: Multibranch Job
We're currently using the Github plugin so that commits to our repo trigger Github webhooks to our Jenkins server. For the most part, it works. However, at least a few times a week a build will be triggered for a branch that doesn't have a commit.
For instance, if I make a commit to ProjectA/develop, it thinks it detects a change and triggers a build for the 2 other branches, ProjectA/stage and ProjectA/master, even though those branches don't have any recent commits.
Here are more details based off our current issue:
The webhook log from our github repo showing a push to the develop branch at 19:44:23 MST.
Here we see Jenkins receiving the hook and checking the branches for changes to build. Notice that it detects changes in all 3 configured branches even though develop was the one that triggered the build. Also note that our Jenkins server is set to UTC time so it's actually 19:44:26PM MST that it logged the PushEvent.
Here we can see the commits to he master branch. Last one was Oct 24, 2018. So there's definitely nothing new in there to build even though Jenkins thinks there is.
And just for the sake of completeness, here's the GitHub hook log from the master branch job.
[JENKINS-56104] Jenkins Github SCM building wrong branches
Summary | Original: Jenkins Github SCM triggering wrong branch | New: Jenkins Github SCM building wrong branches |
Description |
Original:
Jenkins version: 2.163 Github plugin version: 1.29.3 Git plugin version: 3.9.3 Git client plugin version: 2.7.6 Job Type: Multibranch Job We're currently using the Github plugin so that commits to our repo trigger Github webhooks to our Jenkins server. For the most part, it works. However, at least a few times a week a build will be triggered for a branch that doesn't have a commit. For instance, if I make a commit to ProjectA/develop, it thinks it detects a change and triggers a build for the 2 other branches, ProjectA/stage and ProjectA/master, even though those branches don't have any recent commits. Here are more details based off our current issue: The webhook log from our github repo showing a push to the develop branch at 19:44:23 MST. !webhook log.PNG! Here we see Jenkins receiving the hook and checking the branches for changes to build. Notice that it detects changes in all 3 configured branches even though develop was the one that triggered the build. Also note that our Jenkins server is set to UTC time so it's actually 19:44:26PM MST that it logged the PushEvent. !jenkins log.PNG! Here we can see the commits to he master branch. Last one was Oct 24, 2018. So there's definitely nothing new in there to build even though Jenkins thinks there is. !github commit log.PNG! And just for the sake of completeness, here's the GitHub hook log from the master branch job. !master github push.PNG! |
New:
Jenkins version: 2.163 Github plugin version: 1.29.3 Git plugin version: 3.9.3 Git client plugin version: 2.7.6 Job Type: Multibranch Job We're currently using the Github plugin so that commits to our repo trigger Github webhooks to our Jenkins server. For the most part, it works. However, at least a few times a week a build will be triggered for a branch that doesn't have a commit. For instance, if I make a commit to ProjectA/develop, it thinks it detects a change and triggers a build for the 2 other branches, ProjectA/stage and ProjectA/master, even though those branches don't have any recent commits. Here are more details based off our current issue: The webhook log from our github repo showing a push to the develop branch at 19:44:23 MST. !webhook log.PNG|width=583,height=392! Here we see Jenkins receiving the hook and checking the branches for changes to build. Notice that it detects changes in all 3 configured branches even though develop was the one that triggered the build. Also note that our Jenkins server is set to UTC time so it's actually 19:44:26PM MST that it logged the PushEvent. !jenkins log.PNG|width=776,height=198! Here we can see the commits to he master branch. Last one was Oct 24, 2018. So there's definitely nothing new in there to build even though Jenkins thinks there is. !github commit log.PNG|width=681,height=181! And just for the sake of completeness, here's the GitHub hook log from the master branch job. !master github push.PNG|width=901,height=367! |
Attachment | New: jenkins log.PNG [ 46003 ] |
Description |
Original:
Jenkins version: 2.163 Github plugin version: 1.29.3 Git plugin version: 3.9.3 Git client plugin version: 2.7.6 Job Type: Multibranch Job We're currently using the Github plugin so that commits to our repo trigger Github webhooks to our Jenkins server. For the most part, it works. However, at least a few times a week a build will be triggered for a branch that doesn't have a commit. For instance, if I make a commit to ProjectA/develop, it thinks it detects a change and triggers a build for the 2 other branches, ProjectA/stage and ProjectA/master, even though those branches don't have any recent commits. Here are more details based off our current issue: The webhook log from our github repo showing a push to the develop branch at 19:44:23 MST. !webhook log.PNG|width=583,height=392! Here we see Jenkins receiving the hook and checking the branches for changes to build. Notice that it detects changes in all 3 configured branches even though develop was the one that triggered the build. Also note that our Jenkins server is set to UTC time so it's actually 19:44:26PM MST that it logged the PushEvent. !jenkins log.PNG|width=776,height=198! Here we can see the commits to he master branch. Last one was Oct 24, 2018. So there's definitely nothing new in there to build even though Jenkins thinks there is. !github commit log.PNG|width=681,height=181! And just for the sake of completeness, here's the GitHub hook log from the master branch job. !master github push.PNG|width=901,height=367! |
New:
Jenkins version: 2.163 Github plugin version: 1.29.3 Git plugin version: 3.9.3 Git client plugin version: 2.7.6 Job Type: Multibranch Job We're currently using the Github plugin so that commits to our repo trigger Github webhooks to our Jenkins server. For the most part, it works. However, at least a few times a week a build will be triggered for a branch that doesn't have a commit. For instance, if I make a commit to ProjectA/develop, it thinks it detects a change and triggers a build for the 2 other branches, ProjectA/stage and ProjectA/master, even though those branches don't have any recent commits. Here are more details based off our current issue: The webhook log from our github repo showing a push to the develop branch at 19:44:23 MST. !webhook log.PNG|width=583,height=392! Here we see Jenkins receiving the hook and checking the branches for changes to build. Notice that it detects changes in all 3 configured branches even though develop was the one that triggered the build. Also note that our Jenkins server is set to UTC time so it's actually 19:44:26PM MST that it logged the PushEvent. !jenkins log.PNG|width=890,height=227! Here we can see the commits to he master branch. Last one was Oct 24, 2018. So there's definitely nothing new in there to build even though Jenkins thinks there is. !github commit log.PNG|width=681,height=181! And just for the sake of completeness, here's the GitHub hook log from the master branch job. !master github push.PNG|width=901,height=367! |
Attachment | Original: jenkins log.PNG [ 46000 ] |
Assignee | Original: Mark Waite [ markewaite ] |
I don't know how to duplicate the problem. Thanks for the good details in the report. I hope you'll discover additional details as you explore further.