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

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Martin Zechleitner

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

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/af1f0e19-4873-4e5a-a978-b7249723222eo%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

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

Mark Waite-2
You're correct.  That's a bug.  Best workaround currently is to not send SHA1 arguments to the web hook.

On Thu, Jul 2, 2020 at 9:29 AM Martin Zechleitner <[hidden email]> wrote:

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

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/af1f0e19-4873-4e5a-a978-b7249723222eo%40googlegroups.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtHAg%3DgRWpDJJksKqSZe3swr7tYy%2BUu1xfJQjwUbct1LPg%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

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

Martin Zechleitner
Is this bug already documented/reported?
Is there a fix planned for this bug?

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/244f12e5-35ff-4d60-933e-7da5bbab0c66o%40googlegroups.com.