What is this error? Unable to parse YAML: mapping values are not allowed here?

274    Asked by ElayneBalding in Salesforce , Asked on Sep 11, 2023

 I am shifting from Gitlab to CircleCl and am trying to chalk out a simple pipeline (“workplace”) that should look like this:

I wasted time by copy-pasting example configs from the documentation. I have defined three jobs: Build Tests Release I then created a minimal workflow that will echo the job title, include some requirements (to map the pipeline), and have a condition that will only trigger releases on tags.  Although I am always getting a YAML parsing error, mapping values are not allowed here.

Given below is my config.yaml that is currently failing:

I have also tried online YAML validators, but they are always saying that this is the correct YAML; there should be something wrong with the way Circle expects the config to be. What can it be?  I have managed to minify an example that causes the same error.

The causes:

When I ran your config.yml through yamllint, it produced the following: If I add colons to the entries on lines 25 and 28, we get this: There is no longer any report for syntax error. You have an incorrect YAML syntax in your workflow jobs list. What I could understand from circleCI's documentation is that if you do not define any parameters, job names are accepted as shorthand. In case you have parameters, the list element is a hashmap, with the top element being the job name. For your case, this should give (do note the columns after the names of jobs with params):



Your Answer

Interviews

Parent Categories