Merge "Make test-integration to rebase before build"
[releng/builder.git] / jjb / integration / integration-macros.yaml
index e66647c383d5e520a9317cf3f934631d41471ff5..8775f275217b71832ef0d13f0a66d39f48b0c6bb 100644 (file)
@@ -4,7 +4,7 @@
         - string:
             name: BRANCH
             default: '{branch}'
-            description: 'GIT branch'
+            description: 'Distribution GIT branch'
 
 - parameter:
     name: integration-bundleurl
             description: 'Robot command options'
 
 - parameter:
-    name: integration-patch-git-url
+    name: integration-distribution-git-url
     parameters:
         - string:
-            name: PATCHGITURL
-            default: 'ssh://jenkins-$SILO@git.opendaylight.org:29418/$GERRIT_PROJECT'
-            description: 'Patch GIT URL (do not modify)'
+            name: DISTROGITURL
+            default: 'ssh://jenkins-$SILO@git.opendaylight.org:29418/integration/distribution'
+            description: 'Distribution GIT URL (do not modify)'
 
 - parameter:
     name: integration-patch-refspec
             default: '{branch}'
             description: 'Integration Patch Refspec'
 
+# Macro: integration-gerrit-scm
+# Operation: this macro downloads a project gerrit
+# Used by: all csit jobs
+
 - scm:
     name: integration-gerrit-scm
     scm:
         - git:
             credentials-id: '{credentials-id}'
-            url: '$PATCHGITURL'
-            basedir: '$GERRIT_PROJECT'
-            refspec: '$GERRIT_REFSPEC'
+            url: '$GIT_BASE'
+            basedir: '{basedir}'
+            refspec: '{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: integration-patch-test-{stream} job template
+
 - scm:
-    name: integration-git-scm
+    name: integration-distribution-scm
     scm:
         - git:
             credentials-id: '{credentials-id}'
-            basedir: 'integration'
-            url: '$GIT_BASE'
+            basedir: 'distribution'
+            url: '$DISTROGITURL'
             refspec: ''
             branches:
                 - 'origin/{branch}'
             skip-tag: true
 
-- scm:
-    name: integration-patch-scm
-    scm:
-        - git:
-            credentials-id: '{credentials-id}'
-            url: '$GIT_BASE'
-            refspec: '$PATCHREFSPEC'
-            branches:
-                - 'origin/{branch}'
-            skip-tag: true
-            choosing-strategy: 'gerrit'
+# Macro: integration-trigger-patch-submitted
+# Operation: this macro sets a trigger for patch submitted on a path pattern
+# Used by: {project}-verify-csit-* job templates
 
 - trigger:
-    name: integration-test-gerrit-trigger-patch-submitted
+    name: integration-trigger-patch-submitted
     triggers:
         - gerrit:
             server-name: 'OpenDaylight'
                     comment-contains-value: 'recheck'
                 - comment-added-contains-event:
                     comment-contains-value: 'reverify'
+            override-votes: true
+            gerrit-build-unstable-verified-value: +1
+            gerrit-build-unstable-codereview-value: 0
             projects:
               - project-compare-type: 'ANT'
                 project-pattern: '{name}'
                     branch-pattern: '**/{branch}'
                 file-paths:
                   - compare-type: 'ANT'
-                    pattern: 'test/csit/suites/{project}/**'
+                    pattern: '{pattern}'
 
-- 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: 'test/csit/**'
+# Macro: integration-trigger-patch-merged
+# Operation: this macro sets a trigger for patch merged on a path pattern
+# Used by: not used yet
 
 - trigger:
-    name: integration-csit-gerrit-trigger-patch-merged
+    name: integration-trigger-patch-merged
     triggers:
         - gerrit:
             server-name: 'OpenDaylight'
                     branch-pattern: '**/{branch}'
                 file-paths:
                   - compare-type: 'ANT'
-                    pattern: 'test/csit/**'
+                    pattern: '{pattern}'
+
+# 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
     wrappers:
       - jclouds:
           instances:
-            - rk-c-el6-java:
+            - rk-c7-java:
                 cloud-name: 'Rackspace DFW - Integration Dynamic Lab'
                 count: '{controller-vms}'
                 stop-on-terminate: False
             - '{mininet-image}':
-                cloud-name: 'Rackspace DFW - Integration Dynamic Lab'
+                cloud-name: '{mininet-cloud-name}'
                 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
+            !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: integration-get-bundle-vars
     builders:
         - shell:
-            !include-raw include-raw-integration-get-bundle-vars.sh
+            !include-raw:
+                - include-raw-integration-get-bundle-vars.sh
+
+# Macro: integration-deploy-controller-verify
+# Operation: this macro deploys the controller with all fetures
+# Used by: integration-distrbution-deploy-{stream} job template
+
+- builder:
+    name: integration-deploy-controller-verify
+    builders:
+        - shell:
+            !include-raw:
+                - include-raw-integration-deploy-controller-verify.sh
+
+# Macro: integration-deploy-controller-offline
+# Operation: this macro deploys 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-deply-controller-run-test
+# Operation: this macro deploys 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
+            !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
+            !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-configure-clustering
     builders:
         - shell:
-            !include-raw include-raw-integration-configure-clustering.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
+            !include-raw:
+                - include-raw-integration-start-cluster-run-test.sh
+
+# Macro: integration-get-bundle-url
+# Operation: this macro gets the job generated distribution URL from distribution pom.xml
+# Used by: integration-patch-test-{stream} job template
 
 - builder:
-    name: integration-deploy-controller-offline
+    name: integration-get-bundle-url
     builders:
         - shell:
-            !include-raw include-raw-integration-deploy-controller-offline.sh
+            !include-raw:
+                - include-raw-integration-get-bundle-url.sh
+
+# Macro: integration-get-bundle-url-root
+# Operation: this macro gets the job generated distribution URL from root pom.xml
+# Used by: integration-distribution-verify-{stream} job template
 
 - builder:
-    name: integration-get-bundle-url
+    name: integration-get-bundle-url-root
+    builders:
+        - shell:
+            !include-raw:
+                - include-raw-integration-get-bundle-url-root.sh
+
+# Macro: integration-install-robotframework
+# Operation: Installs robotframework using pip to a virtualenv
+# Used by: {project}-csit-* job templates
+
+- builder:
+    name: integration-install-robotframework
     builders:
         - shell:
-            !include-raw include-raw-integration-get-bundle-url.sh
+            !include-raw:
+                - include-raw-integration-install-robotframework.sh
+
+# Macro: integration-cleanup-tmp
+# Operation: Cleans up temporary files created by build
+# Used by: {project}-csit-* job templates
+
+- builder:
+    name: integration-cleanup-tmp
+    builders:
+        - shell:
+            !include-raw:
+                - include-raw-integration-cleanup-tmp.sh
+
+# Macro: integration-multipatch-builder
+# Operation: checks out multiple patches and builds custom distribution
+# Used by: integration-multipatch-test-* job templates
+
+- builder:
+    name: integration-multipatch-builder
+    builders:
+        - shell:
+            !include-raw:
+                - include-raw-integration-multipatch-distribution-test.sh
+
+# Macro: integration-cleanup-worspace
+# Operation: Cleans up files possibly left there by the previous build
+# Used by: {project}-csit-* job templates
+
+- builder:
+    name: integration-cleanup-workspace
+    builders:
+        - shell:
+            !include-raw:
+                - include-raw-integration-cleanup-workspace.sh
+
+# Macro: integration-rebase-patch
+# Operation: For cloned project, rebase checked-out Gerrit patch onto $BRANCH.
+# Used by: integration-patch-distribution-* job template
+
+- builder:
+    name: integration-rebase-gerrit-patch
+    builders:
+        - shell:
+            !include-raw include-raw-integration-rebase-gerrit-patch.sh
 
 ##############
 # Publishers #
 ##############
 
+# Macro: integration-robot
+# Operation: this macro publishes robot results
+# Used by: {project}-csit-* job templates
+
 - publisher:
     name: integration-robot
     publishers: