Add override for GT file-paths in Python jobs 97/10397/2
authorThanh Ha <thanh.ha@linuxfoundation.org>
Thu, 3 May 2018 15:48:04 +0000 (11:48 -0400)
committerDaniel Farrell <dfarrell@redhat.com>
Thu, 3 May 2018 21:58:25 +0000 (17:58 -0400)
Some projects may have small Python sub-projects within their
repos. This would allow them to only trigger builds when there
is a change in the relevant directory.

Change-Id: If54f43eb3f66d0c6b493495a82a65989fc7ed6c3
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
docs/jjb/lf-python-jobs.rst
jjb/lf-python-jobs.yaml

index 980e867..6288c4d 100644 (file)
@@ -75,6 +75,11 @@ IQ Server.
     :submodule-recursive: Whether to checkout submodules recursively.
         (default: true)
     :gerrit_clm_triggers: Override Gerrit Triggers.
+    :gerrit_trigger_file_paths: Override file paths which used to filter which
+        file modifications will trigger a build. Refer to JJB documentation for
+        "file-path" details.
+        https://docs.openstack.org/infra/jenkins-job-builder/triggers.html#triggers.gerrit
+
 
 Python Sonar with Tox
 ---------------------
@@ -137,6 +142,11 @@ https://docs.sonarqube.org/display/PLUG/Python+Coverage+Results+Import
     :submodule-recursive: Whether to checkout submodules recursively.
         (default: true)
     :gerrit_sonar_triggers: Override Gerrit Triggers.
+    :gerrit_trigger_file_paths: Override file paths which used to filter which
+        file modifications will trigger a build. Refer to JJB documentation for
+        "file-path" details.
+        https://docs.openstack.org/infra/jenkins-job-builder/triggers.html#triggers.gerrit
+
 
 Tox Verify
 ----------
@@ -180,3 +190,7 @@ following pyenv variables before running.
         (default: '')
     :tox-envs: Tox environments to run. If blank run everything described
         in tox.ini. (default: '')
+    :gerrit_trigger_file_paths: Override file paths which used to filter which
+        file modifications will trigger a build. Refer to JJB documentation for
+        "file-path" details.
+        https://docs.openstack.org/infra/jenkins-job-builder/triggers.html#triggers.gerrit
index be66e05..0029f3e 100644 (file)
     gerrit_clm_triggers:
       - comment-added-contains-event:
           comment-contains-value: run-clm$
+    gerrit_trigger_file_paths:
+      - compare-type: ANT
+        pattern: '**'
 
     #####################
     # Job Configuration #
               branches:
                 - branch-compare-type: ANT
                   branch-pattern: '**/{branch}'
+              file-paths: '{obj:gerrit_trigger_file_paths}'
           skip-vote:
             successful: true
             failed: true
     gerrit_sonar_triggers:
       - comment-added-contains-event:
           comment-contains-value: run-sonar$
+    gerrit_trigger_file_paths:
+      - compare-type: ANT
+        pattern: '**'
 
     #####################
     # Job Configuration #
               branches:
                 - branch-compare-type: 'ANT'
                   branch-pattern: '**/master'
+              file-paths: '{obj:gerrit_trigger_file_paths}'
           skip-vote:
             successful: true
             failed: true
       - draft-published-event
       - comment-added-contains-event:
           comment-contains-value: recheck$
+    gerrit_trigger_file_paths:
+      - compare-type: ANT
+        pattern: '**'
 
     parallel: true
 
               branches:
                 - branch-compare-type: ANT
                   branch-pattern: '**/{branch}'
+              file-paths: '{obj:gerrit_trigger_file_paths}'
 
 - job-template:
     # Python projects typically use tox to run testing.