Forum Discussion

Chanakya18's avatar
Chanakya18
Copper Contributor
Oct 17, 2024
Solved

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 expect...
  • kareem_t's avatar
    Oct 17, 2024

    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'

Resources