Use include-regions to limit RTD build paths 89/11189/3
authorThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 12 Jun 2018 01:41:42 +0000 (21:41 -0400)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 12 Jun 2018 19:51:12 +0000 (15:51 -0400)
Issue: RELENG-1022
Change-Id: I4e5ed50d399b49470a95937a2b17cade210b768c
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
jjb/lf-rtd-jobs.yaml

index aecba2a..3c21dbc 100644 (file)
     ######################
 
     gerrit_trigger_file_paths:
-      - compare-type: ANT
-        pattern: '**/*.css'
-      - compare-type: ANT
-        pattern: '**/*.html'
-      - compare-type: ANT
-        pattern: '**/*.rst'
-      - compare-type: ANT
-        pattern: '**/conf.py'
+      - compare-type: REG_EXP
+        pattern: '.*\.css'
+      - compare-type: REG_EXP
+        pattern: '.*\.html'
+      - compare-type: REG_EXP
+        pattern: '.*\.rst'
+      - compare-type: REG_EXP
+        pattern: '.*\/conf.py'
+
+    # github_included_regions MUST match gerrit_trigger_file_paths
+    github_included_regions:
+      - '.*\.css'
+      - '.*\.html'
+      - '.*\.rst'
+      - '.*\/conf.py'
 
     #####################
     # Job Configuration #
           url: '{git-url}/{github-org}/{project}'
 
     triggers:
-      - lf-infra-github-pr-trigger:
+      - timed: 'H H * * *'
+      - github
+      - pollscm:
+          cron: ''
+      - github-pull-request:
           trigger-phrase: '^remerge$'
-          only-trigger-phrase: false
+          only-trigger-phrase: true
           status-context: 'RTD Merge'
-          permit-all: true
+          permit-all: false
           github-hooks: true
-          github-org: ''
-          github_pr_whitelist:
-            - ''
-          github_pr_admin_list:
-            - ''
-      - timed: 'H H * * *'
+          org-list:
+            - '{github-org}'
+          white-list: '{obj:github_pr_whitelist}'
+          admin-list: '{obj:github_pr_admin_list}'
+          included-regions: '{obj:github_included_regions}'
 
 #############
 # RTD VERIFY#
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
 
     triggers:
-      - lf-infra-github-pr-trigger:
+      - github-pull-request:
           trigger-phrase: '^recheck$'
           only-trigger-phrase: false
           status-context: 'RTD Verify'
           permit-all: true
           github-hooks: true
-          github-org: ''
-          github_pr_whitelist:
-            - ''
-          github_pr_admin_list:
-            - ''
+          included-regions: '{obj:github_included_regions}'