1

My last build step in my TeamCity 9.1 project configuration uses the SMB deployer to copy files to a shared network drive (which we use to deploy the version to our users).

The copy is performed fine but the deployer somehow creates all the folders in the hierarchy leading to the bin folder. Example:

My configuration is:

Target URL:

\\theserver\thefolder

Artifacts path:

**\ProjectName\bin\Release\* => .
**\ProjectName\bin\Release\Resources\* => Resources

With this configuration, I'm expecting the files to be copied to \\theserver\thefolder\* and \\theserver\thefolder\Resources\*

However, this is the result I get instead: my files are copied to

\\theserver\thefolder\ProjectName\bin\Release\*
\\theserver\thefolder\Resources\ProjectName\bin\Release\Resources\*

How do I go with my artifacts definition so my files are copied to the proper folder? I'm having such a hard time with this syntax

Damascus
  • 6,553
  • 5
  • 39
  • 53

1 Answers1

4

The **\ prefix is causing the artifact path output to include the matched folder hierarchy.

You'll need to use the full path to the Project folder, also if you want to include nested directories, use the **\* at the end of the artifact path:

\path\to\ProjectName\bin\Release\**\* => .
\path\to\ProjectName\bin\Release\Resources\**\* => Resources

For more information, see the artifact path doco, specifically:

wildcard — to publish files matching Ant-like wildcard pattern (only "*" and "**" wildcards are supported). The wildcard should represent a path relative to the build checkout directory. The files will be published preserving the structure of the directories matched by the wildcard (directories matched by "static" text will not be created). That is, TeamCity will create directories starting from the first occurrence of the wildcard in the pattern.

SteveChapman
  • 3,051
  • 1
  • 22
  • 37
  • Perfect! I didn't realize my working directory was not at the `/bin/release` level. Thanks for that fix! :) – Damascus Aug 28 '15 at 10:31