Details
-
Bug
-
Status: Resolved (View Workflow)
-
Major
-
Resolution: Fixed
Description
It seems like the workspace cleanup plugin is following symlinks, which creates weird behavior. For example, I have a job that sets up the build environment, and my other test running jobs reference this build environment directory with symlinks. When the jobs that are using the workspace cleanup plugin don't delete the symlinks prior to finishing the job, when the workspace is cleaned up, files in the symlinked directory get removed.
I resolved the issue by having my ant clean task run after the build, which removes the symlinks, but every now and again if the build fails...the clean task doesn't run and the error resurfaces the next time the job runs when it cleans up and those symlinks exist.
Created a pull request with my purposed fix: https://github.com/jenkinsci/ws-cleanup-plugin/pull/15
I have only done basic testing and my gut feeling is that it may need more testing. I may look into writing unittests for this plugin if the jenkins/maven framework for that is not too complicated.