blob: fc81f926af9f58c342e221cfb96a571391aa9ef0 [file] [log] [blame]
Andrew Grimbergb2f7abc2017-05-03 14:49:44 -04001[tox]
2minversion = 1.6
Anil Belurefce6932024-02-07 13:05:28 +10003envlist = jjb-version
Andrew Grimbergb2f7abc2017-05-03 14:49:44 -04004skipsdist = true
5
Anil Belurefce6932024-02-07 13:05:28 +10006[testenv:jenkins-jobs]
Andrew Grimbergb2f7abc2017-05-03 14:49:44 -04007deps =
Anil Belurefce6932024-02-07 13:05:28 +10008 jenkins-job-builder=={env:JJB_VERSION:6.0.0}
Andrew Grimbergb2f7abc2017-05-03 14:49:44 -04009commands =
Anil Belurefce6932024-02-07 13:05:28 +100010 jenkins-jobs {posargs:--help}
11
12[testenv:jjb-version]
13commands = python {toxinidir}/check_jjb_version.py
14
15[testenv:pre-commit-install]
16basepython = python3
17deps = pre-commit
18commands =
19 pre-commit install
20 pre-commit install --hook-type commit-msg
21
22[testenv:pre-commit-uninstall]
23basepython = python3
24deps = pre-commit
25commands =
26 pre-commit uninstall
27 pre-commit uninstall --hook-type commit-msg
28
29[testenv:pre-commit]
30basepython = python3
31deps = pre-commit
32passenv = HOME
33commands =
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.