Update Tox JJB Command 45/54945/2
authorTrevor Bramwell <tbramwell@linuxfoundation.org>
Wed, 4 Apr 2018 20:02:35 +0000 (13:02 -0700)
committerTrevor Bramwell <tbramwell@linuxfoundation.org>
Thu, 5 Apr 2018 17:33:48 +0000 (10:33 -0700)
This allows using the command to only test one project's changes. For
example:

  tox -e jjb -- jjb/releng

Will only test jobs under 'jjb/releng'. If jobs have dependencies, of
multiple project jobs need to be tested, they can be included using the
jjb ':' syntax, as anything after '--' is passed directly to jjb:

  tox -e jjb -- jjb/doctor:jjb/functest

Change-Id: I4b71803a1d6ed4f62d50cdca87183a68b20fae5a
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
docs/infra/jenkins/jjb-usage.rst
tox.ini

index 2be2598..6712781 100644 (file)
@@ -31,6 +31,12 @@ Test with tox::
 
     tox -v -ejjb
 
+.. note:: You can also test the jobs under a single jjb directory by
+    specifying the directory. For example to test only the releng jobs, you
+    could run:
+
+     tox -v -e jjb -- jjb/releng
+
 Submit the change to gerrit::
 
     git review -v
diff --git a/tox.ini b/tox.ini
index d3489e5..6618a81 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -17,4 +17,4 @@ setenv=
 deps =
   jenkins-job-builder==1.6.1
 commands=
-  jenkins-jobs test -o job_output -r jjb/
+  jenkins-jobs test -o job_output -r jjb/global:{posargs:"jjb/"}