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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • git-plugin
    • None
    • Docker instance as described later in bug report, including unreleased version of git plugin

      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.

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

              Created:
              Updated:
              Resolved: