How do I STOP TeamCity removing my last custom build directory?

Hi There,

We want to run a build once a day and have set the checkout directory to this format...

%build.number%_Shark_Build

The build number goes up each time by one. But in testing the last directory created is always removed. We want to keep the directory and it's contents. Is this possible?

Thanks  :)

Angus

0
4 comments

Angus,

The Checkout directory setting is intended for scenarios when build scripts contain hardcoded file paths, and can be executed from specific directory only.
In all other cases we recommend to leave it blank, and let the agent to manage it automatically.

Source backup can be performed within a build as additional step.

Michael

0
Avatar
Permanently deleted user

I done the change but unfortunatly the code has some DLL's where I need the hardcoded build paths. Bad luck for me !!! So I have had to put the path name back in.

Are you saying to do the source backup I add another build step? Do you have an example please?

Thanks

Angus

0

I mean, you can simply copy current content of checkout directory to external location by command-line tools, or as a task in Ant or MSBuild script.
Alternativelly, you can export the sources directly from VCS. Current revison can be got from Predefined Build Parameters.

0
Avatar
Permanently deleted user

I added a Nant step to create a new directory with a timestamp.

Thanks...

0

Please sign in to leave a comment.