Reputation: 39414
I have the following Publish and Deploy tasks in Azure DevOps:
variables:
buildConfiguration: 'Release'
buildPlatform: 'any cpu'
azureSubscription: 'subscription'
azureAppType: 'Web App on Windows'
webAppName: 'webapp'
steps:
# Other tasks
- task: DotNetCoreCLI@2
displayName: 'Publish'
inputs:
command: publish
publishWebProjects: false
arguments: '--configuration $(buildConfiguration) --output $(build.artifactstagingdirectory)'
zipAfterPublish: true
- task: AzureRmWebAppDeployment@4
displayName: 'Deploy'
inputs:
package: $(System.DefaultWorkingDirectory)/**/MyProj.zip
azureSubscription: '$(azureSubscription)'
appType: '$(azureAppType)'
webAppName: '$(webAppName)'
The publish tasks succeeds but I get the error on the Deploy task:
[error]Error: No package found with specified pattern: /home/vsts/work/1/s/**/MyProj.zip
What am I doing wrong?
Upvotes: 1
Views: 68
Reputation: 59016
Review your YAML:
You publish with the following parameters:
--output $(build.artifactstagingdirectory)
You try to deploy from a completely different location:
package: $(System.DefaultWorkingDirectory)/**/MyProj.zip
Try deploying $(build.artifactstagingdirectory)/**/MyProj.zip
.
Upvotes: 1