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

Add option to clean workspace before each build

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved (View Workflow)
    • Major
    • Resolution: Won't Fix
    • core
    • None
    • Platform: All, OS: All

    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 -
            kaxelson kaxelson added a comment -

            starting work on this

            kaxelson kaxelson added a comment - starting work on this
            kaxelson kaxelson made changes -
            Field Original Value New Value
            Status Open [ 1 ] In Progress [ 3 ]

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

            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

            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

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

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

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

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

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

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

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

            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 ]

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

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

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

            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.

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

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

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

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

              Dates

                Created:
                Updated:
                Resolved: