robert.tomczyk | d643ea7 | 2020-12-02 18:20:02 +0000 | [diff] [blame] | 1 | [tox] |
| 2 | basepython = py36 |
| 3 | minversion = 2.5 |
| 4 | skipsdist = true |
| 5 | envlist = shellcheck, yamllint, jjbtest, jjbdeploy |
| 6 | install_command = pip install --force-reinstall {opts} {packages} |
| 7 | deps = -r{toxinidir}/jjb/infra/test-requirements.txt |
| 8 | |
| 9 | [testenv:jjbtest] |
| 10 | description = invoke jenkins-job-builder to analyse jjb templates |
| 11 | passenv = * |
| 12 | deps = -r{toxinidir}/jjb/infra/test-requirements.txt |
| 13 | whitelist_externals = bash |
| 14 | commands = |
| 15 | bash -c "jenkins-jobs --conf {toxinidir}/jjb/global/jenkins_jobs.ini \ |
| 16 | test --config-xml --recursive {toxinidir}/jjb" |
| 17 | |
| 18 | [testenv:jjbdeploy] |
| 19 | description = invoke jenkins-job-builder to deploy jobs from jjb templates |
| 20 | passenv = * |
| 21 | deps = -r{toxinidir}/jjb/infra/test-requirements.txt |
| 22 | whitelist_externals = bash |
| 23 | commands = |
robert.tomczyk | 004e643 | 2020-12-03 14:52:10 +0000 | [diff] [blame] | 24 | bash -c "jenkins-jobs --conf {toxinidir}/jjb/global/jenkins_jobs.ini \ |
robert.tomczyk | d643ea7 | 2020-12-02 18:20:02 +0000 | [diff] [blame] | 25 | --user $JJB_USERNAME --password $JJB_USERTOKEN update --recursive \ |
| 26 | --delete-old --workers 4 {toxinidir}/jjb" |
| 27 | |
| 28 | [testenv:yamllint] |
| 29 | description = invoke yamllint to analyse YAML files |
| 30 | deps = -r{toxinidir}/jjb/infra/test-requirements.txt |
| 31 | ignore_outcome=true |
| 32 | whitelist_externals = bash |
| 33 | commands = |
| 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] |
| 39 | description = invoke shellcheck to analyse bash shell scripts |
| 40 | deps = -r{toxinidir}/jjb/infra/test-requirements.txt |
| 41 | ignore_outcome=true |
| 42 | whitelist_externals = bash |
| 43 | commands = |
| 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: |