• Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • p4-plugin
    • Jenkins 2.60.3
      P4-Plugin 1.7.5

      When the following global option

       is set using 'cleanup' or 'p4cleanup' with either the true or the false flag will cause the workspace to be deleted. If the global flag is not set then the cleanup will never delete the workspace (again ignoring the true or false flag).

          [JENKINS-47107] p4cleanup/cleanup ignores 'true/false' flag

          Karl Wirth added a comment -

          Suggest this is fixed or 'true/false' is removed from 'cleanup' and documentation states this is a global setting (bubble text and docs). Upping to B to raise awareness.

          Karl Wirth added a comment - Suggest this is fixed or 'true/false' is removed from 'cleanup' and documentation states this is a global setting (bubble text and docs). Upping to B to raise awareness.

          Karl Wirth added a comment - - edited

          For clarity:

          (1) Without any global options set and with 'cleanup' build step:

          No cleanup attempted.
          

          (2) With Global option 'Delete Perforce client' and with 'cleanup' build step:

          P4 Task: remove client: jenkins-master-JENKINS-47107_-_Cleanup-8
          ... p4 client -d jenkins-master-JENKINS-47107_-_Cleanup-8 -p4 client -d jenkins-master-JENKINS-47107_-_Cleanup-8
          
          Client jenkins-master-JENKINS-47107_-_Cleanup-8 deleted.
          

          (3) With Global option 'Delete Workspace files' and with 'cleanup' build step: 

          P4 Task: cleanup client: jenkins-master-JENKINS-47107_-_Cleanup-0
          P4 Task: unsyncing client: jenkins-master-JENKINS-47107_-_Cleanup-0
          P4 Task: syncing files at change: 0
          ... p4 sync -f -q /var/lib/jenkins/workspace/JENKINS-47107 - Cleanup/...@0 -p4 sync -f -q /var/lib/jenkins/workspace/JENKINS-47107 - Cleanup/...@0
          

          (4) With Global options 'Delete Perforce client' and 'Delete Workspace files' 

          P4 Task: cleanup client: jenkins-master-JENKINS-47107_-_Cleanup-9
          P4 Task: unsyncing client: jenkins-master-JENKINS-47107_-_Cleanup-9
          P4 Task: syncing files at change: 0
          ... p4 sync -f -q /var/lib/jenkins/workspace/JENKINS-47107 - Cleanup/...@0 -p4 sync -f -q /var/lib/jenkins/workspace/JENKINS-47107 - Cleanup/...@0
          ... totalFileSize 0
          ... totalFileCount 1
          duration: (2ms)
          
          ... p4 client -o jenkins-master-JENKINS-47107_-_Cleanup-9 +... p4 revert /var/lib/jenkins/workspace/JENKINS-47107 - Cleanup/... -p4 revert /var/lib/jenkins/workspace/JENKINS-47107 - Cleanup/...
          
          /var/lib/jenkins/workspace/JENKINS-47107 - Cleanup/... - file(s) not opened on this client.
          
          P4 Task: remove client: jenkins-master-JENKINS-47107_-_Cleanup-9
          ... p4 client -d jenkins-master-JENKINS-47107_-_Cleanup-9 -p4 client -d jenkins-master-JENKINS-47107_-_Cleanup-9
          
          Client jenkins-master-JENKINS-47107_-_Cleanup-9 deleted.
          

           

          IMPORTANT NOTE: Groovy step "cleanup" without a paramater is not valid. Therefore if it is not used the 'cleanup' function must be fixed to not take true/false.

           

          Karl Wirth added a comment - - edited For clarity: (1) Without any global options set and with 'cleanup' build step: No cleanup attempted. (2) With Global option 'Delete Perforce client' and with 'cleanup' build step: P4 Task: remove client: jenkins-master-JENKINS-47107_-_Cleanup-8 ... p4 client -d jenkins-master-JENKINS-47107_-_Cleanup-8 -p4 client -d jenkins-master-JENKINS-47107_-_Cleanup-8 Client jenkins-master-JENKINS-47107_-_Cleanup-8 deleted. (3) With Global option 'Delete Workspace files' and with 'cleanup' build step:  P4 Task: cleanup client: jenkins-master-JENKINS-47107_-_Cleanup-0 P4 Task: unsyncing client: jenkins-master-JENKINS-47107_-_Cleanup-0 P4 Task: syncing files at change: 0 ... p4 sync -f -q / var /lib/jenkins/workspace/JENKINS-47107 - Cleanup/...@0 -p4 sync -f -q / var /lib/jenkins/workspace/JENKINS-47107 - Cleanup/...@0 (4) With Global options 'Delete Perforce client' and 'Delete Workspace files'  P4 Task: cleanup client: jenkins-master-JENKINS-47107_-_Cleanup-9 P4 Task: unsyncing client: jenkins-master-JENKINS-47107_-_Cleanup-9 P4 Task: syncing files at change: 0 ... p4 sync -f -q / var /lib/jenkins/workspace/JENKINS-47107 - Cleanup/...@0 -p4 sync -f -q / var /lib/jenkins/workspace/JENKINS-47107 - Cleanup/...@0 ... totalFileSize 0 ... totalFileCount 1 duration: (2ms) ... p4 client -o jenkins-master-JENKINS-47107_-_Cleanup-9 +... p4 revert / var /lib/jenkins/workspace/JENKINS-47107 - Cleanup/... -p4 revert / var /lib/jenkins/workspace/JENKINS-47107 - Cleanup/... / var /lib/jenkins/workspace/JENKINS-47107 - Cleanup/... - file(s) not opened on this client. P4 Task: remove client: jenkins-master-JENKINS-47107_-_Cleanup-9 ... p4 client -d jenkins-master-JENKINS-47107_-_Cleanup-9 -p4 client -d jenkins-master-JENKINS-47107_-_Cleanup-9 Client jenkins-master-JENKINS-47107_-_Cleanup-9 deleted.   IMPORTANT NOTE: Groovy step "cleanup" without a paramater is not valid. Therefore if it is not used the 'cleanup' function must be fixed to not take true/false.  

            p4kevin Kevin Williamson
            p4karl Karl Wirth
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: