TeamCity: Adding additional logs to artifacts zip file

1.3k views Asked by At

In TeamCity, it is possible to specify the 'Artifact Paths' so that all files and folders from a directory can be added to a Zip file:

E:\Logs\**\* => Logs.zip

However, I would like to add additional log files to a sub folder within the zip file. Is it possible to do this without an additional build step to move/copy the files? For example:

E:\Logs\**\* => Logs.zip
D:\ThirdParty\Logs\*.txt => Logs.zip\ThirdParty\ 
1

There are 1 answers

0
Didier Aupest On BEST ANSWER

It is possible to specify the path inside a zip when you are creating an artefact

You just need to set a ! after the extension, in order to indicate that the content will be put inside.

/logs/*.log => Logs.zip
/out/*.txt => Logs.zip!/ThirdParty