I have a successful build (yaml) and release (gui) pipeline in Azure pipelines. I'm trying to convert my release GUI version into yaml version. I know that I can get the snippet of yaml from GUI release version and I did. However, I'm missing something else I guess because I'm getting an error in the release about the drop not found.
I'm trying to deploy to Web App Service on Azure.
Any initial thoughts?
Starting: DownloadBuildArtifacts
==============================================================================
Task : Download build artifacts
Description : Download files that were saved as artifacts of a completed build
Version : 0.206.0
Author : Microsoft Corporation
Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/download-build-artifacts
==============================================================================
Downloading artifacts for build: 64
##[error]Artifact drop not found for build 64. Please ensure you have published artifacts in any previous phases of the current build.
Finishing: DownloadBuildArtifacts
Build yaml
# ASP.NET
# Build and test ASP.NET projects.
# Add steps that publish symbols, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/apps/aspnet/build-aspnet-4
trigger:
- master
pool: rspool
# ASP.NET
# Build and test ASP.NET projects.
# Add steps that publish symbols, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/apps/aspnet/build-aspnet-4
trigger:
- master
pool: rspool
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:PackageLocation="$(build.artifactStagingDirectory)"'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
- task: VSTest@2
inputs:
testSelector: 'testAssemblies'
testAssemblyVer2: |
**\UnitTestProject*.dll
!**\*TestAdapter.dll
!**\obj\**
searchFolder: '$(System.DefaultWorkingDirectory)'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'drop'
publishLocation: 'Container'
Release yaml
variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
Parameters.ConnectedServiceName: 'WorksFine'
Parameters.WebAppKind: 'webApp'
Parameters.WebAppName: 'mysolname'
steps:
- task: DownloadBuildArtifacts@0
inputs:
artifactName: 'drop'
buildType: 'current'
downloadType: 'single'
downloadPath: '$(System.ArtifactsDirectory)'
- task: AzureRmWebAppDeployment@4
displayName: 'Deploy Azure App Service'
inputs:
azureSubscription: '$(Parameters.ConnectedServiceName)'
appType: '$(Parameters.WebAppKind)'
WebAppName: '$(Parameters.WebAppName)'
