Update cloud image list docs
[releng/builder.git] / tox.ini
1 [tox]
2 minversion = 1.6
3 envlist = docs,docs-linkcheck,jjb-version,prefix,robot
4 skipsdist = true
5
6 [testenv:docs]
7 deps = -rdocs/requirements.txt
8 commands = sphinx-build -q -W -b html -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html
9
10 [testenv:docs-linkcheck]
11 passenv = http_proxy, https_proxy, no_proxy
12 basepython = python3
13 deps = -rdocs/requirements.txt
14 commands = sphinx-build -q -W -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck
15
16 [testenv:jenkins-jobs]
17 deps =
18     jenkins-job-builder=={env:JJB_VERSION:5.0.2}
19 commands =
20     jenkins-jobs {posargs:--help}
21
22 [testenv:jjb-version]
23 commands = python {toxinidir}/check_jjb_version.py
24
25 [testenv:pre-commit-install]
26 basepython = python3
27 deps = pre-commit
28 commands =
29     pre-commit install
30     pre-commit install --hook-type commit-msg
31
32 [testenv:pre-commit-uninstall]
33 basepython = python3
34 deps = pre-commit
35 commands =
36     pre-commit uninstall
37     pre-commit uninstall --hook-type commit-msg
38
39 [testenv:pre-commit]
40 basepython = python3
41 deps = pre-commit
42 passenv = HOME
43 commands =
44     pre-commit run --all-files --show-diff-on-failure
45     pre-commit run gitlint --hook-stage commit-msg --commit-msg-filename .git/COMMIT_EDITMSG
46     # Gitlint only proposes a pre-commit configuration for the commit-msg stage but none for the commit stage.
47     # Its default arguments --passed and --msg-filename are different from CI recommandations.
48     # As a result, the line above is always skipped in jenkins CI since there cannot be a .git/COMMIT_EDITMSG file.
49
50 [testenv:prefix]
51 commands = python {toxinidir}/check_prefix.py
52
53 [testenv:robot]
54 basepython = python3
55 commands = python {toxinidir}/check_robot.py
56
57 [testenv:cut-branch-jobs]
58 basepython = python3
59 deps =
60     pre-commit
61     ruamel.yaml
62 commands =
63     python scripts/cut-branch-jobs.py {posargs:--help} {toxinidir}/jjb
64     - pre-commit run --all-files prettier
65
66 [testenv:checkbashisms]
67 deps =
68 allowlist_externals = sh
69                       find
70                       checkbashisms
71 commands =
72     sh -c 'which checkbashisms>/dev/null  || sudo yum install devscripts-minimal || sudo apt-get install devscripts \
73         || (echo "checkbashisms command not found - please install it (e.g. sudo apt-get install devscripts | \
74         yum install devscripts-minimal )" >&2 && exit 1)'
75     find . -not -path '*/\.*' -name *.sh -exec checkbashisms -f  \{\} +
76
77 [testenv:pylint]
78 basepython = python3
79 deps = pylint>=2.6.0
80 allowlist_externals = find
81 commands =
82 # .tox folder and submodules directories global-jjb/ & packer/common-packer/ must be excluded since they are not maintained here
83     find . -name *.py -not -path "./.tox/*" -not -path "./global-jjb/*" -not -path "./packer/common-packer/*" -exec \
84     pylint --fail-under=6.50 --max-line-length=120 --disable=missing-docstring --disable=fixme --disable=duplicate-code \{\} +
85