tbc-check CLI tool
tbc-check
is a basic CLI program that checks to-be-continuous templates.
Install
pip install tbc-check --index-url https://gitlab.com/api/v4/projects/to-be-continuous%2Ftools%2Ftbc-check/packages/pypi/simple --upgrade
# obtain help
tbc-check --help
Checked rules
tbc-check
checks the following rules:
- the existence of the
kicker.json
file - the existence of the
README.md
file - for each variable in the
kicker.json
file (main template and variants):- emtpy default values should be omitted
- mapped input is declared in the related template with same name, type, default, options and description (WARNING only)
- the variable is declared in the related template with expected input mapping (
$[[ inputs.input-name ]]
) - the input/variable is documented in the README with same default (WARNING only)
- for variables corresponding to container images:
- explicit image registry is specified
- uses latest tag by default
- for each job defined in GitLab templates:
- the job starts with the template (job) prefix
- each report file complies to the naming conventions
If any non-WARNING rule fails, tbc-check
fails with exit code 127.
Developers
# install dependencies
poetry install
# obtain help
poetry run tbc-check --help
# run tool
poetry run tbc-check path/to/tbc/template