Merge "Convert maven-site publisher to Gerrit Trigger"
[releng/builder.git] / jjb / integration / integration-macros.yaml
index ed0aed82de38014d0d1c827c747411e9f47fc3e2..1952cd3cdcb97217810a3daf9e01596c5f6a8aac 100644 (file)
+- parameter:
+    name: integration-branch
+    parameters:
+        - string:
+            name: BRANCH
+            default: '{branch}'
+            description: 'Distribution GIT branch'
+
 - parameter:
     name: integration-bundleurl
     parameters:
         - string:
             name: BUNDLEURL
-            default: 'http://nexus.opendaylight.org/content/repositories/opendaylight.release/org/opendaylight/integration/distribution-karaf/0.2.0-Helium/distribution-karaf-0.2.0-Helium.zip'
-            description: 'URL to karaf-distribution zip'
+            default: '{bundleurl}'
+            description: 'URL to karaf distribution zip'
+
+- parameter:
+    name: integration-controller-scope
+    parameters:
+        - string:
+            name: CONTROLLERSCOPE
+            default: '{controller-scope}'
+            description: 'Feature Only or Feature All test'
 
 - parameter:
     name: integration-controller-features
     parameters:
         - string:
-            name: CONTROLLER_FEATURES
+            name: CONTROLLERFEATURES
             default: '{controller-features}'
-            description: |
-                Features to install in the controller
+            description: 'Features to install in the controller separated by comma'
+
+- parameter:
+    name: integration-test-plan
+    parameters:
+        - string:
+            name: TESTPLAN
+            default: '{test-plan}'
+            description: 'Test plan we will run'
+
+- parameter:
+    name: integration-test-options
+    parameters:
+        - string:
+            name: TESTOPTIONS
+            default: '{test-options}'
+            description: 'Robot command options'
+
+- parameter:
+    name: integration-distribution-git-url
+    parameters:
+        - string:
+            name: DISTROGITURL
+            default: 'ssh://jenkins-$SILO@git.opendaylight.org:29418/integration/distribution'
+            description: 'Distribution GIT URL (do not modify)'
+
+- parameter:
+    name: integration-patch-refspec
+    parameters:
+        - string:
+            name: PATCHREFSPEC
+            default: '{branch}'
+            description: 'Integration Patch Refspec'
+
+# Macro: integration-gerrit-scm
+# Operation: this macro downloads a project gerrit and using the project name as basedir
+# Used by: integration-patch-test-{stream} job template
+
+- scm:
+    name: integration-gerrit-scm
+    scm:
+        - git:
+            credentials-id: '{credentials-id}'
+            url: '$GIT_BASE'
+            basedir: '$GERRIT_PROJECT'
+            refspec: '$GERRIT_REFSPEC'
+            branches:
+                - 'origin/{branch}'
+            skip-tag: true
+            choosing-strategy: 'gerrit'
+
+# Macro: integration-gerrit-test-scm
+# Operation: this macro downloads an integration/test gerrit using test as basedir
+# Used by: {project}-verify-csit-* job templates
+
+- scm:
+    name: integration-gerrit-test-scm
+    scm:
+        - git:
+            credentials-id: '{credentials-id}'
+            url: '$GIT_BASE'
+            basedir: 'test'
+            refspec: '$GERRIT_REFSPEC'
+            branches:
+                - 'origin/{branch}'
+            skip-tag: true
+            choosing-strategy: 'gerrit'
+
+# Macro: integration-distribution-scm
+# Operation: this macro downloads the integration/distribution repo using distribution as basedir
+# Used by: {project}-csit-* and integration-patch-test-{stream} job templates
+
+- scm:
+    name: integration-distribution-scm
+    scm:
+        - git:
+            credentials-id: '{credentials-id}'
+            basedir: 'distribution'
+            url: '$DISTROGITURL'
+            refspec: ''
+            branches:
+                - 'origin/{branch}'
+            skip-tag: true
+
+# Macro: integration-patch-scm
+# Operation: this macro downloads a test patch that can be used to debug in the sandbox
+# Used by: {project}-csit-* job templates
+
+- scm:
+    name: integration-test-scm
+    scm:
+        - git:
+            credentials-id: '{credentials-id}'
+            basedir: 'test'
+            url: '$GIT_BASE'
+            refspec: '$PATCHREFSPEC'
+            branches:
+                - 'origin/{branch}'
+            skip-tag: true
+            choosing-strategy: 'gerrit'
+
+# Macro: integration-test-gerrit-trigger-patch-submitted
+# Operation: this macro sets a trigger for patch submit on test/csit/suites/{project}/**
+# Used by: {project}-verify-csit-* job templates
+
+- trigger:
+    name: integration-test-gerrit-trigger-patch-submitted
+    triggers:
+        - gerrit:
+            server-name: 'OpenDaylight'
+            trigger-on:
+                - patchset-created-event:
+                    exclude-drafts: 'true'
+                    exclude-trivial-rebase: 'false'
+                    exclude-no-code-change: 'true'
+                - draft-published-event
+                - comment-added-contains-event:
+                    comment-contains-value: 'recheck'
+                - comment-added-contains-event:
+                    comment-contains-value: 'reverify'
+            projects:
+              - project-compare-type: 'ANT'
+                project-pattern: '{name}'
+                branches:
+                  - branch-compare-type: 'ANT'
+                    branch-pattern: '**/{branch}'
+                file-paths:
+                  - compare-type: 'ANT'
+                    pattern: 'csit/suites/{project}/**'
 
-                This is a comma seperated list of karaf features that
-                should be installed. This list will be passed to the
-                "featuresBoot=" parameter in the config file.
+# Macro: integration-csit-gerrit-trigger-patch-submitted
+# Operation: this macro sets a trigger for patch submit on test/csit/**
+# Used by: integration-verify-csit-1node-{stream} job template
+
+- trigger:
+    name: integration-csit-gerrit-trigger-patch-submitted
+    triggers:
+        - gerrit:
+            server-name: 'OpenDaylight'
+            trigger-on:
+                - patchset-created-event:
+                    exclude-drafts: 'true'
+                    exclude-trivial-rebase: 'false'
+                    exclude-no-code-change: 'true'
+                - draft-published-event
+                - comment-added-contains-event:
+                    comment-contains-value: 'recheck'
+                - comment-added-contains-event:
+                    comment-contains-value: 'reverify'
+            projects:
+              - project-compare-type: 'ANT'
+                project-pattern: '{name}'
+                branches:
+                  - branch-compare-type: 'ANT'
+                    branch-pattern: '**/{branch}'
+                file-paths:
+                  - compare-type: 'ANT'
+                    pattern: 'csit/**'
+
+# Macro: integration-csit-gerrit-trigger-patch-merged
+# Operation: this macro sets a trigger for patch merged on test/csit/**
+# Used by: not used yet
+
+- trigger:
+    name: integration-csit-gerrit-trigger-patch-merged
+    triggers:
+        - gerrit:
+            server-name: 'OpenDaylight'
+            trigger-on:
+                - change-merged-event
+                - comment-added-contains-event:
+                    comment-contains-value: 'remerge'
+            projects:
+              - project-compare-type: 'ANT'
+                project-pattern: '{name}'
+                branches:
+                  - branch-compare-type: 'ANT'
+                    branch-pattern: '**/{branch}'
+                file-paths:
+                  - compare-type: 'ANT'
+                    pattern: 'csit/**'
+
+# Macro: integration-jclouds-controller-mininet
+# Operation: this macro will spin the controller and mininet vms
+# Used by: {project}-csit-* job templates
 
 - wrapper:
     name: integration-jclouds-controller-mininet
       - jclouds:
           instances:
             - rk-c-el6-java:
-                cloud-name: 'Rackspace DFW - Integration'
-                count: 1
+                cloud-name: 'Rackspace DFW - Integration Dynamic Lab'
+                count: '{controller-vms}'
                 stop-on-terminate: False
-            - rk-c-el6-mininet:
-                cloud-name: 'Rackspace DFW - Integration'
-                count: 1
+            - '{mininet-image}':
+                cloud-name: 'Rackspace DFW - Integration Dynamic Lab'
+                count: '{mininet-vms}'
                 stop-on-terminate: False
 
 #################
 # Shell Scripts #
 #################
 
+# Macro: integration-get-slave-addresses
+# Operation: this macro gets the IP addresses of the dynamic vms
+# Used by: {project}-csit-* job templates
+
 - builder:
     name: integration-get-slave-addresses
     builders:
         - shell:
             !include-raw include-raw-integration-get-slave-addresses.sh
 
+# Macro: integration-get-bundle-vars
+# Operation: this macro gets all bundle related variables
+# Used by: {project}-csit-3node-* job templates
+
 - builder:
-    name: intergration-deploy-controller-compatible-min
+    name: integration-get-bundle-vars
     builders:
         - shell:
-            !include-raw include-raw-integration-deploy-controller-min.sh
+            !include-raw include-raw-integration-get-bundle-vars.sh
+
+# Macro: integration-deply-controller-run-test
+# Operation: this macro deployes single contoller and runs test
+# Used by: {project}-csit-1node-* job templates
+
+- builder:
+    name: integration-deploy-controller-run-test
+    builders:
+        - shell:
+            !include-raw include-raw-integration-deploy-controller-run-test.sh
+
+# Macro: integration-deploy-controller
+# Operation: this macro prepares 3-node cluster controller
+# Used by: {project}-csit-3node-* job templates
+
+- builder:
+    name: integration-deploy-controller
+    builders:
+        - shell:
+            !include-raw include-raw-integration-deploy-controller.sh
+
+# Macro: integration-configure-clustering
+# Operation: this macro configures the clustering
+# Used by: {project}-csit-3node-* job templates
 
 - builder:
-    name: integration-helium-csit-compatible-min
+    name: integration-configure-clustering
     builders:
         - shell:
-            !include-raw include-raw-integration-helium-csit-compatible-min.sh
+            !include-raw include-raw-integration-configure-clustering.sh
+
+# Macro: integration-start-cluster-run-test
+# Operation: this macro starts the 3-node cluster and runs test
+# Used by: {project}-csit-3node-* job templates
+
+- builder:
+    name: integration-start-cluster-run-test
+    builders:
+        - shell:
+            !include-raw include-raw-integration-start-cluster-run-test.sh
+
+# Macro: integration-deploy-controller-offline
+# Operation: this macro deployes the controller with no external repo configuration
+# Used by: integration-distrbution-offline-{stream} job template
+
+- builder:
+    name: integration-deploy-controller-offline
+    builders:
+        - shell:
+            !include-raw include-raw-integration-deploy-controller-offline.sh
+
+# Macro: integration-get-bundle-url
+# Operation: this macro gets the distribution bundle URL
+# Used by: integration-patch-test-{stream} job template
+
+- builder:
+    name: integration-get-bundle-url
+    builders:
+        - shell:
+            !include-raw include-raw-integration-get-bundle-url.sh
 
 ##############
 # Publishers #
 ##############
 
+# Macro: integration-robot
+# Operation: this macro publishes robot results
+# Used by: {project}-csit-* job templates
+
 - publisher:
     name: integration-robot
     publishers:
         - robot:
             output-path: ''
             other-files: ''
-            unstable-threshold: 97.0
-            pass-threshold: 100.0
+            unstable-threshold: '{unstable-if}'
+            pass-threshold: '{pass-if}'
             only-critical: false