我尝试使用Azure DevOps Pipeline(CI / CD)从GitHub部署ARM模板。当我单击部署按钮时,出现以下错误。
## [错误]错误:找不到具有指定模式的软件包:d:\ a \ r1 \ a ***。zip
我按照以下链接中的建议进行操作,但对我不起作用。已添加-任务:PublishBuildArtifacts @ 1到azure-pipelines.yml文件的最后一行
azure-pipelines.yml
trigger:
- master
pool:
vmImage: 'windows-latest'
variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
steps:
- task: NuGetToolInstaller@1
- task: NuGetCommand@2
inputs:
restoreSolution: '$(solution)'
- task: VSBuild@1
inputs:
solution: '$(solution)'
msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:DesktopBuildPackageLocation="$(build.artifactStagingDirectory)\WebApp.zip" /p:DeployIisAppPath="Default Web Site"'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
- task: VSTest@2
inputs:
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
- task: PublishBuildArtifacts@1
屏幕截图
答案 0 :(得分:0)
基本上,这意味着您的软件包没有被创建或正在未扫描的路径中创建;试试这个:
- task: PublishBuildArtifacts@1
inputs:
#pathtoPublish: '$(Build.ArtifactStagingDirectory)'
答案 1 :(得分:0)