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

parametrized wipe of workspace (P4 Plugin)

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: core, p4-plugin
    • Environment:
      Jenkins 2.19.1 LTS, P4 plugin 1.4.8, Perforce Plugin 1.3.36, Ubuntu 16.04, Google Chrome 53.0.2785.143 m
    • Similar Issues:

      Description

      We use P4CLEANWORKSPACE as parameter in Perforce Plugin but we would like to move our jobs from Perforce Plugin to P4 Plugin. Would it be possible to add this kind of variable to P4 Plugin to make clean workspace on demand?

        Attachments

          Activity

          Hide
          fhitchen Francis Hitchens added a comment -

          I think it is already there in the dsl...

          checkout([$class: 'PerforceScm', credential: 'p4_credentials', populate: [$class: 'AutoCleanImpl', delete: true, modtime: false, parallel: [enable: false, minbytes: '1024', minfiles: '1', path: '/usr/local/bin/p4', threads: '4'], pin: '', quiet: true, replace: true], workspace: [$class: 'StreamWorkspaceImpl', charset: 'none', format: 'jenkins-${NODE_NAME}-${JOB_NAME}', pinHost: false, streamName: '//somestream/xxx']])

          Show
          fhitchen Francis Hitchens added a comment - I think it is already there in the dsl... checkout([$class: 'PerforceScm', credential: 'p4_credentials', populate: [$class: 'AutoCleanImpl', delete: true, modtime: false , parallel: [enable: false, minbytes: '1024', minfiles: '1', path: '/usr/local/bin/p4', threads: '4'] , pin: '', quiet: true, replace: true], workspace: [$class: 'StreamWorkspaceImpl', charset: 'none', format: 'jenkins-${NODE_NAME}-${JOB_NAME}', pinHost: false, streamName: '//somestream/xxx'] ])
          Hide
          p4paul Paul Allen added a comment -

          Just to clarify:

          • do you want to remove all the files and use a forced sync.
          • or delete the workspace (and contents) after a build (disposable workspaces)?

          The first you can use the 'Force Clean and Sync' populate option ($class: 'ForceCleanImpl').

          The second you can use Perforce: Cleanup (p4cleanup true).

          Show
          p4paul Paul Allen added a comment - Just to clarify: do you want to remove all the files and use a forced sync. or delete the workspace (and contents) after a build (disposable workspaces)? The first you can use the 'Force Clean and Sync' populate option ($class: 'ForceCleanImpl'). The second you can use Perforce: Cleanup (p4cleanup true).
          Hide
          nick1907 Daniel Ordowski added a comment -

          Thank you guys. I will close this issue.

          Show
          nick1907 Daniel Ordowski added a comment - Thank you guys. I will close this issue.
          Hide
          nick1907 Daniel Ordowski added a comment -

          Francis and Paul have solved this problem.

          Show
          nick1907 Daniel Ordowski added a comment - Francis and Paul have solved this problem.

            People

            • Assignee:
              Unassigned
              Reporter:
              nick1907 Daniel Ordowski
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: