【问题标题】:Files won't get deleted from workspace while cleaning up清理时不会从工作区中删除文件
【发布时间】:2014-03-25 23:45:13
【问题描述】:

我有以下错误,jenkins 无法从工作区中删除一些文件。我可以手动删除文件,但如何使其自动化?我在构建之前检查了删除工作区,并在“要删除和包含的文件的模式”中插入了 **/tellar.tar.gz,但仍然不会这样做。

正在删除项目工作区...

清理本地目录。

hudson.util.IOException2:远程文件操作失败:/local/hudson/workspace/CITI_PATCH_LATE at hudson.remoting.Channel@bac49a:usnjapp09.mh.lucent.com 在 hudson.FilePath.act(FilePath.java:848) 在 hudson.FilePath.act(FilePath.java:825) 在 hudson.scm.SubversionSCM.checkout(SubversionSCM.java:743) 在 hudson.scm.SubversionSCM.checkout(SubversionSCM.java:685) 在 hudson.model.AbstractProject.checkout(AbstractProject.java:1325) 在 hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:682) 在 jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88) 在 hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:587) 在 hudson.model.Run.execute(Run.java:1543) 在 hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) 在 hudson.model.ResourceController.execute(ResourceController.java:88) 在 hudson.model.Executor.run(Executor.java:236) 引起:java.io.IOException:无法删除/local/hudson/workspace/CITI_PATCH_LATE/./CITI/citi_patch_ll151_rctm/check/tellar.tar.gz 在 hudson.Util.deleteFile(Util.java:243) 在 hudson.Util.deleteRecursive(Util.java:293) 在 hudson.Util.deleteContentsRecursive(Util.java:204) 在 hudson.Util.deleteRecursive(Util.java:284) 在 hudson.Util.deleteContentsRecursive(Util.java:204) 在 hudson.Util.deleteRecursive(Util.java:284) 在 hudson.Util.deleteContentsRecursive(Util.java:204) 在 hudson.Util.deleteRecursive(Util.java:284) 在 hudson.Util.deleteContentsRecursive(Util.java:204) 在 hudson.scm.subversion.CheckoutUpdater$1.perform(CheckoutUpdater.java:71) 在 hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:136) 在 hudson.scm.SubversionSCM$CheckOutTask.perform(SubversionSCM.java:788) 在 hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:769) 在 hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:753) 在 hudson.FilePath$FileCallableWrapper.call(FilePath.java:2309) 在 hudson.remoting.UserRequest.perform(UserRequest.java:118) 在 hudson.remoting.UserRequest.perform(UserRequest.java:48) 在 hudson.remoting.Request$2.run(Request.java:326) 在 hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) 在 java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) 在 java.util.concurrent.FutureTask.run(FutureTask.java:138) 在 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) 在 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) 在 java.lang.Thread.run(Thread.java:662) 归档工件

【问题讨论】:

    标签: jenkins continuous-integration hudson jenkins-plugins


    【解决方案1】:

    我遇到了同样的问题,然后我意识到我的资源管理器正在访问 Jenkins 试图删除的目录。关闭资源管理器后,作业成功。

    因此,即使您可以尝试关闭所有访问工作区中文件夹的应用程序。

    【讨论】:

      【解决方案2】:

      也许是权限。可以用slave用户删除吗? 在 Windows 上更常见,但有时进程会锁定文件。

      【讨论】:

        猜你喜欢
        • 2011-07-05
        • 1970-01-01
        • 1970-01-01
        • 2012-06-17
        • 1970-01-01
        • 2011-03-14
        • 1970-01-01
        • 2012-08-18
        • 1970-01-01
        相关资源
        最近更新 更多