Cleaning Artifacts

Question from a newbie about Artifacts...

I'm using Nant as my build Runner to run a script that eventually fires a commandline build of Visual Studio. Obviously this creates a bunch of intermediate files, which from my understanding I can classify as artifacts by specifying that directory in the General Settings page.

Can I clean the artifacts off of the build agent somehow? Essentially I want to delete all the intermediate files generated by VS and trigger the build command again which would end up giving us a clean rebuild.

I'm pretty sure I can do this via creating a new build configuration, though I don't quite have a good enough grasp on triggering builds to ensure that it cleaned the intermediate files from all the agents, but I'd prefer to do this by cleaning artifacts.

Thanks
Dave

3 comments

Hello Dave,

You could define a clean target in your build script and invoke it before
your build one (or make the build target depend on clean), so the build will
always clean up before it runs.

HTH,
Andrei

DK> Question from a newbie about Artifacts...
DK>
DK> I'm using Nant as my build Runner to run a script that eventually
DK> fires a commandline build of Visual Studio. Obviously this creates
DK> a bunch of intermediate files, which from my understanding I can
DK> classify as artifacts by specifying that directory in the General
DK> Settings page.
DK>
DK> Can I clean the artifacts off of the build agent somehow?
DK> Essentially I want to delete all the intermediate files generated by
DK> VS and trigger the build command again which would end up giving us
DK> a clean rebuild.
DK>
DK> I'm pretty sure I can do this via creating a new build
DK> configuration, though I don't quite have a good enough grasp on
DK> triggering builds to ensure that it cleaned the intermediate files
DK> from all the agents, but I'd prefer to do this by cleaning
DK> artifacts.
DK>
DK> Thanks
DK> Dave


0

The problem is I don't want to clean every time.

I want it to be a manual process so I specify which build is a clean rebuild.

0

Dave, can you possibly write a NAnt task which removes all the unneeded files as a first step of your build? This would be the most proper thing to do in your situation, I think.

The artifact feature of TeamCity has nothing common with cleaning files from agent - it only allows to upload files to server so they are available from WebUI (and can be used by other builds).

Kind regards,
KIR

0

Please sign in to leave a comment.