visual-studio-codeazure-devopsazure-pipelines-yaml

Why does VS Code give linting errors for a valid Azure Pipelines YAML file?


I have a valid pipeline.yaml that succeeds when it is ran in a DevOps Pipeline. But when I edit it in VS Code, I get squiggly lines on following code:

stages:
- stage: deployResources
  displayName: 'Deploy resource group'
  jobs:
  - job: deploymentGroup
    displayName: 'run deployment group'
    steps:
    - task: AzureResourceManagerTemplateDeployment@3 <-- this whole section
      inputs:
        ...

The popup says:

String does not match the pattern of "^PowerShell@2$".yaml-schema: Azure Pipelines

Like this:

enter image description here

I have Microsoft's Azure Pipelines extension installed. Can somebody confirm if they have the same behavior - is it a bug in the extension or something wrong in my local setup?


Solution

  • Testing on my side, it works fine without any warning or error. enter image description here

    To resolve the issue, you can try the followings:

    1. Update extension "Azure Pipelines" to the latest version. I am using version 1.249.0.

    2. Uninstall and re-install this extension.

    If they don't work, share your completed AzureResourceManagerTemplateDeployment@3 task.