Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exclude files from Team City artifacts

Tags:

I need to exclude some files from TC's artifacts during my ASP MVC project's build. These files include web.debug.config files, but there are others as well.

At the moment the Artifact path setting in TC looks like this:

src/Project.Web/*.config => arch.zip

I need somehow to tell it to skip the web.debug.config file. I tried this and doesn't work:

src/Project.Web/*.config => arch.zip

-src/Project.Web/*.debug.config

So, ideally I don't want these files from arch.zip that is created during the build.

like image 771
Stefan Szasz Avatar asked Apr 16 '13 14:04

Stefan Szasz


2 Answers

Starting from TC10 it's possible. In your case it would be:

+:src/Project.Web/*.config => arch.zip
-:src/Project.Web/*.debug.config => arch.zip
like image 100
DMan Avatar answered Oct 12 '22 21:10

DMan


This isn't possible the way you mentioned:

http://youtrack.jetbrains.com/issue/TW-5244

As a workaround until that issue is resolved, you can always create another build configuration with a snapshot dependency and an artefact dependency on your main build. Your main build outputs all of the files as artefacts. The configuration depending on this has an artefact dependency set to:

+:*.config => <replace with location>
-:*.debug.config

Then publish what you want from this configuration in the folder. Not ideal, but it will work.

like image 21
infojolt Avatar answered Oct 12 '22 22:10

infojolt