GitLab CI and YAML booleans

GitLab’s opinion of what constitutes valid YAML differs from the official spec. Booleans, in particular, are problematic.

According to the spec, boolean values are English words: yes, y, False, and so forth. GitLab disagrees1, and only recognises the invalid value 0.

When in doubt, run your gitlab-ci.yml file through the GitLab linter. Also do it when not in doubt. The alternative is to only discover the problem when your CI pipeline fails.

Footnotes

  1. There’s an open issue related to this bug. It doesn’t look promising.

Sign up for my newsletter

A monthly round-up of blog posts, projects, and internet oddments.