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

AbstractProject.doWipeOutWorkspace() should support SCM.processWorkspaceBeforeDeletion()


    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None
    • Platform: All, OS: All

      Before a workspace is deleted by hudson.model.WorkspaceCleanupThread, it checks
      with the SCM for the job to see if it should be allowed to delete the workspace,
      by calling hudson.scm.SCM.processWorkspaceBeforeDeletion. I'm going to be adding
      an override of that method in the ClearCase plugin to remove the ClearCase view
      and then return true, so that we don't end up with a view still registered in
      ClearCase after its view storage, etc have been deleted.

      However, when "Wipe Out Workspace" is used, there is no check with the SCM
      first. The workspace is just deleted. I believe that doWipeOutWorkspace in
      AbstractProject should call processWorkspaceBeforeDeletion before deleting the
      workspace contents, and should only proceed if processWorkspaceBeforeDeletion
      returns true. This will give us the ability to remove the ClearCase view when
      "Wipe Out Workspace" is used, as well as the ability for SCMs to veto the
      deletion of the workspace.

            abayer Andrew Bayer
            abayer Andrew Bayer
            0 Vote for this issue
            0 Start watching this issue