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

Add option to clean workspace before each build

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Major Major
    • core
    • None
    • Platform: All, OS: All

      If this option is selected the workspace will be deleted before each build
      begins so that each build can have a fresh workspace. This will be off by default.

          [JENKINS-3966] Add option to clean workspace before each build

          smr99 added a comment -

          What is the status of this? I read through the referenced email thread (now at http://markmail.org/message/mcgftdni6cvpca7v) which seemed to end with agreement on the feature but issues with backwards compatibility.

          smr99 added a comment - What is the status of this? I read through the referenced email thread (now at http://markmail.org/message/mcgftdni6cvpca7v ) which seemed to end with agreement on the feature but issues with backwards compatibility.

          jhoomsharabi added a comment - - edited

          Does this functionality anytime implemented, as I see this issue is being reopened.

          jhoomsharabi added a comment - - edited Does this functionality anytime implemented, as I see this issue is being reopened.

          Rob Petti added a comment -

          Can't this option just call the same function as the "Wipe Out Workspace" feature? If the SCM plugin supports it, then everything will be fine. If it doesn't then it simply won't delete the workspace.

          Rob Petti added a comment - Can't this option just call the same function as the "Wipe Out Workspace" feature? If the SCM plugin supports it, then everything will be fine. If it doesn't then it simply won't delete the workspace.

          bvakili added a comment -

          I like Kohsuke's proposal of providing an 'extension point in core to abstract away various "clean" logic'.
          http://n4.nabble.com/attention-all-subversion-users-tp393646p393656.html

          bvakili added a comment - I like Kohsuke's proposal of providing an 'extension point in core to abstract away various "clean" logic'. http://n4.nabble.com/attention-all-subversion-users-tp393646p393656.html

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          core/src/main/java/hudson/scm/NoCleaner.java
          core/src/main/java/hudson/scm/RmRfCleaner.java
          core/src/main/java/hudson/scm/WorkspaceCleaner.java
          core/src/main/java/hudson/scm/WorkspaceCleanerDescriptor.java
          core/src/main/resources/hudson/scm/SCM/configure-workspaceCleaner.jellytag
          core/src/main/resources/hudson/scm/WorkspaceCleaner/config.jelly
          http://jenkins-ci.org/commit/jenkins/07c6c4f1dc9c41a2cf8fc1ee9a8935310ca9afb0
          Log:
          JENKINS-3966 added a new extension point for workspace cleaner

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: core/src/main/java/hudson/scm/NoCleaner.java core/src/main/java/hudson/scm/RmRfCleaner.java core/src/main/java/hudson/scm/WorkspaceCleaner.java core/src/main/java/hudson/scm/WorkspaceCleanerDescriptor.java core/src/main/resources/hudson/scm/SCM/configure-workspaceCleaner.jellytag core/src/main/resources/hudson/scm/WorkspaceCleaner/config.jelly http://jenkins-ci.org/commit/jenkins/07c6c4f1dc9c41a2cf8fc1ee9a8935310ca9afb0 Log: JENKINS-3966 added a new extension point for workspace cleaner

          jlpinardon added a comment -

          It would be a user friendly enhancement to add the ability to select a list (possibly based on pattern) of directory to wipe out (or not).

          jlpinardon added a comment - It would be a user friendly enhancement to add the ability to select a list (possibly based on pattern) of directory to wipe out (or not).

          (I've been wiping out specific directories by adding ant tasks into the my jobs.)

          Hey guys, thanks for enhancing this section of Jenkins. The clean selections in Jenkins 1.414 work great for me: both the delete-workspace and the other varieties of cleaning.

          John Muczynski added a comment - (I've been wiping out specific directories by adding ant tasks into the my jobs.) Hey guys, thanks for enhancing this section of Jenkins. The clean selections in Jenkins 1.414 work great for me: both the delete-workspace and the other varieties of cleaning.

          I think this issue has been addressed by this new-ish plugin https://wiki.jenkins-ci.org/display/JENKINS/Workspace+Cleanup+Plugin

          G. Ann Campbell added a comment - I think this issue has been addressed by this new-ish plugin https://wiki.jenkins-ci.org/display/JENKINS/Workspace+Cleanup+Plugin

          Jesse Glick added a comment -

          Workspace Cleanup Plugin would delete the entire workspace. For most purposes you would rather just delete unversioned files (typically build products), as well as reverting any local modifications to versioned files, since a full checkout/clone/etc. is likely to be a lot more expensive than an incremental update.

          Jesse Glick added a comment - Workspace Cleanup Plugin would delete the entire workspace. For most purposes you would rather just delete unversioned files (typically build products), as well as reverting any local modifications to versioned files, since a full checkout/clone/etc. is likely to be a lot more expensive than an incremental update.

          Jesse Glick added a comment -

          The mentioned plugin should be used; or many SCM plugins now offer the option of deleting unversioned files.

          Jesse Glick added a comment - The mentioned plugin should be used; or many SCM plugins now offer the option of deleting unversioned files.

            kaxelson kaxelson
            kaxelson kaxelson
            Votes:
            19 Vote for this issue
            Watchers:
            21 Start watching this issue

              Created:
              Updated:
              Resolved: