I am getting below error while Deploying ARM template using Azure DevOps Pipeline using YML.
This same template files i have verifed it is working.
I am copying my YAML file below.
Stage 1--Build--It is working
Stage 2-Deploy-- Error-->Error -Could not find any file matching the template file pattern
trigger:
- '*'
pool:
vmImage: "vs2017-win2016"
variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
stages:
- stage: build
displayName: Build
jobs:
- job: Build
pool:
vmImage: "vs2017-win2016"
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:
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'drop'
publishLocation: 'Container'
- stage: Deploy
displayName: Deploy
jobs:
- job: Deploy
pool:
vmImage: "vs2017-win2016"
steps:
- task: AzureResourceManagerTemplateDeployment@3
inputs:
deploymentScope: 'Resource Group'
azureResourceManagerConnection: 'azure_Connection'
subscriptionId: 'XXXXXXXXXXXXXXXXXXXXXXXXX'
action: 'Create Or Update Resource Group'
resourceGroupName: 'MyOrdermgmtRG'
location: 'East US'
templateLocation: 'Linked artifact'
csmFile: "$(System.ArtifactsDirectory)/drop/OrdermgmtService_ARM_AppServicePlan/azuredeploy.json"
csmParametersFile: "$(System.ArtifactsDirectory)/drop/OrdermgmtService_ARM_AppServicePlan/azuredeploy.parameters_QA.json"
deploymentMode: 'Incremental'