From efce69317c6b74c8f3f5c869efed5bc4f533dd7c Mon Sep 17 00:00:00 2001 From: Anil Belur Date: Wed, 7 Feb 2024 13:05:28 +1000 Subject: 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 --- tox.ini | 39 ++++++++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 7 deletions(-) (limited to 'tox.ini') 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. -- cgit 1.2.3-korg