gpt4 book ai didi

azure-devops - 为什么此 Azure DevOps 管道发布失败?

转载 作者:行者123 更新时间:2023-12-02 16:50:51 25 4
gpt4 key购买 nike

这是一个构建没有错误的 ASP.NET Core 3.0 项目,但是当它触发管道发布到 Azure 应用服务时,它失败并出现以下错误:

2019-11-10T23:09:23.8008460Z ##[error]Error: No package found with specified pattern: D:\a\r1\a***.zip

修复发布管道需要做什么?管道版本正在将最新版本作为其工件。

enter image description here

最佳答案

假设

以下信息假定您是适当的 publishing your build artifact来自您的构建管道,并且您已将正确的构建工件添加到您的发布管道中。


在您的发布管道中,您已在 Artifacts 区域中指定了构建工件 enter image description here

将构建工件添加到发布管道时,您选择为其指定别名 Build Artifact。这意味着您的 .zip 文件至少(使用默认设置)将位于 $(system.DefaultWorkingDirectory)/Build Artifact//的某个子目录中p>

A new unique folder in the agent is created for every release pipeline when you initiate a release, and the artifacts are downloaded into that folder. The $(System.DefaultWorkingDirectory) variable maps to this folder.


To ensure the uniqueness of every artifact download, each artifact source linked to a release pipeline is automatically provided with a specific download location known as the source alias. This location can be accessed through the variable:

$(System.DefaultWorkingDirectory)\[source alias]

This uniqueness also ensures that, if you later rename a linked artifact source in its original location (for example, rename a build pipeline in Azure Pipelines or a project in Jenkins), you don't need to edit the task properties because the download location defined in the agent does not change.

The source alias is, by default, the name of the source selected when you linked the artifact source, prefixed with an underscore; depending on the type of the artifact source this will be the name of the build pipeline, job, project, or repository. You can edit the source alias from the artifacts tab of a release pipeline; for example, when you change the name of the build pipeline and you want to use a source alias that reflects the name of the build pipeline.

(来自一些丰富的 documentation

不要使用 ***.zip(这不是正确的通配符语法)搜索您的包,而是使用 Build Artifact/**/*.zip

  • ** 用于递归搜索目录
    • (我不知道是什么文件夹)
  • * 用于搜索路径的给定级别的一部分
    • 任何文件/文件夹
      • 以 (SomeFile.*) 开头
      • 以 (*File.zip) 结尾
      • 我认为包含 (*meFi*)

关于azure-devops - 为什么此 Azure DevOps 管道发布失败?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58793826/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com