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

notifyCommit branch parameter can't contain slashes

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: git-plugin
    • Labels:
    • Environment:
      Jenkins 1.620, Git Plugin 2.4.0
    • Similar Issues:

      Description

      I have a simple Jenkins job called "myjob":

      Repository URL: git://github.com/jenkinsci/git-client-plugin.git
      Branches to build: tests/getSubmodules
      Build Triggers > Poll SCM is enabled

      I execute

      curl -s http://myjenkinssrv/jenkins/git/notifyCommit -d url=git://github.com/jenkinsci/git-client-plugin.git -d branches=tests/getSubmodules

      and I get

      No git jobs using repository: git://github.com/jenkinsci/git-client-plugin.git and branches: tests/getSubmodules

      This is wrong! If I configure my job with "Branches to build"=master and call

      curl -s http://myjenkinssrv/jenkins/git/notifyCommit -d url=git://github.com/jenkinsci/git-client-plugin.git -d branches=master

      it works, as expected.

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Nicolas Glayre
          Path:
          src/main/java/hudson/plugins/git/BranchSpec.java
          src/main/java/hudson/plugins/git/GitSCM.java
          src/main/java/hudson/plugins/git/GitStatus.java
          src/test/java/hudson/plugins/git/GitStatusTest.java
          http://jenkins-ci.org/commit/git-plugin/1db52c4b7fa03eb6c7d61a0af86a2b3e18343051
          Log:
          JENKINS-29603 Fix notifyCommit for branches that contain slashes

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Nicolas Glayre Path: src/main/java/hudson/plugins/git/BranchSpec.java src/main/java/hudson/plugins/git/GitSCM.java src/main/java/hudson/plugins/git/GitStatus.java src/test/java/hudson/plugins/git/GitStatusTest.java http://jenkins-ci.org/commit/git-plugin/1db52c4b7fa03eb6c7d61a0af86a2b3e18343051 Log: JENKINS-29603 Fix notifyCommit for branches that contain slashes
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Nicolas Glayre
          Path:
          src/test/java/hudson/plugins/git/GitStatusTest.java
          http://jenkins-ci.org/commit/git-plugin/b184f2b46eb2b0cb6e0274b28e138f39c7be1c68
          Log:
          JENKINS-29603 Fixing failing tests added on master branch

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Nicolas Glayre Path: src/test/java/hudson/plugins/git/GitStatusTest.java http://jenkins-ci.org/commit/git-plugin/b184f2b46eb2b0cb6e0274b28e138f39c7be1c68 Log: JENKINS-29603 Fixing failing tests added on master branch
          Hide
          jbochenski Jakub Bochenski added a comment -

          I confirm using the origin/<slashyBranch> workaround helps. No other forms seem to work though (e.g refs/heads/... or refs/remotes/...)

          Show
          jbochenski Jakub Bochenski added a comment - I confirm using the origin/<slashyBranch> workaround helps. No other forms seem to work though (e.g refs/heads/... or refs/remotes/...)
          Hide
          pyrocks Mor L added a comment -

          Workaround works in our case too - but seeing the fix already merged to a beta of version 4 of the Git plugin - when is it due to be released officially (as in available through Jenkins update center)?

          Show
          pyrocks Mor L added a comment - Workaround works in our case too - but seeing the fix already merged to a beta of version 4 of the Git plugin - when is it due to be released officially (as in available through Jenkins update center)?
          Hide
          markewaite Mark Waite added a comment - - edited

          Mor L my current goal is to release git plugin 4 before the end of Feb 2019. There are still several things that must be completed before that release. You can see the progress on the pull requests that need to precede release in the git client plugin 3.0 milestone and the git plugin 4.0 milestone.

          You're welcome (and encouraged) to download and install the pre-release versions of the git client plugin 3.0.0 and the git plugin 4.0.0. Those versions are the most recent builds of the master branch. Report any issues with those versions and you'll be helping the community have a better release.

          Show
          markewaite Mark Waite added a comment - - edited Mor L my current goal is to release git plugin 4 before the end of Feb 2019. There are still several things that must be completed before that release. You can see the progress on the pull requests that need to precede release in the git client plugin 3.0 milestone and the git plugin 4.0 milestone . You're welcome (and encouraged) to download and install the pre-release versions of the git client plugin 3.0.0 and the git plugin 4.0.0 . Those versions are the most recent builds of the master branch. Report any issues with those versions and you'll be helping the community have a better release.

            People

            • Assignee:
              Unassigned
              Reporter:
              ludwig Ludwig Arnesen
            • Votes:
              5 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

              • Created:
                Updated: