git plugin: webhooks from different branches trigger all jobs if webhook includes SHA1

45 views
Skip to first unread message

Martin Zechleitner

unread,
Jul 2, 2020, 11:29:07 AM7/2/20
to Jenkins Users

Hello,


I use the git plugin with post receive hooks (webhooks). My repository has different branches.


When the post receive hook includes only the git address (in my case ssh) the plugin works as expected:

Commits on one branch only trigger jobs, which are configured to it by "Branches to build".

 

In case the post received hook includes a hash/SHA1 (sha1=123456789a), git plugin does not check the branch it is configured to and builds all Jenkins jobs which are linked to the repository although there was no change on some of the branches.


Is this behavior wanted/expected? In my point of view the plugin should also check the branches, even if a hash/SHA1 is added to the webhook.


I use Jenkins ver. 2.176.1, git plugin  3.10.1


Best regards,

Martin

Mark Waite

unread,
Jul 2, 2020, 3:11:52 PM7/2/20
to Jenkins Users
You're correct.  That's a bug.  Best workaround currently is to not send SHA1 arguments to the web hook.

--
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/af1f0e19-4873-4e5a-a978-b7249723222eo%40googlegroups.com.

Martin Zechleitner

unread,
Jul 3, 2020, 8:50:01 AM7/3/20
to Jenkins Users
Is this bug already documented/reported?
Is there a fix planned for this bug?
Reply all
Reply to author
Forward
0 new messages