【问题标题】:Azure CD pipeline can't find build artifactsAzure CD 管道找不到生成项目
【发布时间】:2020-11-14 07:21:07
【问题描述】:

以下是来自 Azure 发布管道的 Azure 错误日志。

2020-07-24T05:17:13.7712974Z ##[section]Starting: Deploy Azure App Service
2020-07-24T05:17:14.0464143Z ==============================================================================
2020-07-24T05:17:14.0465719Z Task         : Azure App Service deploy
2020-07-24T05:17:14.0469391Z Description  : Deploy to Azure App Service a web, mobile, or API app using Docker, Java, .NET, .NET Core, Node.js, PHP, Python, or Ruby
2020-07-24T05:17:14.0469849Z Version      : 3.163.5
2020-07-24T05:17:14.0470410Z Author       : Microsoft Corporation
2020-07-24T05:17:14.0470921Z Help         : https://aka.ms/azureappservicetroubleshooting
2020-07-24T05:17:14.0471274Z =============================================================================
2020-07-24T05:17:16.0650643Z Got connection details for Azure App Service:'XXXXX'
2020-07-24T05:17:17.6576087Z (node:764) Warning: Use Cipheriv for counter mode of aes-256-ctr
**2020-07-24T05:17:17.6627737Z ##[error]Error: No package found with specified pattern: D:\a\r1\a\Drop<br/>Check if the package mentioned in the task is published as an artifact in the build or a previous stage and downloaded in the current job.**
2020-07-24T05:17:22.9168975Z Successfully added release annotation to the Application Insight : XXXXX
2020-07-24T05:17:24.8686063Z Successfully updated deployment History at https://XXXXX.scm.azurewebsites.net/api/deployments/231595567842919
2020-07-24T05:17:24.8933576Z ##[section]Finishing: Deploy Azure App Service

附:我检查了构建管道,我可以下载构建 Artificats,但它显示在警告下方。

[警告]目录 'D:\a\1\a' 为空。不会添加任何内容来构建工件“drop”。

【问题讨论】:

    标签: azure azure-devops azure-web-app-service azure-pipelines-release-pipeline build-pipeline


    【解决方案1】:

    假设您的意思是您已经解决了构建工件空问题,但发布管道在Azure App Service deploy 任务中仍然存在问题。

    如错误所述,出现“No package found with specified pattern: D:\a\r1\a\Drop”,你需要检查你是如何定义package的,试试format @ 987654323@ 而不是 $(System.DefaultWorkingDirectory)\Drop

    【讨论】:

    • 你查看我的回复了吗?如果对您有帮助,您可以Accept it as an Answer,这对阅读此主题的其他社区成员可能会有所帮助。
    【解决方案2】:

    作为任务“发布构建工件”从 $(build.artifactstagingdirectory) 发布工件,所以我们需要添加一个任务“复制文件”来将文件**从 $(system.defaultworkingdirectory) 复制到 $(build.artifactstagingdirectory) **。它将我的构建复制到 stagingdirectory。

    【讨论】:

    • 感谢cece Dong的审阅,但这是解决了其中一个问题,但仍然没有解决整个问题。
    • 如果您有其他问题,可以开新票。
    • 不,问题与找不到构建工件相同。
    • 我有点困惑,如果问题没有解决,这个答案的含义是什么?您是如何在发布管道中定义工件的?你是如何定义Deploy Azure App Service 任务的?你能详细说明你的问题吗?
    猜你喜欢
    • 2022-07-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-09-04
    • 2020-04-07
    • 2022-01-22
    • 2023-02-02
    • 1970-01-01
    相关资源
    最近更新 更多