Forum Discussion
Chanakya18
Oct 17, 2024Copper Contributor
Azure Devops Yaml syntax issues
Hi All,
I am new to Yaml, and I am getting a syntax error with the Yaml file below.
The error says "/azure-pipelines.yml (Line: 7, Col: 1): While parsing a block mapping, did not find expected key."
-----Yaml-
trigger:
- week1
pool: Azure Pipelines
- task: AzureCLI@2
displayName: 'Running Pipeline Script'
inputs:
azureSubscription: 'MraoppingTest'
scriptType: 'bash'
scriptLocation: 'scriptPath'
scriptPath: 'pipeline_script.sh'
It looks like you may have a formatting issue. Try putting single quotes around the “pool” key value as follows:
trigger: - week1 pool: 'Azure Pipelines' steps: - task: AzureCLI@2 displayName: 'Running Pipeline Script' inputs: azureSubscription: 'MraoppingTest' scriptType: 'bash' scriptLocation: 'scriptPath' scriptPath: 'pipeline_script.sh'
2 Replies
Sort By
- kareem_tCopper Contributor
It looks like you may have a formatting issue. Try putting single quotes around the “pool” key value as follows:
trigger: - week1 pool: 'Azure Pipelines' steps: - task: AzureCLI@2 displayName: 'Running Pipeline Script' inputs: azureSubscription: 'MraoppingTest' scriptType: 'bash' scriptLocation: 'scriptPath' scriptPath: 'pipeline_script.sh'
- Chanakya18Copper Contributor