Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-32174

Git Plugin not finding jobs building on branches with forward slashes

    Details

    • Similar Issues:

      Description

      I have a git repo called uberad-platform. There is a branch in this repo called: jmihalich/bidders/dynamicHosts. When i commit changes to this branch and push to the remote repo, the post receive hook makes the following curl command to the jenkins server:

      curl http://jenkins.ubermedia.com:8080/git/notifyCommit?url=<omitted>:uberad-platform&branches=jmihalich/bidders/dynamicHosts.

      However, jenkins responds with this:

      No git jobs using repository: <omitted>:uberad-platform and branches: jmihalich/bidders/dynamicHosts

      I've attached a screenshot of the relevant portion of the jenkins job showing that it is in fact using the correct branch.

      This was working at some point, and either broke or functionality changed that i'm not aware of. I don't know if this is related specifically to the fact that there is a slash in the branch name or not. All i know is, other jobs that just have a branch name like Production or Stage are found and build correctly when we push to those branches.

      Please advise.

      Thanks,
      Joe

        Attachments

          Activity

          Hide
          mihalich Joe Mihalich added a comment -

          Btw, forgot to mention versions i'm on:

          jenkins: 1.638
          Git plugin: 2.4.0
          Git client plugin: 1.19.0

          Show
          mihalich Joe Mihalich added a comment - Btw, forgot to mention versions i'm on: jenkins: 1.638 Git plugin: 2.4.0 Git client plugin: 1.19.0
          Hide
          markewaite Mark Waite added a comment - - edited

          You say that it worked at one time. Any hint of the versions when it last worked for you?

          When I call notifyCommit with no parameters, the builds seem to trigger exactly as expected for changes on the branch. When I add the branches parameter, the builds do not seem to trigger reliably.

          I have duplicated this bug by configuring a few different test cases:

          Branch Name No notifyCommit param branches notifyCommit param branches+sha1 notifyCommit param
          no-slash runs as expected runs as expected runs as expected
          develop/verify/bug runs as expected does not run does not run

          In those cases where it does not run, the job runs as expected if I click the "Poll Now" link on the job definition page.

          Show
          markewaite Mark Waite added a comment - - edited You say that it worked at one time. Any hint of the versions when it last worked for you? When I call notifyCommit with no parameters, the builds seem to trigger exactly as expected for changes on the branch. When I add the branches parameter, the builds do not seem to trigger reliably. I have duplicated this bug by configuring a few different test cases: Branch Name No notifyCommit param branches notifyCommit param branches+sha1 notifyCommit param no-slash runs as expected runs as expected runs as expected develop/verify/bug runs as expected does not run does not run In those cases where it does not run, the job runs as expected if I click the "Poll Now" link on the job definition page.
          Hide
          mihalich Joe Mihalich added a comment -

          Hi, glad you were able to reproduce it.

          We don't usually have this case we're we're building off branches, so it's been a while since i've last had a job that tries to build a branch with slashes. So i'm not sure what versions it would have worked on.

          I seem to recall a while ago that this same problem existed, and it was due to a regex change in the plugin that was searching for jobs. But obviously the problem could be totally different now.

          Thanks for helping!

          Show
          mihalich Joe Mihalich added a comment - Hi, glad you were able to reproduce it. We don't usually have this case we're we're building off branches, so it's been a while since i've last had a job that tries to build a branch with slashes. So i'm not sure what versions it would have worked on. I seem to recall a while ago that this same problem existed, and it was due to a regex change in the plugin that was searching for jobs. But obviously the problem could be totally different now. Thanks for helping!
          Hide
          markewaite Mark Waite added a comment -

          Fixed for Freestyle jobs in git plugin 4.0.0-beta4 and later

          Show
          markewaite Mark Waite added a comment - Fixed for Freestyle jobs in git plugin 4.0.0-beta4 and later

            People

            • Assignee:
              Unassigned
              Reporter:
              mihalich Joe Mihalich
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: