Run svn cleanup automatically after checkout

Sahil July 6, 2014

Hi,

I want to make sure that the svn clean-up is run after the check-out is performed in Bamboo.

Most often the Bamboo build fails and in the logs it shows run 'svn cleanup' first . So I need to go folder where it does check-out and remove the .svn and .project folders explicitly. After that if I run the build again it is successful.

So can any one help me configure this in such a way that the Bamboo runs the "svn cleanup" automatically after check-out.

Thanks and Regards,

Sahil Amar

2 answers

0 votes
Gretchen
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 7, 2014

We have a svn cleanup step that we put first in the plan. Occasionally we need it when we have cancelled a build after starting it but before the checkout to the ${bamboo.build.working.directory} is complete. If the workspace has an issue it will fail on the checkout or update so the svn cleanup has to be done first. We keep this disabled most of the time because when a new branch is created, the workspace is not an "svn workspace" yet and the cleanup step will fail the build when the build is run on the brand new branch for the first time. When a build fails with "run cleanup first" we run the plan again after enabling the cleanup task. This covers most of the issues we have with workspaces. If the checkout is successful there should be no need for a cleanup, but I suppose you could put it in there anyway if that makes you happy.

We use a command task with the executable 'svn' defined and use the command line:

cleanup ${bamboo.build.working.directory}

That should take care of it. You could also use a script with

...\path\to\your\svn.exe cleanup ${bamboo.build.working.directory}

0 votes
Sahil July 7, 2014

Please help me with this issue.. :(

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events