Details

    • Similar Issues:

      Description

      Hi,

       

      When deleting a job programmatically, a non pipeline job, we have a NPE:

       

      Mar 10, 2017 4:23:21 PM hudson.model.listeners.ItemListener forAll
      WARNING: failed to send event to listener of class org.jenkinsci.plugins.pipeline.milestone.MilestoneStepExecution$CleanupJobsOnDelete
      java.lang.NullPointerException
      at org.jenkinsci.plugins.pipeline.milestone.MilestoneStepExecution$CleanupJobsOnDelete.onDeleted(MilestoneStepExecution.java:348)
      at hudson.model.listeners.ItemListener$4.apply(ItemListener.java:205)
      at hudson.model.listeners.ItemListener$4.apply(ItemListener.java:203)
      at hudson.model.listeners.ItemListener.forAll(ItemListener.java:167)
      at hudson.model.listeners.ItemListener.fireOnDeleted(ItemListener.java:203)
      at jenkins.model.Jenkins.onDeleted(Jenkins.java:2918)
      at jenkins.model.Jenkins.onDeleted(Jenkins.java:324)
      at hudson.model.AbstractItem.delete(AbstractItem.java:572)
      at hudson.model.Job.delete(Job.java:683)

       

      The getMilestonesByOrdinalByJob() method might return null and should be checked against this.

       

      Best regards,

      Damien.

        Attachments

          Issue Links

            Activity

            Hide
            damien_coraboeuf Damien Coraboeuf added a comment -

            Hi,

            I've created the https://github.com/jenkinsci/pipeline-milestone-step-plugin/pull/11 PR to fix this issue.

            A bit more context: this happens at Jenkins startup. We have some Groovy scripts in init.groovy.d which delete and recreate some basic infrastructure jobs. The NPE appeared on deletion after we had installed all the pipeline plug-ins, including the milestone one.

             

            Best regards,

            Damien.

            Show
            damien_coraboeuf Damien Coraboeuf added a comment - Hi, I've created the https://github.com/jenkinsci/pipeline-milestone-step-plugin/pull/11  PR to fix this issue. A bit more context: this happens at Jenkins startup. We have some Groovy scripts in init.groovy.d which delete and recreate some basic infrastructure jobs. The NPE appeared on deletion after we had installed all the pipeline plug-ins, including the milestone one.   Best regards, Damien.

              People

              • Assignee:
                amuniz Antonio Muñiz
                Reporter:
                damien_coraboeuf Damien Coraboeuf
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: