Add Project Option to Throttle Property
[releng.git] / jjb / fastpathmetrics / fastpathmetrics.yml
index 6c7edaa..ad1b601 100644 (file)
@@ -1,94 +1,39 @@
+###################################################
+# All the jobs except verify have been removed!
+# They will only be enabled on request by projects!
+###################################################
 - project:
     name: fastpathmetrics
+
+    project: '{name}'
+
     jobs:
-        - 'fastpathmetrics-test'
+        - 'fastpathmetrics-verify-{stream}'
+        - 'fastpathmetrics-merge-{stream}'
         - 'fastpathmetrics-daily-{stream}'
-        - 'fastpathmetrics-merge'
-        - 'fastpathmetrics-verify'
 
-    # stream:    branch with - in place of / (eg. stable-helium)
-    # branch:    branch (eg. stable/helium)
     stream:
         - master:
-            branch: 'master'
-
-    project: 'fastpathmetrics'
-    somevar: 'foo'
-
-- job-template:
-    name: fastpathmetrics-test
-
-    project-type: freestyle
-
-    logrotate:
-        daysToKeep: 30
-        numToKeep: 10
-        artifactDaysToKeep: -1
-        artifactNumToKeep: -1
-
-    builders:
-        - shell: |
-            echo "Hello world from fastpathmetrics"
+            branch: '{stream}'
+            gs-pathname: ''
+            disabled: false
+        - brahmaputra:
+            branch: '{stream}'
+            gs-pathname: ''
+            disabled: true
 
 - job-template:
-    name: 'fastpathmetrics-daily-{stream}'
+    name: 'fastpathmetrics-verify-{stream}'
 
-    # Job template for daily builders
-    #
-    # Required Variables:
-    #     stream:    branch with - in place of / (eg. stable)
-    #     branch:    branch (eg. stable)
-
-    project-type: freestyle
-    varsetabove: '{somevar}'
-
-    logrotate:
-        daysToKeep: '{build-days-to-keep}'
-        numToKeep: '{build-num-to-keep}'
-        artifactDaysToKeep: '{build-artifact-days-to-keep}'
-        artifactNumToKeep: '{build-artifact-num-to-keep}'
+    disabled: '{obj:disabled}'
 
     parameters:
         - project-parameter:
             project: '{project}'
-
-    scm:
-        - git-scm:
-            credentials-id: '{ssh-credentials}'
-            refspec: ''
+        - gerrit-parameter:
             branch: '{branch}'
+        - 'opnfv-build-ubuntu-defaults'
 
-    triggers:
-        - timed: 'H H * * *'
-
-    prebuilders:
-        - test-macro
-
-    builders:
-        - shell: |
-            pwd
-            find .
-            echo "Hello world from fastpathmetrics {somevar} daily"
-
-    postbuilders:
-        - test-macro
-
-- job-template:
-    name: 'fastpathmetrics-verify'
-
-    project-type: freestyle
-
-    logrotate:
-        daysToKeep: 30
-        numToKeep: 10
-        artifactDaysToKeep: -1
-        artifactNumToKeep: -1
-
-    parameters:
-        - project-parameter:
-            project: '{project}'
-        - gerrit-parameter:
-            branch: 'master'
     scm:
         - gerrit-trigger-scm:
             credentials-id: '{ssh-credentials}'
                     comment-contains-value: 'reverify'
             projects:
               - project-compare-type: 'ANT'
-                project-pattern: 'fastpathmetrics'
+                project-pattern: '{project}'
                 branches:
                   - branch-compare-type: 'ANT'
-                    branch-pattern: '**/master'
+                    branch-pattern: '**/{branch}'
+                forbidden-file-paths:
+                  - compare-type: ANT
+                    pattern: 'docs/**|.gitignore'
 
     builders:
         - shell: |
             pwd
-            find .
-            echo "verify logic goes here"
+            cd src
+            make clobber
+            make
 
 - job-template:
-    name: 'fastpathmetrics-merge'
-
-    # builder-merge job to run JJB update
-    #
-    # This job's purpose is to update all the JJB
+    name: 'fastpathmetrics-merge-{stream}'
 
     project-type: freestyle
 
-    logrotate:
-        daysToKeep: 30
-        numToKeep: 40
-        artifactDaysToKeep: -1
-        artifactNumToKeep: 5
+    disabled: '{obj:disabled}'
+
+    concurrent: true
+
+    properties:
+        - throttle:
+            enabled: true
+            max-total: 3
+            max-per-node: 2
+            option: 'project'
 
     parameters:
         - project-parameter:
             project: '{project}'
         - gerrit-parameter:
-            branch: 'master'
+            branch: '{branch}'
+        - 'opnfv-build-ubuntu-defaults'
 
     scm:
         - gerrit-trigger-scm:
                     comment-contains-value: 'remerge'
             projects:
               - project-compare-type: 'ANT'
-                project-pattern: 'fastpathmetrics'
+                project-pattern: '{project}'
                 branches:
                     - branch-compare-type: 'ANT'
-                      branch-pattern: '**/master'
+                      branch-pattern: '**/{branch}'
+                forbidden-file-paths:
+                  - compare-type: ANT
+                    pattern: 'docs/**'
 
     builders:
         - shell: |
             pwd
-            find .
-            echo "merge logic goes here"
+            cd src
+            make clobber
+            make
+
+- job-template:
+    name: 'fastpathmetrics-daily-{stream}'
+
+    project-type: freestyle
 
+    disabled: '{obj:disabled}'
 
+    concurrent: true
 
+    properties:
+        - throttle:
+            enabled: true
+            max-total: 3
+            max-per-node: 2
+            option: 'project'
 
+    parameters:
+        - project-parameter:
+            project: '{project}'
+        - gerrit-parameter:
+            branch: '{branch}'
+        - 'opnfv-build-ubuntu-defaults'
 
+    scm:
+        - gerrit-trigger-scm:
+            credentials-id: '{ssh-credentials}'
+            refspec: ''
+            choosing-strategy: 'default'
+
+    triggers:
+         - pollscm:
+             cron: '@midnight'
 
+    builders:
+        - shell: |
+            pwd
+            cd src
+            make clobber
+            make