summaryrefslogtreecommitdiffstats
path: root/tox.ini
diff options
context:
space:
mode:
authorAnil Belur <abelur@linuxfoundation.org>2024-02-07 13:05:28 +1000
committerAnil Belur <abelur@linuxfoundation.org>2024-02-07 19:43:51 +1000
commitefce69317c6b74c8f3f5c869efed5bc4f533dd7c (patch)
tree2e1a124b62ebf22f7242b50126c65c7c4d19c643 /tox.ini
parente67635cb851fc40b9d42638f6e108f1c194ef0f8 (diff)
Feat!: Update JJB version to 6x
Jenkins Job Builder 6.0.0 is released and breaks backward compatibility with 5.1.0. The breaking changes with previous 5.1.0 release: - Jobs are now expanded the same way as job templates. - Macros without parameters are now expanded the same way as macros with parameters. - Tags !include-raw: and !include-raw-escape: should now be used the same way in jobs and macros without parameters as they are used in job templates and macros with parameters. - Update pre-commit dependencies Ref: https://storyboard.openstack.org/#!/story/2010963 https://storyboard.openstack.org/#!/story/2010588 NOTE: Set the var "JJB_VERSION" to "6.0.0" at the GH orginazation level for GHA JJB Verify to pick up the latest version of JJB. Issue-ID: CIMAN-33 LF-JIRA RELENG-5131 Change-Id: Icdeecb8bf216ceab4c5af5720f3bd89d3ef2621d Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
Diffstat (limited to 'tox.ini')
-rw-r--r--tox.ini39
1 files changed, 32 insertions, 7 deletions
diff --git a/tox.ini b/tox.ini
index a88044059..fc81f926a 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,13 +1,38 @@
[tox]
minversion = 1.6
-envlist = coala
+envlist = jjb-version
skipsdist = true
-[testenv:coala]
-basepython = python3
+[testenv:jenkins-jobs]
deps =
- coala
- coala-bears
+ jenkins-job-builder=={env:JJB_VERSION:6.0.0}
+commands =
+ jenkins-jobs {posargs:--help}
+
+[testenv:jjb-version]
+commands = python {toxinidir}/check_jjb_version.py
+
+[testenv:pre-commit-install]
+basepython = python3
+deps = pre-commit
+commands =
+ pre-commit install
+ pre-commit install --hook-type commit-msg
+
+[testenv:pre-commit-uninstall]
+basepython = python3
+deps = pre-commit
+commands =
+ pre-commit uninstall
+ pre-commit uninstall --hook-type commit-msg
+
+[testenv:pre-commit]
+basepython = python3
+deps = pre-commit
+passenv = HOME
commands =
- python3 -m nltk.downloader punkt maxent_treebank_pos_tagger averaged_perceptron_tagger
- coala --non-interactive
+ pre-commit run --all-files --show-diff-on-failure
+ pre-commit run gitlint --hook-stage commit-msg --commit-msg-filename .git/COMMIT_EDITMSG
+ # Gitlint only proposes a pre-commit configuration for the commit-msg stage but none for the commit stage.
+ # Its default arguments --passed and --msg-filename are different from CI recommandations.
+ # As a result, the line above is always skipped in jenkins CI since there cannot be a .git/COMMIT_EDITMSG file.