java.lang.RuntimeException: com.atlassian.bamboo.repository.RepositoryException: Unable to clean source directory 'C:\build-dir\TEST-BUIL-JOB1' C:\build-dir\TEST-BUIL-JOB1\.git

Atlassian JIRA | Pavel Veller | 1 year ago
  1. 0

    h3. Steps to reproduce # Create a new plan that has a single task to check out a Git repository. # In the Source Code Checkout task, tick "Force Clean Build". # In the Miscellaneous tab of the job, tick "Clean working directory after each build". # Start a Windows elastic Bamboo agent and run a couple of builds. h3. Expected results All the builds check out the code successfully and subsequently clean up the working directory. h3. Actual results The first build will pass, but an error will appear in the Bamboo error log: {quote} *Could not remove working directory for plan 'TEST-BUIL-JOB1': C:\build\TEST-BUIL-JOB1\.git* {code:none} java.nio.file.DirectoryNotEmptyException: C:\build\TEST-BUIL-JOB1\.git at sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:266) at sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103) at java.nio.file.Files.delete(Files.java:1126) at com.atlassian.bamboo.utils.BambooPathUtils.deleteNoThrow(BambooPathUtils.java:158) at com.atlassian.bamboo.utils.BambooPathUtils.access$000(BambooPathUtils.java:28) at com.atlassian.bamboo.utils.BambooPathUtils$1.postVisitDirectory(BambooPathUtils.java:97) at com.atlassian.bamboo.utils.BambooPathUtils$1.postVisitDirectory(BambooPathUtils.java:74) at java.nio.file.Files.walkFileTree(Files.java:2688) at java.nio.file.Files.walkFileTree(Files.java:2742) at com.atlassian.bamboo.utils.BambooPathUtils.cleanDirectory(BambooPathUtils.java:103) at com.atlassian.bamboo.util.BambooFileUtils.cleanDirectory(BambooFileUtils.java:770) at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.cleanWorkingDirectory(ExecuteBuildTask.java:129) at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:98) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:196) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:132) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:123) at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:215) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:122) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:118) at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:49) at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31) at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20) at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52) at java.lang.Thread.run(Thread.java:745) {code} {quote} Subsequent builds will all fail with the error: {code:none} Starting task 'Checkout Default Repository' of type 'com.atlassian.bamboo.plugins.vcs:task.vcs.checkout' Build always requires a clean checkout Cleaning build directory 'C:\build-dir\TEST-BUIL-JOB1' Unable to clean source directory 'C:\build-dir\TEST-BUIL-JOB1' C:\build-dir\TEST-BUIL-JOB1\.git Build always requires a clean checkout Cleaning build directory 'C:\build-dir\TEST-BUIL-JOB1' Unable to clean source directory 'C:\build-dir\TEST-BUIL-JOB1' C:\build-dir\TEST-BUIL-JOB1\.git Build always requires a clean checkout Cleaning build directory 'C:\build-dir\TEST-BUIL-JOB1' Unable to clean source directory 'C:\build-dir\TEST-BUIL-JOB1' C:\build-dir\TEST-BUIL-JOB1\.git Error occurred while running Task 'Checkout Default Repository(1)' of type com.atlassian.bamboo.plugins.vcs:task.vcs.checkout. java.lang.RuntimeException: com.atlassian.bamboo.repository.RepositoryException: Unable to clean source directory 'C:\build-dir\TEST-BUIL-JOB1' C:\build-dir\TEST-BUIL-JOB1\.git at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:144) at com.atlassian.bamboo.executor.RetryingTaskExecutor.runTask(RetryingTaskExecutor.java:88) at com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:203) at com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:188) at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.preRetrieveSourceCode(VcsCheckoutTask.java:217) at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.execute(VcsCheckoutTask.java:124) at com.atlassian.bamboo.task.TaskExecutorImpl.lambda$executeTasks$68(TaskExecutorImpl.java:273) at com.atlassian.bamboo.task.TaskExecutorImpl$$Lambda$20/1672639360.call(Unknown Source) at com.atlassian.bamboo.task.TaskExecutorImpl.executeTaskWithPrePostActions(TaskExecutorImpl.java:202) at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:273) at com.atlassian.bamboo.task.TaskExecutorImpl.executePreparationTasks(TaskExecutorImpl.java:83) at com.atlassian.bamboo.build.pipeline.tasks.PrepareBuildTask.call(PrepareBuildTask.java:74) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:196) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:132) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:123) at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:215) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:122) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:118) at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:49) at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31) at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20) at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52) at java.lang.Thread.run(Thread.java:745) Caused by: com.atlassian.bamboo.repository.RepositoryException: Unable to clean source directory 'C:\build-dir\TEST-BUIL-JOB1' C:\build-dir\TEST-BUIL-JOB1\.git at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.cleanWorkingDirIfNeeded(VcsCheckoutTask.java:371) at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.access$100(VcsCheckoutTask.java:57) at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask$2.call(VcsCheckoutTask.java:222) at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask$2.call(VcsCheckoutTask.java:218) at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:108) ... 22 more Caused by: java.nio.file.DirectoryNotEmptyException: C:\build-dir\TEST-BUIL-JOB1\.git at sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:266) at sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103) at java.nio.file.Files.delete(Files.java:1126) at com.atlassian.bamboo.utils.BambooPathUtils.deleteNoThrow(BambooPathUtils.java:158) at com.atlassian.bamboo.utils.BambooPathUtils.access$000(BambooPathUtils.java:28) at com.atlassian.bamboo.utils.BambooPathUtils$1.postVisitDirectory(BambooPathUtils.java:97) at com.atlassian.bamboo.utils.BambooPathUtils$1.postVisitDirectory(BambooPathUtils.java:74) at java.nio.file.Files.walkFileTree(Files.java:2688) at java.nio.file.Files.walkFileTree(Files.java:2742) at com.atlassian.bamboo.utils.BambooPathUtils.cleanDirectory(BambooPathUtils.java:103) at com.atlassian.bamboo.util.BambooFileUtils.cleanDirectory(BambooFileUtils.java:770) at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.cleanWorkingDirIfNeeded(VcsCheckoutTask.java:365) error 04-Nov-2015 13:51:01 ... 26 more {code} h3. Workaround Add a script task to move (not delete) the {{.git}} directory out of the working directory.

    Atlassian JIRA | 1 year ago | Pavel Veller
    java.lang.RuntimeException: com.atlassian.bamboo.repository.RepositoryException: Unable to clean source directory 'C:\build-dir\TEST-BUIL-JOB1' C:\build-dir\TEST-BUIL-JOB1\.git
  2. 0

    h3. Steps to reproduce # Create a new plan that has a single task to check out a Git repository. # In the Source Code Checkout task, tick "Force Clean Build". # In the Miscellaneous tab of the job, tick "Clean working directory after each build". # Start a Windows elastic Bamboo agent and run a couple of builds. h3. Expected results All the builds check out the code successfully and subsequently clean up the working directory. h3. Actual results The first build will pass, but an error will appear in the Bamboo error log: {quote} *Could not remove working directory for plan 'TEST-BUIL-JOB1': C:\build\TEST-BUIL-JOB1\.git* {code:none} java.nio.file.DirectoryNotEmptyException: C:\build\TEST-BUIL-JOB1\.git at sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:266) at sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103) at java.nio.file.Files.delete(Files.java:1126) at com.atlassian.bamboo.utils.BambooPathUtils.deleteNoThrow(BambooPathUtils.java:158) at com.atlassian.bamboo.utils.BambooPathUtils.access$000(BambooPathUtils.java:28) at com.atlassian.bamboo.utils.BambooPathUtils$1.postVisitDirectory(BambooPathUtils.java:97) at com.atlassian.bamboo.utils.BambooPathUtils$1.postVisitDirectory(BambooPathUtils.java:74) at java.nio.file.Files.walkFileTree(Files.java:2688) at java.nio.file.Files.walkFileTree(Files.java:2742) at com.atlassian.bamboo.utils.BambooPathUtils.cleanDirectory(BambooPathUtils.java:103) at com.atlassian.bamboo.util.BambooFileUtils.cleanDirectory(BambooFileUtils.java:770) at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.cleanWorkingDirectory(ExecuteBuildTask.java:129) at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:98) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:196) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:132) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:123) at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:215) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:122) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:118) at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:49) at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31) at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20) at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52) at java.lang.Thread.run(Thread.java:745) {code} {quote} Subsequent builds will all fail with the error: {code:none} Starting task 'Checkout Default Repository' of type 'com.atlassian.bamboo.plugins.vcs:task.vcs.checkout' Build always requires a clean checkout Cleaning build directory 'C:\build-dir\TEST-BUIL-JOB1' Unable to clean source directory 'C:\build-dir\TEST-BUIL-JOB1' C:\build-dir\TEST-BUIL-JOB1\.git Build always requires a clean checkout Cleaning build directory 'C:\build-dir\TEST-BUIL-JOB1' Unable to clean source directory 'C:\build-dir\TEST-BUIL-JOB1' C:\build-dir\TEST-BUIL-JOB1\.git Build always requires a clean checkout Cleaning build directory 'C:\build-dir\TEST-BUIL-JOB1' Unable to clean source directory 'C:\build-dir\TEST-BUIL-JOB1' C:\build-dir\TEST-BUIL-JOB1\.git Error occurred while running Task 'Checkout Default Repository(1)' of type com.atlassian.bamboo.plugins.vcs:task.vcs.checkout. java.lang.RuntimeException: com.atlassian.bamboo.repository.RepositoryException: Unable to clean source directory 'C:\build-dir\TEST-BUIL-JOB1' C:\build-dir\TEST-BUIL-JOB1\.git at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:144) at com.atlassian.bamboo.executor.RetryingTaskExecutor.runTask(RetryingTaskExecutor.java:88) at com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:203) at com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:188) at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.preRetrieveSourceCode(VcsCheckoutTask.java:217) at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.execute(VcsCheckoutTask.java:124) at com.atlassian.bamboo.task.TaskExecutorImpl.lambda$executeTasks$68(TaskExecutorImpl.java:273) at com.atlassian.bamboo.task.TaskExecutorImpl$$Lambda$20/1672639360.call(Unknown Source) at com.atlassian.bamboo.task.TaskExecutorImpl.executeTaskWithPrePostActions(TaskExecutorImpl.java:202) at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:273) at com.atlassian.bamboo.task.TaskExecutorImpl.executePreparationTasks(TaskExecutorImpl.java:83) at com.atlassian.bamboo.build.pipeline.tasks.PrepareBuildTask.call(PrepareBuildTask.java:74) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:196) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:132) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:123) at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:215) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:122) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:118) at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:49) at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31) at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20) at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52) at java.lang.Thread.run(Thread.java:745) Caused by: com.atlassian.bamboo.repository.RepositoryException: Unable to clean source directory 'C:\build-dir\TEST-BUIL-JOB1' C:\build-dir\TEST-BUIL-JOB1\.git at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.cleanWorkingDirIfNeeded(VcsCheckoutTask.java:371) at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.access$100(VcsCheckoutTask.java:57) at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask$2.call(VcsCheckoutTask.java:222) at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask$2.call(VcsCheckoutTask.java:218) at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:108) ... 22 more Caused by: java.nio.file.DirectoryNotEmptyException: C:\build-dir\TEST-BUIL-JOB1\.git at sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:266) at sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103) at java.nio.file.Files.delete(Files.java:1126) at com.atlassian.bamboo.utils.BambooPathUtils.deleteNoThrow(BambooPathUtils.java:158) at com.atlassian.bamboo.utils.BambooPathUtils.access$000(BambooPathUtils.java:28) at com.atlassian.bamboo.utils.BambooPathUtils$1.postVisitDirectory(BambooPathUtils.java:97) at com.atlassian.bamboo.utils.BambooPathUtils$1.postVisitDirectory(BambooPathUtils.java:74) at java.nio.file.Files.walkFileTree(Files.java:2688) at java.nio.file.Files.walkFileTree(Files.java:2742) at com.atlassian.bamboo.utils.BambooPathUtils.cleanDirectory(BambooPathUtils.java:103) at com.atlassian.bamboo.util.BambooFileUtils.cleanDirectory(BambooFileUtils.java:770) at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.cleanWorkingDirIfNeeded(VcsCheckoutTask.java:365) error 04-Nov-2015 13:51:01 ... 26 more {code} h3. Workaround Add a script task to move (not delete) the {{.git}} directory out of the working directory.

    Atlassian JIRA | 1 year ago | Pavel Veller
    java.lang.RuntimeException: com.atlassian.bamboo.repository.RepositoryException: Unable to clean source directory 'C:\build-dir\TEST-BUIL-JOB1' C:\build-dir\TEST-BUIL-JOB1\.git
  3. 0

    Hi, I have a branch that was building fine for couple month and now I start to get below error with each build. The folder is not held by another process according to Porcess Explorer. What could cause below problem? java.lang.RuntimeException: com.atlassian.bamboo.repository.RepositoryException: Unable to clean source directory 'Z:\build\TRADE-MAF4-JOB1' Z:\build\TRADE-MAF4-JOB1\.git at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:144) at com.atlassian.bamboo.executor.RetryingTaskExecutor.runTask(RetryingTaskExecutor.java:88) at com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:203) at com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:188) at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.preRetrieveSourceCode(VcsCheckoutTask.java:217) at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.execute(VcsCheckoutTask.java:124) at com.atlassian.bamboo.task.TaskExecutorImpl.lambda$executeTasks$68(TaskExecutorImpl.java:273) at com.atlassian.bamboo.task.TaskExecutorImpl$$Lambda$20/792998599.call(Unknown Source) at com.atlassian.bamboo.task.TaskExecutorImpl.executeTaskWithPrePostActions(TaskExecutorImpl.java:202) at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:273) at com.atlassian.bamboo.task.TaskExecutorImpl.executePreparationTasks(TaskExecutorImpl.java:83) at com.atlassian.bamboo.build.pipeline.tasks.PrepareBuildTask.call(PrepareBuildTask.java:74) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:196) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:132) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:123) at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:215) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:122) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:118) at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:49) at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31) at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20) at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52) at java.lang.Thread.run(Thread.java:745) Caused by: com.atlassian.bamboo.repository.RepositoryException: Unable to clean source directory 'Z:\build\TRADE-MAF4-JOB1' Z:\build\TRADE-MAF4-JOB1\.git at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.cleanWorkingDirIfNeeded(VcsCheckoutTask.java:371) at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.access$100(VcsCheckoutTask.java:57) at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask$2.call(VcsCheckoutTask.java:222) at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask$2.call(VcsCheckoutTask.java:218) at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:108) ... 22 more Caused by: java.nio.file.DirectoryNotEmptyException: Z:\build\TRADE-MAF4-JOB1\.git at sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:266) at sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103) at java.nio.file.Files.delete(Files.java:1126) at com.atlassian.bamboo.utils.BambooPathUtils.deleteNoThrow(BambooPathUtils.java:158) at com.atlassian.bamboo.utils.BambooPathUtils.access$000(BambooPathUtils.java:28) at com.atlassian.bamboo.utils.BambooPathUtils$1.postVisitDirectory(BambooPathUtils.java:97) at com.atlassian.bamboo.utils.BambooPathUtils$1.postVisitDirectory(BambooPathUtils.java:74) at java.nio.file.Files.walkFileTree(Files.java:2688) at java.nio.file.Files.walkFileTree(Files.java:2742) at com.atlassian.bamboo.utils.BambooPathUtils.cleanDirectory(BambooPathUtils.java:103) at com.atlassian.bamboo.util.BambooFileUtils.cleanDirectory(BambooFileUtils.java:770) at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.cleanWorkingDirIfNeeded(VcsCheckoutTask.java:365)

    Atlassian JIRA | 1 year ago | Steven
    java.lang.RuntimeException: com.atlassian.bamboo.repository.RepositoryException: Unable to clean source directory 'Z:\build\TRADE-MAF4-JOB1' Z:\build\TRADE-MAF4-JOB1\.git
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Hi, I have a branch that was building fine for couple month and now I start to get below error with each build. The folder is not held by another process according to Porcess Explorer. What could cause below problem? java.lang.RuntimeException: com.atlassian.bamboo.repository.RepositoryException: Unable to clean source directory 'Z:\build\TRADE-MAF4-JOB1' Z:\build\TRADE-MAF4-JOB1\.git at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:144) at com.atlassian.bamboo.executor.RetryingTaskExecutor.runTask(RetryingTaskExecutor.java:88) at com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:203) at com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:188) at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.preRetrieveSourceCode(VcsCheckoutTask.java:217) at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.execute(VcsCheckoutTask.java:124) at com.atlassian.bamboo.task.TaskExecutorImpl.lambda$executeTasks$68(TaskExecutorImpl.java:273) at com.atlassian.bamboo.task.TaskExecutorImpl$$Lambda$20/792998599.call(Unknown Source) at com.atlassian.bamboo.task.TaskExecutorImpl.executeTaskWithPrePostActions(TaskExecutorImpl.java:202) at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:273) at com.atlassian.bamboo.task.TaskExecutorImpl.executePreparationTasks(TaskExecutorImpl.java:83) at com.atlassian.bamboo.build.pipeline.tasks.PrepareBuildTask.call(PrepareBuildTask.java:74) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:196) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:132) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:123) at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:215) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:122) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:118) at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:49) at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31) at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20) at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52) at java.lang.Thread.run(Thread.java:745) Caused by: com.atlassian.bamboo.repository.RepositoryException: Unable to clean source directory 'Z:\build\TRADE-MAF4-JOB1' Z:\build\TRADE-MAF4-JOB1\.git at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.cleanWorkingDirIfNeeded(VcsCheckoutTask.java:371) at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.access$100(VcsCheckoutTask.java:57) at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask$2.call(VcsCheckoutTask.java:222) at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask$2.call(VcsCheckoutTask.java:218) at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:108) ... 22 more Caused by: java.nio.file.DirectoryNotEmptyException: Z:\build\TRADE-MAF4-JOB1\.git at sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:266) at sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103) at java.nio.file.Files.delete(Files.java:1126) at com.atlassian.bamboo.utils.BambooPathUtils.deleteNoThrow(BambooPathUtils.java:158) at com.atlassian.bamboo.utils.BambooPathUtils.access$000(BambooPathUtils.java:28) at com.atlassian.bamboo.utils.BambooPathUtils$1.postVisitDirectory(BambooPathUtils.java:97) at com.atlassian.bamboo.utils.BambooPathUtils$1.postVisitDirectory(BambooPathUtils.java:74) at java.nio.file.Files.walkFileTree(Files.java:2688) at java.nio.file.Files.walkFileTree(Files.java:2742) at com.atlassian.bamboo.utils.BambooPathUtils.cleanDirectory(BambooPathUtils.java:103) at com.atlassian.bamboo.util.BambooFileUtils.cleanDirectory(BambooFileUtils.java:770) at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.cleanWorkingDirIfNeeded(VcsCheckoutTask.java:365)

    Atlassian JIRA | 1 year ago | Steven
    java.lang.RuntimeException: com.atlassian.bamboo.repository.RepositoryException: Unable to clean source directory 'Z:\build\TRADE-MAF4-JOB1' Z:\build\TRADE-MAF4-JOB1\.git
  6. 0

    [BAM-13384] system.git.executable fails to detect git in PATH or cygwin - Atlassian JIRA

    atlassian.com | 1 year ago
    java.lang.RuntimeException: com.atlassian.bamboo.repository.RepositoryException: Checkout to revision 8c61bbd0bb9f4e7ab349632be9b0c0f23f443188 has failed.command git log -1 --encoding=UTF-8 --format=%d --decorate=full 8c61bbd0bb9f4e7ab349632be9b0c0f23f443188 failed with code 128. Working directory was [C:\Users\Administrator\bamboo-agent-home\xml-data\build-dir\XA-XENADMIN-JOB1\xenadmin.git]., stderr: error: object directory /cygdrive/c/Users/Administrator/bamboo-agent-home/xml-data/build-dir/XA-XENADMIN-JOB1/xenadmin.git/.git/objects/C:\Users\Administrator\bamboo-agent-home\xml-data\build-dir\_git-repositories-cache\020a7b48f134e4c6b9eb9629255977ea9f7f6c21\.git\objects does not exist; check .git/objects/info/alternates. fatal: bad object 8c61bbd0bb9f4e7ab349632be9b0c0f23f443188

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.RuntimeException

      com.atlassian.bamboo.repository.RepositoryException: Unable to clean source directory 'C:\build-dir\TEST-BUIL-JOB1' C:\build-dir\TEST-BUIL-JOB1\.git

      at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun()
    2. com.atlassian.bamboo
      TaskExecutorImpl.lambda$executeTasks$68
      1. com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:144)
      2. com.atlassian.bamboo.executor.RetryingTaskExecutor.runTask(RetryingTaskExecutor.java:88)
      3. com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:203)
      4. com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:188)
      5. com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.preRetrieveSourceCode(VcsCheckoutTask.java:217)
      6. com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.execute(VcsCheckoutTask.java:124)
      7. com.atlassian.bamboo.task.TaskExecutorImpl.lambda$executeTasks$68(TaskExecutorImpl.java:273)
      7 frames