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

Scan of git pipeline fails with NPE due to recent GitSCMSource change

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Component/s: git-plugin
    • Labels:
      None
    • Environment:
      Docker instance as described later in bug report, including unreleased version of git plugin
    • Similar Issues:

      Description

      Initial scan of branches in a multi-branch-project fails with a null pointer exception. It seems to be due to the addition of GitSCMSource: support custom remote and refspec.

      Steps to duplicate the problem:

      1. Clone, build, and run the docker instance
          $ git lfs clone https://github.com/MarkEWaite/docker-lfs JENKINS-42204
          $ cd JENKINS-42204
          $ git lfs fetch origin 4bd3aba9910323f8bc279ad5bd7ac3ae8d5ffd5f
          $ git checkout -b lts-with-plugins 4bd3aba9910323f8bc279ad5bd7ac3ae8d5ffd5f
          $ docker build -t jenkins:JENKINS-42204 .
          $ docker run -i --rm --publish 8080:8080 jenkins:JENKINS-42204
        
      2. Connect a web browser to that docker instance (http://localhost:8080)
      3. Open the "Bugs - Pipeline Checks"
      4. Open the "jenkins-bugs" multi-branch pipeline job
      5. Click the "Scan Multibranch Pipeline" link and then the "Run Now" link to start branch indexing
      6. Click the "Log" link to view the log - stack trace will appear in that log

      If I revert the commit for GitSCMSource: support custom remote and refspec, the problem no longer appears. Refer to PR466 for more details.

        Attachments

          Activity

          markewaite Mark Waite created issue -
          markewaite Mark Waite made changes -
          Field Original Value New Value
          Description Initial scan of branches in a multi-branch-project fails with a null pointer exception. It seems to be due to the addition of GitSCMSource: support custom remote and refspec.

          Steps to duplicate the problem:
          # Clone, build, and run the docker instance
          {code}
            $ git lfs clone https://github.com/MarkEWaite/docker-lfs JENKINS-xxx
            $ cd JENKINS-xxx
            $ git lfs fetch origin origin/lts-with-plugins
            $ git checkout -b lts-with-plugins -t origin/lts-with-plugins
            $ docker build -t jenkins:JENKINS-xxx .
            $ docker run -i --rm --publish 8080:8080 jenkins:JENKINS-xxx
          {code}
          # Connect a web browser to that docker instance (http://localhost:8080)
          # Open the "Bugs - Pipeline Checks"
          # Open the "jenkins-bugs" multi-branch pipeline job
          # Click the "Scan Multibranch Pipeline" link and then the "Run Now" link to start branch indexing
          # Click the "Log" link to view the log - stack trace will appear in that log

          If I revert the commit for [GitSCMSource: support custom remote and refspec|https://github.com/jenkinsci/git-plugin/commit/2101155707ee5d282ec3f9008e0a9bec31217284], the problem no longer appears.
          Initial scan of branches in a multi-branch-project fails with a null pointer exception. It seems to be due to the addition of GitSCMSource: support custom remote and refspec.

          Steps to duplicate the problem:
          # Clone, build, and run the docker instance
          {code}
            $ git lfs clone https://github.com/MarkEWaite/docker-lfs JENKINS-42204
            $ cd JENKINS-42204
            $ git lfs fetch origin origin/lts-with-plugins
            $ git checkout -b lts-with-plugins -t origin/lts-with-plugins
            $ docker build -t jenkins:JENKINS-42204 .
            $ docker run -i --rm --publish 8080:8080 jenkins:JENKINS-42204
          {code}
          # Connect a web browser to that docker instance (http://localhost:8080)
          # Open the "Bugs - Pipeline Checks"
          # Open the "jenkins-bugs" multi-branch pipeline job
          # Click the "Scan Multibranch Pipeline" link and then the "Run Now" link to start branch indexing
          # Click the "Log" link to view the log - stack trace will appear in that log

          If I revert the commit for [GitSCMSource: support custom remote and refspec|https://github.com/jenkinsci/git-plugin/commit/2101155707ee5d282ec3f9008e0a9bec31217284], the problem no longer appears.
          markewaite Mark Waite made changes -
          Environment Docker instance as described later in bug report Docker instance as described later in bug report, including unreleased version of git plugin
          markewaite Mark Waite made changes -
          Description Initial scan of branches in a multi-branch-project fails with a null pointer exception. It seems to be due to the addition of GitSCMSource: support custom remote and refspec.

          Steps to duplicate the problem:
          # Clone, build, and run the docker instance
          {code}
            $ git lfs clone https://github.com/MarkEWaite/docker-lfs JENKINS-42204
            $ cd JENKINS-42204
            $ git lfs fetch origin origin/lts-with-plugins
            $ git checkout -b lts-with-plugins -t origin/lts-with-plugins
            $ docker build -t jenkins:JENKINS-42204 .
            $ docker run -i --rm --publish 8080:8080 jenkins:JENKINS-42204
          {code}
          # Connect a web browser to that docker instance (http://localhost:8080)
          # Open the "Bugs - Pipeline Checks"
          # Open the "jenkins-bugs" multi-branch pipeline job
          # Click the "Scan Multibranch Pipeline" link and then the "Run Now" link to start branch indexing
          # Click the "Log" link to view the log - stack trace will appear in that log

          If I revert the commit for [GitSCMSource: support custom remote and refspec|https://github.com/jenkinsci/git-plugin/commit/2101155707ee5d282ec3f9008e0a9bec31217284], the problem no longer appears.
          Initial scan of branches in a multi-branch-project fails with a null pointer exception. It seems to be due to the addition of GitSCMSource: support custom remote and refspec.

          Steps to duplicate the problem:
          # Clone, build, and run the docker instance
          {code}
            $ git lfs clone https://github.com/MarkEWaite/docker-lfs JENKINS-42204
            $ cd JENKINS-42204
            $ git lfs fetch origin 4bd3aba9910323f8bc279ad5bd7ac3ae8d5ffd5f
            $ git checkout -b lts-with-plugins 4bd3aba9910323f8bc279ad5bd7ac3ae8d5ffd5f
            $ docker build -t jenkins:JENKINS-42204 .
            $ docker run -i --rm --publish 8080:8080 jenkins:JENKINS-42204
          {code}
          # Connect a web browser to that docker instance (http://localhost:8080)
          # Open the "Bugs - Pipeline Checks"
          # Open the "jenkins-bugs" multi-branch pipeline job
          # Click the "Scan Multibranch Pipeline" link and then the "Run Now" link to start branch indexing
          # Click the "Log" link to view the log - stack trace will appear in that log

          If I revert the commit for [GitSCMSource: support custom remote and refspec|https://github.com/jenkinsci/git-plugin/commit/2101155707ee5d282ec3f9008e0a9bec31217284], the problem no longer appears.
          markewaite Mark Waite made changes -
          Description Initial scan of branches in a multi-branch-project fails with a null pointer exception. It seems to be due to the addition of GitSCMSource: support custom remote and refspec.

          Steps to duplicate the problem:
          # Clone, build, and run the docker instance
          {code}
            $ git lfs clone https://github.com/MarkEWaite/docker-lfs JENKINS-42204
            $ cd JENKINS-42204
            $ git lfs fetch origin 4bd3aba9910323f8bc279ad5bd7ac3ae8d5ffd5f
            $ git checkout -b lts-with-plugins 4bd3aba9910323f8bc279ad5bd7ac3ae8d5ffd5f
            $ docker build -t jenkins:JENKINS-42204 .
            $ docker run -i --rm --publish 8080:8080 jenkins:JENKINS-42204
          {code}
          # Connect a web browser to that docker instance (http://localhost:8080)
          # Open the "Bugs - Pipeline Checks"
          # Open the "jenkins-bugs" multi-branch pipeline job
          # Click the "Scan Multibranch Pipeline" link and then the "Run Now" link to start branch indexing
          # Click the "Log" link to view the log - stack trace will appear in that log

          If I revert the commit for [GitSCMSource: support custom remote and refspec|https://github.com/jenkinsci/git-plugin/commit/2101155707ee5d282ec3f9008e0a9bec31217284], the problem no longer appears.
          Initial scan of branches in a multi-branch-project fails with a null pointer exception. It seems to be due to the addition of GitSCMSource: support custom remote and refspec.

          Steps to duplicate the problem:
          # Clone, build, and run the docker instance
          {code}
            $ git lfs clone https://github.com/MarkEWaite/docker-lfs JENKINS-42204
            $ cd JENKINS-42204
            $ git lfs fetch origin origin/lts-with-plugins
            $ git checkout -b lts-with-plugins -t origin/lts-with-plugins
            $ docker build -t jenkins:JENKINS-42204 .
            $ docker run -i --rm --publish 8080:8080 jenkins:JENKINS-42204
          {code}
          # Connect a web browser to that docker instance (http://localhost:8080)
          # Open the "Bugs - Pipeline Checks"
          # Open the "jenkins-bugs" multi-branch pipeline job
          # Click the "Scan Multibranch Pipeline" link and then the "Run Now" link to start branch indexing
          # Click the "Log" link to view the log - stack trace will appear in that log

          If I revert the commit for [GitSCMSource: support custom remote and refspec|https://github.com/jenkinsci/git-plugin/commit/2101155707ee5d282ec3f9008e0a9bec31217284], the problem no longer appears. Refer to [PR466|https://github.com/jenkinsci/git-plugin/pull/466] for more details.
          markewaite Mark Waite made changes -
          Description Initial scan of branches in a multi-branch-project fails with a null pointer exception. It seems to be due to the addition of GitSCMSource: support custom remote and refspec.

          Steps to duplicate the problem:
          # Clone, build, and run the docker instance
          {code}
            $ git lfs clone https://github.com/MarkEWaite/docker-lfs JENKINS-42204
            $ cd JENKINS-42204
            $ git lfs fetch origin origin/lts-with-plugins
            $ git checkout -b lts-with-plugins -t origin/lts-with-plugins
            $ docker build -t jenkins:JENKINS-42204 .
            $ docker run -i --rm --publish 8080:8080 jenkins:JENKINS-42204
          {code}
          # Connect a web browser to that docker instance (http://localhost:8080)
          # Open the "Bugs - Pipeline Checks"
          # Open the "jenkins-bugs" multi-branch pipeline job
          # Click the "Scan Multibranch Pipeline" link and then the "Run Now" link to start branch indexing
          # Click the "Log" link to view the log - stack trace will appear in that log

          If I revert the commit for [GitSCMSource: support custom remote and refspec|https://github.com/jenkinsci/git-plugin/commit/2101155707ee5d282ec3f9008e0a9bec31217284], the problem no longer appears. Refer to [PR466|https://github.com/jenkinsci/git-plugin/pull/466] for more details.
          Initial scan of branches in a multi-branch-project fails with a null pointer exception. It seems to be due to the addition of GitSCMSource: support custom remote and refspec.

          Steps to duplicate the problem:
          # Clone, build, and run the docker instance
          {code}
            $ git lfs clone https://github.com/MarkEWaite/docker-lfs JENKINS-42204
            $ cd JENKINS-42204
            $ git lfs fetch origin 4bd3aba9910323f8bc279ad5bd7ac3ae8d5ffd5f
            $ git checkout -b lts-with-plugins 4bd3aba9910323f8bc279ad5bd7ac3ae8d5ffd5f
            $ docker build -t jenkins:JENKINS-42204 .
            $ docker run -i --rm --publish 8080:8080 jenkins:JENKINS-42204
          {code}
          # Connect a web browser to that docker instance (http://localhost:8080)
          # Open the "Bugs - Pipeline Checks"
          # Open the "jenkins-bugs" multi-branch pipeline job
          # Click the "Scan Multibranch Pipeline" link and then the "Run Now" link to start branch indexing
          # Click the "Log" link to view the log - stack trace will appear in that log

          If I revert the commit for [GitSCMSource: support custom remote and refspec|https://github.com/jenkinsci/git-plugin/commit/2101155707ee5d282ec3f9008e0a9bec31217284], the problem no longer appears. Refer to [PR466|https://github.com/jenkinsci/git-plugin/pull/466] for more details.
          markewaite Mark Waite made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          markewaite Mark Waite made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              jbq jbq
              Reporter:
              markewaite Mark Waite
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: