我已经创建了一个构建管道,它可以正确地工作,并在最后发布工件。
我还创建了一个发布管道,用于将REST API部署到Azure web应用程序
发布管道任务包含以下信息:
$(System.DefaultWorkingDirectory)/**/*.zip
然而,我得到了这个错误:
Error: More than one package matched with specified pattern: D:\a\r1\a\**\*.zip. Please restrain the search pattern.
当我看到drop文件夹时,我确实可以看到按日期排列的文件夹和几个.zip文件
webapi位于drop根目录中,但也位于所示的文件夹中。
我还不能找到如何清理整个投递文件夹每次,或如何避免这个错误。
更新1:
在构建管道中,我可以看到何时在下面发布:
##[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
发布于 2019-04-03 22:44:30
zip
文件来自您的构建管道。如果您只需要LuloWebApi.zip,那么将您的构建管道发布工件任务配置为只接受它。
如果您还需要用于您的版本的第二个压缩文件,以便您可以在您的版本中指定LuloWebApi.zip:
$(System.DefaultWorkingDirectory)/**/LuloWebApi.zip
或者,您提到zip也存在于date文件夹中,因此请指定此文件夹:
$(System.DefaultWorkingDirectory)/**/**/*.zip
发布于 2020-09-10 19:23:52
我的问题是,我在同一个解决方案中有一个MVC项目和一个API项目--创建一个POC。我删除了MVC项目(通过Visual Studio)。然而,物理文件仍然是源代码控制的一部分。
在部署(通过Azure DevOps)时,它仍然将这两个项目作为工件的一部分,并抛出了该错误。
https://stackoverflow.com/questions/55495885
复制相似问题