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 :
I 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.
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?
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?)
Does this sound familiar?
We have a similar bug already created https://jira.atlassian.com/browse/BAM-19597, 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 https://jira.atlassian.com/browse/BAM-16620 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?
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?
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).
I'm happy to announce that Bamboo 7.1 has been released and it’s overflowing with awesome new features. Top-voted issues First and foremost, a bunch of JAC top voted issues has been delivered - y...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events