如何从vs-team-services CI构建中排除工件中的.cs文件? [英] How do I exclude the .cs files within an artifact from a vs-team-services CI build?
问题描述
我是vs-team服务的新手,现在我有一个CI构建设置,它将具有一个副本发布工件步骤,以将工件上传到vsts服务器.
I'm new to vs-team services, right now I have a CI build setup that will have a copy publish artifact step to upload the artifact to the vsts server.
我有一个选项可以过滤出工件的内容,我将其放在相对于根的路径中,因为在我的存储库下,我有多个项目,而此构建仅针对其中一个项目.
And there is an option for me to filter out the Contents of the artifact, which I've put in the path relative to the root because under my repository I have multiple projects, and this build is only targeting one of them.
现在我的问题是,工件正在发布,但是它包含该路径下的所有内容,这意味着我不想发布的所有.cs文件.有办法排除这些吗?还是应该将这些人工制品全部包括在内?
Now my question is, the artifact is being published, but it includes everything under that path, meaning all the .cs files that i don't want to publish. Is there a way to exclude those? Or should the artifact include those at all?
谢谢.
推荐答案
复制文件"和"复制发布工件"任务支持多行小型匹配模式.您可以使用它排除不想发布的文件.
The "Contents" of "Copy Files" & "Copy Publish Artifacts" task support multiple lines of minimatch patterns. You can use it to exclude the files you don't want to publish.
例如,以下设置将不包含pdb和config文件:
For example, the pdb and config files will not be included with following settings:
ConsoleApplication1\**\bin\**\!(*.pdb|*.config)
For detailed information, please refer to this link for details: Copy executables and a readme file
这篇关于如何从vs-team-services CI构建中排除工件中的.cs文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!