Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Understanding "Force Clean Build" under Source Code Checkout

I selected "Force Clean Build" under my Source Code checkout task because I want Bamboo to checkout the fresh source code every time it creates a build. (Our binaries have SVN information embedded in them and if its not  fresh checkout then the SVN revision number gets embedded with an 'M' signifying a modified copy of subversion source code.)

However, with "Force Clean Build" option, the first manual run worked perfectly but after that the "Source Code checkout" task fails every time. Following is the log :

Capture.JPGI also tried going to the path mentioned in the log on the remote server but C:\rw_apps\Bamboo-Home\xml-data\build-dir\GLUB-GLUS116-BAG this folder seems empty. Looks like Bamboo is not able to checkout the source code anymore. Since the task failed, even manual clean ups and SVN updates are not working.

Any suggestions?

1 answer

1 accepted

0 votes
Answer accepted

Hello @Heena Agrawal

It seems that there is some process locking the folder clean-up. What version of Bamboo are you running? 

The folder seems empty because usually the folder `.svn` is treated as a hidden folder and will not be displayed without extra steps.

Also, you could try to clean working directory after each build. There is a special option for that under "Plan Configuration > Stages > [Select the stage] > Miscellaneous tab".

Did it help?


Hello Victor.

Thanks for the reply.

We are using Atlassian Bamboo version 6.5.1

I tried setting up clean working directory fro miscellaneous tab but I received the following error. (Also I unchecked "Force Clean Build" since its only working the first time you try to create a build and then it makes all the other builds crash. Is it because of the "SVN cleanup" that is getting locked?)

Capture.JPGDoes this sound familiar?

It looks like this is the same issue:

It shows resolved but I am experiencing this issue. Can you please let me know any work around for this?


We have a similar bug already created, and the workaround for it is to restart Bamboo. If that is not possible, you could try to manually delete the folder or through a "Script Task" run the removal of folder.

If that will not help you, I recommend contacting our support so we can investigate this issue further.


Do you mean removing " C:\rw_apps\bamboo-home\xml-data\build-dir\GLUB-GLUS116-BAG" folder or the ".svn" file from thee folder?

Also, the workaround suggested in uses in a script before source code checkout.

attrib -R /S %bamboo_build_working_directory%/*

Is this only applicable to git repositories? What is the similar command for subversion?

This workaround with the script removes the "Read-only" flag in all the files in your `C:\rw_apps\bamboo-home\xml-data\build-dir\GLUB-GLUS116-BAG` directory. It's a Windows Command Prompt command, so it will work regardless of the VCS you are using :)

Thank you for answering all these questions.

I think my problem is that even if I go into my remote agent inside this folder " C:\rw_apps\bamboo-home\xml-data\build-dir\GLUB-GLUS116-BAG" and try to delete the .SVN file manually, its not getting deleted. I unchecked the "Read only" from properties but still the message shows that some other task is using that file and so you cant delete it.

Now, what I have had to do is restore the "GLUB-GLUS116-BAG" folder to a previous setting and then run builds from there but its not possible to do it manually every time for each build.

Would you know why that .svn is getting locked?

You're welcome!

The .svn folder getting locket appears to be related to Windows file locks, and it requires that the process holding the lock to be freed, which in our case is Bamboo and might be related to the bug I've previously mentioned BAM-19597.

As you unchecked the "Read only" property, the workaround of running the `attrib` command also will not work, and I understand that it's not possible to do manual steps for every build, I recommend you to open a support case so we can investigate further what other options we can explore, with more detailed information on your environment. Make sure to mention this steps explored (or link this post).


Thank you for your help Victor. I will add a support request. Just trying to figure out what our SEN is.

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events