How do I exclude the .cs files within an artifact from a vs-team-services CI build?
Asked Answered
F

1

1

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.

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?

Thanks.

Flurried answered 5/5, 2016 at 21:44 Comment(0)
J
2

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.

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

Juna answered 6/5, 2016 at 2:16 Comment(1)
I tried a few pattern but now I'm getting into some issue, basically I have mutliple folder layers, and each folder have some .cs files, I can exclude the first layer by doing this myapp\!(*.cs) , but for the folder level below it , do I have to specific the NOT expression per folder level? Or there is an express to exclude all *.cs files in all folder levels no matter how deep it is?Flurried

© 2022 - 2024 — McMap. All rights reserved.