Publish articafts to root output directory

Maybe I'm missing something, but given a file in directory:


relative to the checkout directory, configuring the artifacts like so:

**/*.extension => .

I don't get the file in the root of the artifacts directory, but I still see it keeping its original path:

{artifacts root}/DirA/DirB/File.extension

Is there a way to output the file in the artifacts root directory?

Comment actions Permalink

Hi Simone,

I think you dont need to specify the target directory and it will layout the files in a the root directory.

Just mention, **/*.extension


Comment actions Permalink

I'm not sure I follow you... can you make an example?

Comment actions Permalink

Hello Simone,

  Unfortunately, TeamCity follows the directory structure when publishing artifacts. It repeats the structure starting from first '*' or '?' sign.
  So if you have a file

  and have publishing rules
  Dir1/**/*.txt => .

  it will create an artifact
  Dir2/a.txt in the target artifact directory.

  This is how it works, but unfortunately, it doesn't resolve your problem

  If you need different behaviour, we probably need to introduce some other syntax or add some options.

  Best regards,

Comment actions Permalink

Hi Kirill, thanks, I guessed that. No big deal actually, you can workaround it pretty easily.


Please sign in to leave a comment.