Circle.yml verifier/parser


#1

Hi CircleCI team - I love your service but do you have a circle.yml CLI parser? It would be nice if you could expose something via your RESTful API where I can post the circle.yml file to be parsed prior to my pushing changes up to the repo.

Often times I’ll get a syntax error back from your UI - but I have to run a full build to get that error
Please either expose your circle.yml parser via your RESTful API or provide a CLI tool that will let me verify it is syntactically correct - thanks!


#2

circle.yml is a standard yaml file, so https://yaml-online-parser.appspot.com/ should do the trick for you.

I just ran my file though it with no problems, the only thing it can’t check is key names/typos.


#3

Hi there - so having something that can do what yamllint.com as well as verification of key names and typos would really be beneficial.


#4

There’s the CLI tool that you can use to achieve this.

circleci config validate

Will check your .circleci/config.yml file. You can also run

circleci config validate --config circle.yml

If your file is in the root of your project rather than in .circleci


#5

@mads-hartmann is correct. That’s the answer to this.

We also have a blog post showing you how you can use the local build tool to do this validation upon every commit automatically: https://circleci.com/blog/circleci-hacks-validate-circleci-config-on-every-commit-with-a-git-hook/


#6