The git plugin includes support for multiple remotes (origin, upstream, downstream, etc.) and for multiple branches. It includes guessing code for those cases where a branch name is ambiguous (like 'develop' in a repository which includes branches named 'develop', 'kassandra/develop', and 'mwaite/develop'). in the context of multiple remotes or multiple branch names.
You can often avoid the guessing by naming the branch precisely, as in 'origin/develop'. Mark Waite On Wed, May 15, 2019 at 1:18 PM James Robson <[email protected]> wrote: > I have a repo with a branch called ‘develop’ and another branch called > ‘kassandra/develop’. I have created a pipeline job that is building on > ‘develop’, set to trigger with the ‘GitHub hook trigger for GITScm > polling’. > > > I expect this job to run only when ‘develop’ is changed, however it is > running on every commit to the repo. This seems to be because the scm > polling logic is comparing the last built git hash to the git hash on > ‘kassandra/develop’ (see excerpt of the polling log below). > > > Is this behaviour expected? Is there a way to prevent these unwanted runs? > > > Setup: > > Git plugin: 3.9.3 > > git client plugin: 2.7.6 > > > Git poll log: > > [poll] Last Built Revision: Revision 576aad8bdbfbf422d6a98899fafe78cc095ebb81 > (refs/remotes/origin/develop) > <snip> > [poll] Latest remote head revision on refs/heads/kassandra/develop is: > a9b4791c65f1ed2f1dc5669501fbeee58323e11e > > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-users/b3d3df79-0ab9-4fd8-aeb7-1e70bc2e87ca%40googlegroups.com > <https://groups.google.com/d/msgid/jenkinsci-users/b3d3df79-0ab9-4fd8-aeb7-1e70bc2e87ca%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Thanks! Mark Waite -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtHFeWBYBcgjO9%2BX9HGp_YiaLEEr661-ysf2aFrx1cdgnA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
