TeamCity的文物;排除个别文件 [英] TeamCity Artifacts; Exclude Individual Files
问题描述
我有包括的TeamCity构建配置以下发布工件:
I have a TeamCity Build Configuration that includes the following to publish artifacts:
Source\Builder\bin\Release\*.dll=>release
这工作得很好,但我想排除一个DLL(有不少),并已阅读,你可以用+&放大器; - 运营商能够做到这一点。沿着线的东西:
This works fine, however I am wanting to exclude one dll (there are quite a few) and have read that you can use + & - operators to do this. Something along the lines of:
+: Source\Builder\bin\Release\*.dll=>release
-: Source\Builder\bin\Release\Builder.*
只要我在添加这些,没有文物出版,我也得到了构建日志下面的错误(看起来是计数+作为路径的一部分):
As soon as I add these in, no artifacts are published and I get the following error in the build log (looks like it is counting the + as part of the path):
[Publishing artifacts] Collecting files to publish [+:Source\Builder\bin\Release\*.dll=>release]
[Publishing artifacts] Artifacts path +:Source/Builder/bin/Release/*.dll not found
我使用的7.1.1版本,任何人任何想法(我不知道这些运营商是否有效甚至)。我已经看到了一个的MSBuild解决方案,但很奇怪这个功能将不可用。
I am using version 7.1.1, anyone any ideas (I am not sure whether these operators are even valid). I have seen a solution with MSBuild but am surprised this functionality is not available.
先谢谢了。
推荐答案
我不相信你可以的。
不过,如果您使用的是器物在另一个构建配置作为神器的依赖,可以排除特定的文件存在。
However, if you are using the artifacts in another build configuration as an artifact dependency, you can exclude a particular file there.
当您设置的依赖关系,你可以指定一个负的运营商是这样的:
When you set up the dependencies, you can specify a negative operator like this:
+:release/**=>Dependencies/SomeProject
-:release/SomeBinary.dll
这是一个可怕的黑客,但你可以得到它的工作将是建立一个新的构建配置它得到的依赖作为神器的依赖,不包括一个二进制,然后单向出版自己的文物。
It is a horrible hack, but one way you could get it to work would be to set up a new build configuration which gets the dependencies as an artifact dependency, excluding the one binary, and then publishes its own artifacts.
作为,创建一个新的生成配置和发布:
As in, create a new build configuration and publish:
Dependencies/SomeProject=>release
然后从这个构建配置,而不是另外一个引用的工件。
Then reference the artifacts from this build configuration instead of the other one.
这篇关于TeamCity的文物;排除个别文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!