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

parametrized wipe of workspace (P4 Plugin)

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • core, p4-plugin
    • 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

    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

          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']])

          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'] ])
          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).

          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).

          Thank you guys. I will close this issue.

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

          Francis and Paul have solved this problem.

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

          People

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

            Dates

              Created:
              Updated:
              Resolved: