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

Manually triggering a build, which clones a workspace, which is then used by the Multiple SCM Plugin causes job failure

    XMLWordPrintable

Details

    Description

      The console output of the job including the stacktrace is sufficient to explain the cause of the problem.

      There is an assumption in the plugin that there were changes which triggered the build, and the cause of the exception is that there were no changes. The triggering job was manually triggered.

      The solution is either to have the multiple-scm plugin not return null for changes() or to have the clone-workspace-scm accept null for a changeset.

      Started by upstream project "Concordance Trigger" build number 3
      Building remotely on Java6 in workspace /home/jenkins/java6_slave/workspace/Concordance
      Checkout:Concordance / /home/jenkins/java6_slave/workspace/Concordance - hudson.remoting.Channel@1c32b82:Java6
      Using strategy: Default
      Last Built Revision: Revision 025dcdbe80a53467cf7cfac9de33c08aa7e77e13 (oshell_origin/staging)
      Checkout:OShell / /home/jenkins/java6_slave/workspace/Concordance/OShell - hudson.remoting.LocalChannel@13c7b26
      Cloning the remote Git repository
      Cloning repository oshell_origin
      Fetching upstream changes from ssh://git@ken-desktop/revision_control/git/OShell
      Commencing build of Revision 025dcdbe80a53467cf7cfac9de33c08aa7e77e13 (oshell_origin/staging)
      Checking out Revision 025dcdbe80a53467cf7cfac9de33c08aa7e77e13 (oshell_origin/staging)
      Restoring workspace from build #3 of project Concordance Trigger
      FATAL: null
      java.lang.NullPointerException
      at hudson.plugins.cloneworkspace.CloneWorkspaceSCM.createChangeLogParser(CloneWorkspaceSCM.java:185)
      at org.jenkinsci.plugins.multiplescms.MultiSCMChangeLogParser.<init>(MultiSCMChangeLogParser.java:40)
      at org.jenkinsci.plugins.multiplescms.MultiSCM.createChangeLogParser(MultiSCM.java:155)
      at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:583)
      at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:468)
      at hudson.model.Run.run(Run.java:1410)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:238)

      Attachments

        Activity

          kkgraham Ken Graham added a comment -

          Updated description and plugins listed, so that responsibility is accurately reflected.

          kkgraham Ken Graham added a comment - Updated description and plugins listed, so that responsibility is accurately reflected.

          can someone please fix this problem? ken graham has even posted a solution.

          z3r0 Zaraki Kenpachi added a comment - can someone please fix this problem? ken graham has even posted a solution.
          arzie Robert added a comment - - edited

          I've added a null check, which seemed to help in our case:
          https://github.com/Arzie/jenkins-clone-workspace-scm-plugin

          Unfortunately, now we get a NPE somewhere upstream . I'm trying to fix it now and will push when it's done.

          arzie Robert added a comment - - edited I've added a null check, which seemed to help in our case: https://github.com/Arzie/jenkins-clone-workspace-scm-plugin Unfortunately, now we get a NPE somewhere upstream . I'm trying to fix it now and will push when it's done.
          arzie Robert added a comment -

          Done! I've made a small modification and it works fine on our Jenkins instance.

          It can be downloaded over here:
          https://buildhive.cloudbees.com/job/jenkinsci/job/jenkins-clone-workspace-scm-plugin/7/org.jenkins-ci.plugins$clone-workspace-scm/

          arzie Robert added a comment - Done! I've made a small modification and it works fine on our Jenkins instance. It can be downloaded over here: https://buildhive.cloudbees.com/job/jenkinsci/job/jenkins-clone-workspace-scm-plugin/7/org.jenkins-ci.plugins$clone-workspace-scm/

          Code changed in jenkins
          User: Robert Zwerus
          Path:
          src/main/java/hudson/plugins/cloneworkspace/CloneWorkspaceSCM.java
          http://jenkins-ci.org/commit/jenkins-clone-workspace-scm-plugin/968dff386c8aad0e2c25f11dd1bf657093ee7bb6
          Log:
          JENKINS-13160 Add null check in CloneWorkspaceSCM.createChangeLogParser() to prevent NPE.

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Robert Zwerus Path: src/main/java/hudson/plugins/cloneworkspace/CloneWorkspaceSCM.java http://jenkins-ci.org/commit/jenkins-clone-workspace-scm-plugin/968dff386c8aad0e2c25f11dd1bf657093ee7bb6 Log: JENKINS-13160 Add null check in CloneWorkspaceSCM.createChangeLogParser() to prevent NPE.

          Code changed in jenkins
          User: Robert Zwerus
          Path:
          src/main/java/hudson/plugins/cloneworkspace/CloneWorkspaceSCM.java
          http://jenkins-ci.org/commit/jenkins-clone-workspace-scm-plugin/8716c62db6f86c495de7fb7068d82cf39ea72422
          Log:
          JENKINS-13160 Return a NullChangeLogParser instead of just 'null' in CloneWorkspaceSCM.createChangeLogParser().

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Robert Zwerus Path: src/main/java/hudson/plugins/cloneworkspace/CloneWorkspaceSCM.java http://jenkins-ci.org/commit/jenkins-clone-workspace-scm-plugin/8716c62db6f86c495de7fb7068d82cf39ea72422 Log: JENKINS-13160 Return a NullChangeLogParser instead of just 'null' in CloneWorkspaceSCM.createChangeLogParser().

          Code changed in jenkins
          User: Andrew Bayer
          Path:
          src/main/java/hudson/plugins/cloneworkspace/CloneWorkspaceSCM.java
          http://jenkins-ci.org/commit/jenkins-clone-workspace-scm-plugin/9bfdeb3ef0668718720d2da1f73983b8cc393a19
          Log:
          Merge pull request #5 from Arzie/master

          Fix for JENKINS-13160

          Compare: https://github.com/jenkinsci/jenkins-clone-workspace-scm-plugin/compare/805ab15bebd6...9bfdeb3ef066

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: src/main/java/hudson/plugins/cloneworkspace/CloneWorkspaceSCM.java http://jenkins-ci.org/commit/jenkins-clone-workspace-scm-plugin/9bfdeb3ef0668718720d2da1f73983b8cc393a19 Log: Merge pull request #5 from Arzie/master Fix for JENKINS-13160 Compare: https://github.com/jenkinsci/jenkins-clone-workspace-scm-plugin/compare/805ab15bebd6...9bfdeb3ef066

          People

            kbell Kevin Bell
            kkgraham Ken Graham
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: