I have created a build pipeline which works correctly and publishes artifacts at the end.
I also created a release pipeline to deploy the REST API to Azure web app
The release pipeline task has this information:
$(System.DefaultWorkingDirectory)/**/*.zip
However I get this error:
Error: More than one package matched with specified pattern: D:\a\r1\a\**\*.zip. Please restrain the search pattern.
When I see the drop folder, I can indeed see that there are folders by date and there are several .zip files
The webapi is in the drop root, but also in the shown folder.
I havent been able to find how to clean the entire drop folder each time, or how to avoid this error.
Update 1:
In the build pipeline I can see when publishin this:
##[section]Starting: Publish Artifact: webapidrops
==============================================================================
Task : Publish Build Artifacts
Description : Publish build artifacts to Azure Pipelines/TFS or a file share
Version : 1.142.2
Author : Microsoft Corporation
Help : [More Information](https://go.microsoft.com/fwlink/?LinkID=708390)
==============================================================================
##[section]Async Command Start: Upload Artifact
Uploading 31 files
Uploading 'webapidrops/2019_04/04_06_58/LuloWebApi.zip' (16%)
Uploading 'webapidrops/LuloWebApi.zip' (16%)
Uploading 'webapidrops/LuloWebApi.zip' (33%)
Uploading 'webapidrops/LuloWebApi.zip' (50%)
Uploading 'webapidrops/LuloWebApi.zip' (66%)
Uploading 'webapidrops/LuloWebApi.zip' (83%)
Uploading 'webapidrops/LuloWebApi.zip' (100%)
File upload succeed.
Upload 'D:\a\1\a' to file container: '#/1483345/webapidrops'
Associated artifact 387 with build 125
##[section]Async Command End: Upload Artifact
##[section]Finishing: Publish Artifact: webapidrops
The zip
files are came from your build pipeline. if you need only the LuloWebApi.zip so configure your build pipeline publish artifacts task to take only this.
If you need also the second zip for your release so you can specify the LuloWebApi.zip in your release:
$(System.DefaultWorkingDirectory)/**/LuloWebApi.zip
Or, you mentioned that the zip also exist in the date folder so specify this folder:
$(System.DefaultWorkingDirectory)/**/**/*.zip
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With