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

Using disableDeferredWipeout within pipeline job results in no deleted workspace

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Cannot Reproduce
    • Component/s: ws-cleanup-plugin
    • Labels:
      None
    • Environment:
      wsCleanup 0.36 and Jenkins ver. 2.138.2
      Jenkins node is Fedora 28
    • Similar Issues:

      Description

      We are using pipeline and at the end of the pipeline we have a stage as below. We added the disableDeferredWipeout recently to make sure that all disk space of the workspace is reclaimed before the job ends. We now notice that the workspace is not deleted anymore, when we remove the disableDeferredWipeout the workspace directory is gone again. Have tried to find some logs but can't find anything.

      stage('Post cleanup') {

      step([$class: 'WsCleanup', disableDeferredWipeout: true])

      }

      In the log we only get the message below but at the end the workspace is still there

      [WS-CLEANUP] Deleting project workspace...
      [WS-CLEANUP] Deferred wipeout is disabled by the job configuration...
      [WS-CLEANUP] done

       

      As reproducer you can use the pipeline job below, only adapt the node argument. After the pipeline job has finished we would expect to have an empty workspace but with disableDeferredWipeout:true the buildtools directory is still there, without the argument the workspace is deleted

      node('Scarab_fc28_x86_64_01') {
      stage('Pre cleanup')

      { cleanWs() }

      stage('Buildtools checkout') {
      dir ('buildtools')

      { git changelog: false, poll: false, url: 'https://github.com/DOCGroup/MPC', shallow: true }

      }

      stage('Post cleanup')

      { cleanWs disableDeferredWipeout:true // cleanWs() }

      }

       

        Attachments

          Issue Links

            Activity

            jwillemsen Johnny Willemsen created issue -
            jwillemsen Johnny Willemsen made changes -
            Field Original Value New Value
            Environment wsCleanup 0.36 and Jenkins ver. 2.138.2
            Jenkins node is Fedora 28
            jwillemsen Johnny Willemsen made changes -
            Description We are using pipeline and at the end of the pipeline we have a stage as below. We added the disableDeferredWipeout recently to make sure that all disk space of the workspace is reclaimed before the job ends. We now notice that the workspace is not deleted anymore, when we remove the disableDeferredWipeout the workspace directory is gone again. Have tried to find some logs but can't find anything.

            {{stage('Post cleanup') {}}

            {{step([$class: 'WsCleanup', disableDeferredWipeout: true])}}

            {{}}}

            In the log we only get the message below but at the end the workspace is still there

            {{[WS-CLEANUP] Deleting project workspace...}}
            {{[WS-CLEANUP] Deferred wipeout is disabled by the job configuration...}}
            {{[WS-CLEANUP] done}}
            We are using pipeline and at the end of the pipeline we have a stage as below. We added the disableDeferredWipeout recently to make sure that all disk space of the workspace is reclaimed before the job ends. We now notice that the workspace is not deleted anymore, when we remove the disableDeferredWipeout the workspace directory is gone again. Have tried to find some logs but can't find anything.

            {{stage('Post cleanup') {}}

            {{step([$class: 'WsCleanup', disableDeferredWipeout: true])}}

            {{}}}

            In the log we only get the message below but at the end the workspace is still there

            {{[WS-CLEANUP] Deleting project workspace...}}
             {{[WS-CLEANUP] Deferred wipeout is disabled by the job configuration...}}
             {{[WS-CLEANUP] done}}

             

            As reproducer you can use the pipeline job below, only adapt the node argument. After the pipeline job has finished we would expect to have an empty workspace but with disableDeferredWipeout:true the buildtools directory is still there, without the argument the workspace is deleted

            {{node('Scarab_fc28_x86_64_01') {}}
            {{  stage('Pre cleanup') {}}
            {{    cleanWs()}}
            {{  }}}
            {{  stage('Buildtools checkout') {}}
            {{    dir ('buildtools') {}}
            {{      git changelog: false, poll: false, url: 'https://github.com/DOCGroup/MPC', shallow: true}}
            {{    }}}
            {{  }}}
             
            {{ stage('Post cleanup') {}}
            {{ cleanWs disableDeferredWipeout:true}}
            {{// cleanWs()}}
            {{ }}}
            {{}}}
            jwillemsen Johnny Willemsen made changes -
            Description We are using pipeline and at the end of the pipeline we have a stage as below. We added the disableDeferredWipeout recently to make sure that all disk space of the workspace is reclaimed before the job ends. We now notice that the workspace is not deleted anymore, when we remove the disableDeferredWipeout the workspace directory is gone again. Have tried to find some logs but can't find anything.

            {{stage('Post cleanup') {}}

            {{step([$class: 'WsCleanup', disableDeferredWipeout: true])}}

            {{}}}

            In the log we only get the message below but at the end the workspace is still there

            {{[WS-CLEANUP] Deleting project workspace...}}
             {{[WS-CLEANUP] Deferred wipeout is disabled by the job configuration...}}
             {{[WS-CLEANUP] done}}

             

            As reproducer you can use the pipeline job below, only adapt the node argument. After the pipeline job has finished we would expect to have an empty workspace but with disableDeferredWipeout:true the buildtools directory is still there, without the argument the workspace is deleted

            {{node('Scarab_fc28_x86_64_01') {}}
            {{  stage('Pre cleanup') {}}
            {{    cleanWs()}}
            {{  }}}
            {{  stage('Buildtools checkout') {}}
            {{    dir ('buildtools') {}}
            {{      git changelog: false, poll: false, url: 'https://github.com/DOCGroup/MPC', shallow: true}}
            {{    }}}
            {{  }}}
             
            {{ stage('Post cleanup') {}}
            {{ cleanWs disableDeferredWipeout:true}}
            {{// cleanWs()}}
            {{ }}}
            {{}}}
            We are using pipeline and at the end of the pipeline we have a stage as below. We added the disableDeferredWipeout recently to make sure that all disk space of the workspace is reclaimed before the job ends. We now notice that the workspace is not deleted anymore, when we remove the disableDeferredWipeout the workspace directory is gone again. Have tried to find some logs but can't find anything.

            {{stage('Post cleanup') {}}

            {{step([$class: 'WsCleanup', disableDeferredWipeout: true])}}

            {{}}}

            In the log we only get the message below but at the end the workspace is still there

            {{[WS-CLEANUP] Deleting project workspace...}}
             {{[WS-CLEANUP] Deferred wipeout is disabled by the job configuration...}}
             {{[WS-CLEANUP] done}}

             

            As reproducer you can use the pipeline job below, only adapt the node argument. After the pipeline job has finished we would expect to have an empty workspace but with disableDeferredWipeout:true the buildtools directory is still there, without the argument the workspace is deleted

            node('Scarab_fc28_x86_64_01') {
             stage('Pre cleanup') {
             cleanWs()
             }
             stage('Buildtools checkout') {
             dir ('buildtools') {
             git changelog: false, poll: false, url: 'https://github.com/DOCGroup/MPC', shallow: true
             }
             }
             
             stage('Post cleanup') {
             cleanWs disableDeferredWipeout:true
            // cleanWs()
             }
            }

             
            roufique2 Roufique Hossain made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            olivergondza Oliver Gondža made changes -
            Status In Progress [ 3 ] Open [ 1 ]
            olivergondza Oliver Gondža made changes -
            Assignee Oliver Gondža [ olivergondza ] Pavel Janoušek [ pajasoft ]
            pajasoft Pavel Janoušek made changes -
            Link This issue is related to JENKINS-55443 [ JENKINS-55443 ]
            pajasoft Pavel Janoušek made changes -
            Status Open [ 1 ] Resolved [ 5 ]
            Resolution Cannot Reproduce [ 5 ]

              People

              • Assignee:
                pajasoft Pavel Janoušek
                Reporter:
                jwillemsen Johnny Willemsen
              • Votes:
                1 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: