【问题标题】:Is there a way to deploy multiple zip packages from a folder of the artifacts using Azure Web App deployment task in Azure DevOps?有没有办法使用 Azure DevOps 中的 Azure Web App 部署任务从工件文件夹中部署多个 zip 包?
【发布时间】:2019-09-13 15:07:44
【问题描述】:

我的工件文件夹中有多个 CS 项目包,需要部署到具有多个虚拟目录的 Web 应用程序中。当我将“$(System.DefaultWorkingDirectory)/*/*/APIs/*.zip”作为我的包/文件夹模式进行部署时,它会说“

错误:多个包与指定模式匹配: C:\agent_work\r8\a**\APIs*.zip。请克制搜索 模式。

【问题讨论】:

  • 如果您有多个包,为什么不将它们全部打包到一个 zip 文件中然后部署?
  • 有没有办法在构建期间将所有 API 文件夹打包为 1 个包?现在,我将所有 API 复制到一个文件夹中,并使用 PS 作为后期构建步骤将其打包到一个 ZIP 中。

标签: azure-devops release azure-pipelines-release-pipeline


【解决方案1】:

你可以先在当前目录解压你的包:

Unzip "$(System.DefaultWorkingDirectory)\$(Package.PackageName)" "$(System.DefaultWorkingDirectory)\Build\Package"

然后像这样给出您的文件夹的路径,而不是 '$(System.DefaultWorkingDirectory)///APIs/*.zip':

Build\Package\web

虚拟目录的创建是独立的部分。您可以在部署 Web 应用程序内容之前创建虚拟目录。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-10-04
    • 2021-10-11
    相关资源
    最近更新 更多