Search code examples
azurebuildazure-devopsreleaseartifact

Azure DevOps (On Premise) - Minimatch Pattern To Download Multiple Parts of an Artifact


I have a build artifact that I'm using as part of my release, that looks like this(Each line representing a different section/publish step of my build):

MainSolution

ExtraProject2

ExtraProject3

Database

So a bunch of different sections that I want to release in various forms. In my release, I'd like to only pull down the specific section I want to deploy, so I've created a "Download Build Artifact" step that looks like the following:

enter image description here

And it works great, pulls down all the file from just the "Database" section just fine:

2019-04-03T18:14:38.4325674Z Downloading Database/dbo/Tables/tbl_Core_Report_Subscription_Frequency_Time.sql to C:\TFSAgent4\_work\r5\a\DevelopmentVersionBuild\Database\dbo\Tables\tbl_Core_Report_Subscription_Frequency_Time.sql
2019-04-03T18:14:38.4338012Z Downloading Database/dbo/Tables/tbl_Core_Report_Style_Attribute_Exploded.sql to C:\TFSAgent4\_work\r5\a\DevelopmentVersionBuild\Database\dbo\Tables\tbl_Core_Report_Style_Attribute_Exploded.sql
2019-04-03T18:14:38.4342104Z Downloaded Database/dbo/Tables/tbl_Core_Report_Subscription.sql to C:\TFSAgent4\_work\r5\a\DevelopmentVersionBuild\Database\dbo\Tables\tbl_Core_Report_Subscription.sql

But in the next case, when I change the "Matching pattern" to pull down multiple sections, something like this:

Database/**|MainSolution/**

Now everything is skipped...

2019-04-03T18:23:24.9968583Z Total Files: 175, Processed: 0, Skipped: 175, Failed: 0, Download time: 4.397 secs, Download size: 0Bytes
2019-04-03T18:23:25.7209450Z Total Files: 227, Processed: 0, Skipped: 227, Failed: 0, Download time: 5.12 secs, Download size: 0Bytes
2019-04-03T18:23:25.7745591Z Total Files: 229, Processed: 0, Skipped: 229, Failed: 0, Download time: 5.175 secs, Download size: 0Bytes
2019-04-03T18:23:25.8355572Z Total Files: 175, Processed: 0, Skipped: 175, Failed: 0, Download time: 5.236 secs, Download size: 0Bytes
2019-04-03T18:23:25.9305217Z Total Files: 2146, Processed: 0, Skipped: 2146, Failed: 0, Download time: 5.334 secs, Download size: 0Bytes

Why is this the case? It seems like adding the "|" OR condition, breaks this step. I thought that condition was supported? I've used it in other steps to do different things without issue. Is there another way to accomplish this without creating multiple "Download Build Artifact" steps?


Solution

  • Per @jessehouwing suggested I did the following:

    enter image description here

    This will then download multiple parts of my artifact.