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

Add option to clean workspace before each build

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Won't Fix
    • Component/s: core
    • Labels:
      None
    • Environment:
      Platform: All, OS: All
    • Similar Issues:

      Description

      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.

        Attachments

          Issue Links

            Activity

            kaxelson kaxelson created issue -
            Hide
            kaxelson kaxelson added a comment -

            starting work on this

            Show
            kaxelson kaxelson added a comment - starting work on this
            kaxelson kaxelson made changes -
            Field Original Value New Value
            Status Open [ 1 ] In Progress [ 3 ]
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in hudson
            User: : kaxelson
            Path:
            trunk/hudson/main/core/src/main/java/hudson/model/AbstractBuild.java
            trunk/hudson/main/core/src/main/java/hudson/model/AbstractProject.java
            trunk/hudson/main/core/src/main/resources/hudson/model/AbstractItem/configure-common.jelly
            trunk/hudson/main/core/src/main/resources/lib/hudson/project/config-cleanWorkspace.jelly
            trunk/hudson/main/war/resources/help/project-config/cleanWorkspace.html
            http://fisheye4.cenqua.com/changelog/hudson/?cs=19373
            Log:
            [FIXED JENKINS-3966] added option to clean workspace before each build as part of advanced project configuration

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : kaxelson Path: trunk/hudson/main/core/src/main/java/hudson/model/AbstractBuild.java trunk/hudson/main/core/src/main/java/hudson/model/AbstractProject.java trunk/hudson/main/core/src/main/resources/hudson/model/AbstractItem/configure-common.jelly trunk/hudson/main/core/src/main/resources/lib/hudson/project/config-cleanWorkspace.jelly trunk/hudson/main/war/resources/help/project-config/cleanWorkspace.html http://fisheye4.cenqua.com/changelog/hudson/?cs=19373 Log: [FIXED JENKINS-3966] added option to clean workspace before each build as part of advanced project configuration
            scm_issue_link SCM/JIRA link daemon made changes -
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Resolved [ 5 ]
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in hudson
            User: : kaxelson
            Path:
            trunk/www/changelog.html
            http://fisheye4.cenqua.com/changelog/hudson/?cs=19374
            Log:
            JENKINS-3966: adding changelog message

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : kaxelson Path: trunk/www/changelog.html http://fisheye4.cenqua.com/changelog/hudson/?cs=19374 Log: JENKINS-3966 : adding changelog message
            Hide
            kohsuke Kohsuke Kawaguchi added a comment -

            Rolled back from 1.315 release in rev.19544. See
            http://www.nabble.com/attention-all-subversion-users-td24335693.html for the
            discussion.

            Show
            kohsuke Kohsuke Kawaguchi added a comment - Rolled back from 1.315 release in rev.19544. See http://www.nabble.com/attention-all-subversion-users-td24335693.html for the discussion.
            kohsuke Kohsuke Kawaguchi made changes -
            Resolution Fixed [ 1 ]
            Status Resolved [ 5 ] Reopened [ 4 ]
            Hide
            jglick Jesse Glick added a comment -

            Note that the Mercurial plugin already has an option to delete all nonversioned
            files from the workspace before starting. (The .hg/ subdirectory is excluded as
            is usual.) I think there is a similar issue open for Subversion. This is more
            efficient than deleting everything in the workspace, but may not be applicable
            for all situations.

            Show
            jglick Jesse Glick added a comment - Note that the Mercurial plugin already has an option to delete all nonversioned files from the workspace before starting. (The .hg/ subdirectory is excluded as is usual.) I think there is a similar issue open for Subversion. This is more efficient than deleting everything in the workspace, but may not be applicable for all situations.
            Hide
            dma_k dma_k added a comment -

            The option to remove all workspace is important to make maven release plugin to
            work correctly for the projects, that generate sources e.g. with JAXB. In my
            case I commit JAXB sources from Windows environment, which after being
            re-generated have different EOF and SVN senses this as uncommitted change, which
            in its turn blocks the release.
            If the fix is ready, what is the target milestone for this fix?

            Show
            dma_k dma_k added a comment - The option to remove all workspace is important to make maven release plugin to work correctly for the projects, that generate sources e.g. with JAXB. In my case I commit JAXB sources from Windows environment, which after being re-generated have different EOF and SVN senses this as uncommitted change, which in its turn blocks the release. If the fix is ready, what is the target milestone for this fix?
            Hide
            smr99 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.

            Show
            smr99 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.
            Hide
            jhoomsharabi jhoomsharabi added a comment - - edited

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

            Show
            jhoomsharabi jhoomsharabi added a comment - - edited Does this functionality anytime implemented, as I see this issue is being reopened.
            Hide
            rpetti 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.

            Show
            rpetti 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.
            Hide
            bvakili 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

            Show
            bvakili 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
            petehayes Peter Hayes made changes -
            Link This issue is related to JENKINS-3934 [ JENKINS-3934 ]
            Hide
            scm_issue_link 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

            Show
            scm_issue_link 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
            Hide
            jlpinardon 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).

            Show
            jlpinardon 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).
            Hide
            johnstosh 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.

            Show
            johnstosh 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.
            Hide
            ganncamp 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

            Show
            ganncamp 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
            Hide
            jglick 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.

            Show
            jglick 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.
            Hide
            jglick Jesse Glick added a comment -

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

            Show
            jglick Jesse Glick added a comment - The mentioned plugin should be used; or many SCM plugins now offer the option of deleting unversioned files.
            jglick Jesse Glick made changes -
            Resolution Won't Fix [ 2 ]
            Status Reopened [ 4 ] Resolved [ 5 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 134039 ] JNJira + In-Review [ 186738 ]

              People

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

                Dates

                Created:
                Updated:
                Resolved: