gitlab: Introduce macro library
authorKirill Smelkov <kirr@nexedi.com>
Thu, 7 Jan 2016 15:29:02 +0000 (18:29 +0300)
committerKirill Smelkov <kirr@nexedi.com>
Sun, 17 Jan 2016 21:39:28 +0000 (00:39 +0300)
commit2e81276b44f672b9ca026650d930fefb85723abd
tree862b24f334809e401892d6c675d2d955dc3e5439
parentde860ba5c2451bc59bbd41c1fde814a42ca245a1
gitlab: Introduce macro library

Introduce a library of Jinja2 macros that will be handy to use in
templates. For now we add only 2 macros:

    cfg(name)   - to get instance configuration parameter `name`,   and
    cfg_bool    - to get truth value of ----//----

The reason we introduce cfg() is that we will need to use a lot of
parameters in many places and it is much more handy to write, e.g.

    cfg('email_enabled')

compared to

    instance_parameter:configuration.email_enabled

/cc @kazuhiko, @jerome
software/gitlab/instance-gitlab.cfg.in
software/gitlab/instance.cfg.in
software/gitlab/macrolib.cfg.in [new file with mode: 0644]
software/gitlab/software.cfg