Generate docs from pipeline libraries. Tested with Gitlab CI but other yaml-based CIs should also work
-
Install pipedoc
pip install git+https://github.com/rndmit/pipedoc.git@master
-
Separate your templates into "modules" where one file contains only one template and it's variables (e.g. golang.yaml)
-
Group modules into separate directories (e.g. build) and move them to library dir (e.g. lib)
-
Write your doc in comment at the beginning of the module's file and insert yaml document separator (---) after it. It's your module docstring which will be inlined into documentation.
-
Add comments like
#!opt: Some awesome option
before variables should be documented -
mkdir -p docs/{raw,modules}
-
python -m pipedoc generate -l lib -d docs -g build
-
Enjoy!