Use include-regions to limit JJB build paths 85/11185/2
authorThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 12 Jun 2018 01:06:14 +0000 (21:06 -0400)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 12 Jun 2018 01:34:05 +0000 (21:34 -0400)
Issue: RELENG-1022
Change-Id: I6c50a864ea85ac2ff41df1ab91a531b55468ed3f
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
jjb/lf-ci-jobs.yaml

index 668342a..6bc8b59 100644 (file)
     submodule-recursive: true
 
     gerrit_trigger_file_paths:
-      - compare-type: ANT
-        pattern: '**/*.groovy'
-      - compare-type: ANT
-        pattern: '**/*.sh'
-      - compare-type: ANT
-        pattern: '**/*.yml'
-      - compare-type: ANT
-        pattern: '**/*.yaml'
-      - compare-type: ANT
-        pattern: '**/global-jjb'
+      - compare-type: REG_EXP
+        pattern: '.*\.groovy'
+      - compare-type: REG_EXP
+        pattern: '.*\.sh'
+      - compare-type: REG_EXP
+        pattern: '.*\.(yaml|yml)'
+      - compare-type: REG_EXP
+        pattern: '.*\/global-jjb'
+
+    # github_included_regions MUST match gerrit_trigger_file_paths
+    github_included_regions:
+      - '.*\.groovy'
+      - '.*\.sh'
+      - '.*\.(yaml|yml)'
+      - '.*\/global-jjb'
 
     #####################
     # Job Configuration #
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
 
     triggers:
-      - lf-infra-github-pr-trigger:
+      - github-pull-request:
           trigger-phrase: '^jjb-deploy (?!\*+$).+$'
           only-trigger-phrase: true
           status-context: 'JJB Deploy Job'
           permit-all: true
           github-hooks: true
-          github-org: ''
-          github_pr_whitelist:
-            - ''
-          github_pr_admin_list:
-            - ''
 
 #############
 # JJB Merge #
     # yamllint disable-line rule:key-duplicates
     <<: *lf_jjb_merge
 
+    #####################
+    # Job Configuration #
+    #####################
+
     properties:
       - github:
           url: '{git-url}/{github-org}/{project}'
       - github
       - pollscm:
           cron: ''
-      - lf-infra-github-pr-trigger:
+      - github-pull-request:
           trigger-phrase: '^remerge$'
           only-trigger-phrase: true
           status-context: 'JJB Merge'
           permit-all: false
           github-hooks: true
-          github-org: '{github-org}'
-          github_pr_whitelist: '{obj:github_pr_whitelist}'
-          github_pr_admin_list: '{obj:github_pr_admin_list}'
+          org-list:
+            - '{github-org}'
+          white-list: '{obj:github_pr_whitelist}'
+          admin-list: '{obj:github_pr_admin_list}'
+          included-regions: '{obj:github_included_regions}'
 
 ##############
 # JJB Verify #
     # yamllint disable-line rule:key-duplicates
     <<: *lf_jjb_verify
 
+    ######################
+    # Default parameters #
+    ######################
+
     git-url: '$GIT_URL/$GERRIT_PROJECT'
 
+    #####################
+    # Job Configuration #
+    #####################
+
     scm:
       - lf-infra-gerrit-scm:
           git-url: '{git-url}'
     # yamllint disable-line rule:key-duplicates
     <<: *lf_jjb_verify
 
+    #####################
+    # Job Configuration #
+    #####################
+
     properties:
       - github:
           url: '{git-url}/{github-org}/{project}'
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
 
     triggers:
-      - lf-infra-github-pr-trigger:
+      - github-pull-request:
           trigger-phrase: '^recheck$'
           only-trigger-phrase: false
           status-context: 'JJB Verify'
           permit-all: true
           github-hooks: true
-          github-org: ''
-          github_pr_whitelist:
-            - ''
-          github_pr_admin_list:
-            - ''
+          included-regions: '{obj:github_included_regions}'
 
 ################
 # Packer Merge #