1

我在 TeamCity 9.1 项目配置中的最后一个构建步骤使用 SMB 部署程序将文件复制到共享网络驱动器(我们使用它来将版本部署给我们的用户)。

复制执行得很好,但部署者以某种方式创建了指向该文件夹的层次结构中的所有文件bin夹。例子:

我的配置是:

目标网址:

\\theserver\thefolder

工件路径:

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

使用此配置,我希望将文件复制到\\theserver\thefolder\*\\theserver\thefolder\Resources\*

但是,这是我得到的结果:我的文件被复制到

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

如何使用我的工件定义,以便将我的文件复制到正确的文件夹?我很难使用这种语法

4

1 回答 1

4

**\前缀导致工件路径输出包含匹配的文件夹层次结构。

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.

于 2015-08-27T23:52:20.433 回答