【发布时间】:2021-02-10 15:06:42
【问题描述】:
我在通过管道将 Blazor 应用程序部署到 Azure Web 应用程序服务时遇到问题。 除 Azure Web App 服务部署外,所有步骤均已通过。
它给了我错误:
**##[error]Error: No package found with specified pattern: D:\a\1\s\**\*.zip<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.**
这是有问题的 YAML 管道:
trigger:
- master
pool:
vmImage: 'windows-latest'
steps:
- task: DotNetCoreCLI@2
inputs:
command: 'build'
projects: '**/*.csproj'
- task: CopyFiles@2
inputs:
sourceFolder: $(Build.SourcesDirectory)
targetFolder: $(Build.ArtifactStagingDirectory)
- task: PublishBuildArtifacts@1
- task: AzureWebApp@1
inputs:
azureSubscription: 'Pay-As-You-Go (********-****-****-****-************)'
appType: 'webApp'
appName: 'Xenoprovider'
package: '$(System.DefaultWorkingDirectory)/**/*.zip'
deploymentMethod: 'auto'
如果有人能提供帮助,我将不胜感激,我是单人操作:)
【问题讨论】:
-
zip文件在哪里创建?在哪个位置? -
您需要将哪个文件上传到 azure Web 应用? zip 文件还是 razor 文件?
-
事情是我不完全确定。我想我需要 zip 文件。我的最终目标是将应用程序作为产品发布(对 repo 进行更改,然后构建和部署)。事情是我通过 Visual Studio -> 发布操作手动执行此操作。但现在我想使用 Azure DevOps 来自动化该过程。
标签: azure azure-devops yaml azure-web-app-service azure-pipelines