Azure mapping values are not allowed in this context

If you are getting the following error while running your azure devops pipeline:

Encountered error(s) while parsing pipeline YAML: /pipeline.yml: Mapping values are not allowed in this context.

The error comes when you have extra indendtation in your yaml file for sub properties, for example this case:

steps:
  - checkout: self
      clean: false 

In the above example, the clean: false property is having extra indentation. The solution is to fix the indentation and write it like this:

steps:
  - checkout: self
    clean: false

After fixing the above mentioned issue, the mapping values are not allowed in this context issue will be fixed.