How to check YML grammar is correct (gitlab.yml)

落花浮王杯 提交于 2019-12-04 11:13:50
VonC

What I use, and this works with any editor, is a comparison between:

  • gitlab.yml
  • gitlab.yml.example

I developed a little bash diff script which will look for differences in keys (not values, since you are supposed to put your own values there)

## LDAP setting
ldap:               (<--- it is a key)
  enabled: true
    ^^^     ^^^
    key      value

I just do a:

cd gitlab/config
check_all_diff .

That way, if there are any change in term of keys, key order, new keys or deleted keys, I can spot those when I upgrade gitlab.

To summarize, you need to copy in a directory part of your $PATH:

Don't forget to:

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!