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

Shelve Project Plugin fails to delete project after shelving

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Won't Fix
    • Component/s: shelve-project-plugin
    • Labels:
      None
    • Environment:
      Jenkins 2.7.1, shelve-project-plugin 1.5
    • Similar Issues:

      Description

      I am working on shelving 1000's of old jobs. There seem to be a number that stick around even after attempting to shelve them. If I look in the shelvedProjects folder it will be listed multiple times. Example:

      myjob-1506456084916.zip
      myjob-1506458192641.zip
      myjob-1506458266098.zip
      

      The shelve job plugin is supposed to delete the job after it finishes shelving it but this is not happening in this case for certain jobs.

      Turning on logging to ALL for the shelve project plugin results in this:

      Sep 26, 2017 4:52:08 PM INFO org.jvnet.hudson.plugins.shelveproject.ShelveProjectAction doShelveProject
      Shelving project [myjob].
      Sep 26, 2017 4:52:08 PM INFO org.jvnet.hudson.plugins.shelveproject.ShelveProjectExecutable wipeoutWorkspace
      Wiping out workspace for project [myjob].
      Sep 26, 2017 4:52:08 PM SEVERE org.jvnet.hudson.plugins.shelveproject.ShelveProjectExecutable wipeoutWorkspace
      Could not wipeout workspace [myjob].
      java.lang.NullPointerException
      	at hudson.model.Run.getEnvironment(Run.java:2232)
      	at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:922)
      	at com.deluan.jenkins.plugins.rtc.JazzSCM.getConfiguration(JazzSCM.java:655)
      	at com.deluan.jenkins.plugins.rtc.JazzSCM.getClientInstance(JazzSCM.java:147)
      	at com.deluan.jenkins.plugins.rtc.JazzSCM.processWorkspaceBeforeDeletion(JazzSCM.java:605)
      	at hudson.model.AbstractProject.doDoWipeOutWorkspace(AbstractProject.java:1931)
      	at org.jvnet.hudson.plugins.shelveproject.ShelveProjectExecutable.wipeoutWorkspace(ShelveProjectExecutable.java:83)
      	at org.jvnet.hudson.plugins.shelveproject.ShelveProjectExecutable.archiveProject(ShelveProjectExecutable.java:55)
      	at org.jvnet.hudson.plugins.shelveproject.ShelveProjectExecutable.run(ShelveProjectExecutable.java:41)
      	at hudson.model.ResourceController.execute(ResourceController.java:98)
      	at hudson.model.Executor.run(Executor.java:410)
      
      Sep 26, 2017 4:52:08 PM INFO org.jvnet.hudson.plugins.shelveproject.ShelveProjectExecutable archiveProject
      Creating archive for project [myjob].
      Sep 26, 2017 4:52:08 PM INFO org.jvnet.hudson.plugins.shelveproject.ShelveProjectExecutable deleteProject
      Deleting project [myjob].
      Sep 26, 2017 4:52:08 PM SEVERE org.jvnet.hudson.plugins.shelveproject.ShelveProjectExecutable deleteProject
      Could not delete project [myjob].
      java.lang.NullPointerException
      	at hudson.model.Run.getEnvironment(Run.java:2232)
      	at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:922)
      	at com.deluan.jenkins.plugins.rtc.JazzSCM.getConfiguration(JazzSCM.java:655)
      	at com.deluan.jenkins.plugins.rtc.JazzSCM.getClientInstance(JazzSCM.java:147)
      	at com.deluan.jenkins.plugins.rtc.JazzSCM.processWorkspaceBeforeDeletion(JazzSCM.java:605)
      	at hudson.model.AbstractProject.performDelete(AbstractProject.java:374)
      	at hudson.model.AbstractItem.delete(AbstractItem.java:589)
      	at hudson.model.Job.delete(Job.java:688)
      	at org.jvnet.hudson.plugins.shelveproject.ShelveProjectExecutable.deleteProject(ShelveProjectExecutable.java:104)
      	at org.jvnet.hudson.plugins.shelveproject.ShelveProjectExecutable.run(ShelveProjectExecutable.java:43)
      	at hudson.model.ResourceController.execute(ResourceController.java:98)
      	at hudson.model.Executor.run(Executor.java:410)
      

        Attachments

          Activity

          Hide
          mrichar2 Mark R added a comment -

          Closing as this isn't caused by the shelve-project-plugin. I get a similar stacktrace attempting to delete the project directly.

          Show
          mrichar2 Mark R added a comment - Closing as this isn't caused by the shelve-project-plugin. I get a similar stacktrace attempting to delete the project directly.
          Hide
          mrichar2 Mark R added a comment -

          Closing as this is a problem deleting the job and is not caused by the shelve-project-plugin.

          I was able to work around the issue by resaving the job config. Something in the config must of been stale.

          Show
          mrichar2 Mark R added a comment - Closing as this is a problem deleting the job and is not caused by the shelve-project-plugin. I was able to work around the issue by resaving the job config. Something in the config must of been stale.

            People

            • Assignee:
              ashlux ashlux
              Reporter:
              mrichar2 Mark R
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: