blob: ac5cf95ffed15ee082c8dbebfd5eb1f55e0488e1 [file] [log] [blame]
robert.tomczykd643ea72020-12-02 18:20:02 +00001[tox]
2basepython = py36
3minversion = 2.5
4skipsdist = true
5envlist = shellcheck, yamllint, jjbtest, jjbdeploy
6install_command = pip install --force-reinstall {opts} {packages}
7deps = -r{toxinidir}/jjb/infra/test-requirements.txt
8
9[testenv:jjbtest]
10description = invoke jenkins-job-builder to analyse jjb templates
11passenv = *
12deps = -r{toxinidir}/jjb/infra/test-requirements.txt
13whitelist_externals = bash
14commands =
15 bash -c "jenkins-jobs --conf {toxinidir}/jjb/global/jenkins_jobs.ini \
16 test --config-xml --recursive {toxinidir}/jjb"
17
18[testenv:jjbdeploy]
19description = invoke jenkins-job-builder to deploy jobs from jjb templates
20passenv = *
21deps = -r{toxinidir}/jjb/infra/test-requirements.txt
22whitelist_externals = bash
23commands =
robert.tomczyk004e6432020-12-03 14:52:10 +000024 bash -c "jenkins-jobs --conf {toxinidir}/jjb/global/jenkins_jobs.ini \
robert.tomczykd643ea72020-12-02 18:20:02 +000025 --user $JJB_USERNAME --password $JJB_USERTOKEN update --recursive \
26 --delete-old --workers 4 {toxinidir}/jjb"
27
28[testenv:yamllint]
29description = invoke yamllint to analyse YAML files
30deps = -r{toxinidir}/jjb/infra/test-requirements.txt
31ignore_outcome=true
32whitelist_externals = bash
33commands =
34 bash -c "find {toxinidir} -type f -regex '.*.ya?ml' \
35 ! -regex '.*.tox.*\|.*.venv.*' \
36 -print0 | xargs -t -n1 -0 yamllint --format standard --strict"
37
38[testenv:shellcheck]
39description = invoke shellcheck to analyse bash shell scripts
40deps = -r{toxinidir}/jjb/infra/test-requirements.txt
41ignore_outcome=true
42whitelist_externals = bash
43commands =
44 bash -c "find {toxinidir} -type f -regex '.*.sh' \
45 ! -regex '.*.tox.*\|.*.venv.*' \
46 -print0 | xargs -t -n1 -0 shellcheck --color=never --source-path={toxinidir} \
47 --external-sources --format=tty"
48
49# vim: set ts=2 sw=2 ft=ini expandtab: