Andrew Grimberg | b2f7abc | 2017-05-03 14:49:44 -0400 | [diff] [blame] | 1 | [tox] |
| 2 | minversion = 1.6 |
Anil Belur | efce693 | 2024-02-07 13:05:28 +1000 | [diff] [blame] | 3 | envlist = jjb-version |
Andrew Grimberg | b2f7abc | 2017-05-03 14:49:44 -0400 | [diff] [blame] | 4 | skipsdist = true |
| 5 | |
Anil Belur | efce693 | 2024-02-07 13:05:28 +1000 | [diff] [blame] | 6 | [testenv:jenkins-jobs] |
Andrew Grimberg | b2f7abc | 2017-05-03 14:49:44 -0400 | [diff] [blame] | 7 | deps = |
Anil Belur | efce693 | 2024-02-07 13:05:28 +1000 | [diff] [blame] | 8 | jenkins-job-builder=={env:JJB_VERSION:6.0.0} |
Andrew Grimberg | b2f7abc | 2017-05-03 14:49:44 -0400 | [diff] [blame] | 9 | commands = |
Anil Belur | efce693 | 2024-02-07 13:05:28 +1000 | [diff] [blame] | 10 | jenkins-jobs {posargs:--help} |
| 11 | |
| 12 | [testenv:jjb-version] |
| 13 | commands = python {toxinidir}/check_jjb_version.py |
| 14 | |
| 15 | [testenv:pre-commit-install] |
| 16 | basepython = python3 |
| 17 | deps = pre-commit |
| 18 | commands = |
| 19 | pre-commit install |
| 20 | pre-commit install --hook-type commit-msg |
| 21 | |
| 22 | [testenv:pre-commit-uninstall] |
| 23 | basepython = python3 |
| 24 | deps = pre-commit |
| 25 | commands = |
| 26 | pre-commit uninstall |
| 27 | pre-commit uninstall --hook-type commit-msg |
| 28 | |
| 29 | [testenv:pre-commit] |
| 30 | basepython = python3 |
| 31 | deps = pre-commit |
| 32 | passenv = HOME |
| 33 | commands = |
| 34 | pre-commit run --all-files --show-diff-on-failure |
| 35 | pre-commit run gitlint --hook-stage commit-msg --commit-msg-filename .git/COMMIT_EDITMSG |
| 36 | # Gitlint only proposes a pre-commit configuration for the commit-msg stage but none for the commit stage. |
| 37 | # Its default arguments --passed and --msg-filename are different from CI recommandations. |
| 38 | # As a result, the line above is always skipped in jenkins CI since there cannot be a .git/COMMIT_EDITMSG file. |