Merge "Make test-integration to rebase before build"
[releng/builder.git] / jjb / integration / integration-test-jobs.yaml
index 2622a274d79f6d0514d0b6ce23493d868ef0e0c9..4ca9326efc1db5290fce22a5ed4351020f460a06 100644 (file)
@@ -4,9 +4,9 @@
     jobs:
         - 'integration-verify-python'
         - 'integration-csit-verify-1node-library'
-        - 'integration-distribution-offline-{stream}'
         - 'integration-distribution-test-{stream}'
         - 'integration-patch-test-{stream}'
+        - 'integration-multipatch-test-{stream}'
 
     stream:
         - beryllium:
@@ -56,9 +56,7 @@
                 usc-csit-1node-channel-only-{stream},
                 usc-csit-1node-channel-all-{stream},
                 vpnservice-csit-1node-vpnservice-only-{stream},
-                vpnservice-csit-1node-vpnservice-all-{stream},
-                vtn-csit-1node-manager-only-{stream},
-                vtn-csit-1node-manager-all-{stream}
+                vpnservice-csit-1node-vpnservice-all-{stream}
 
         - stable-lithium:
             branch: 'stable/lithium'
 
     jdk: 'openjdk7'
 
-    # Trigger jobs (upstream dependencies)
-    trigger-jobs: >
-        odlparent-distribution-{stream},
-        yangtools-distribution-{stream},
-        controller-distribution-{stream},
-        aaa-distribution-{stream},
-        integration-distribution-merge-{stream}
-
 # Template: integration-verify-python
 # Goal: Verify python scripts correct syntax
 # Operation: This job template performs a python tox check on any integration/test patch
         - integration-controller-scope:
             controller-scope: 'only'
         - integration-controller-features:
-            controller-features: 'odl-openflowplugin-flow-services-ui,odl-bgpcep-pcep-all,odl-bgpcep-pcep,odl-netconf-connector-all'
+            controller-features: >
+                odl-openflowplugin-flow-services-ui,
+                odl-bgpcep-pcep,
+                odl-bgpcep-bgp,
+                odl-netconf-connector-all
         - integration-test-options:
             test-options: '-e adsal'
         - integration-test-plan:
             pattern: 'csit/libraries/*'
 
     builders:
+        - integration-cleanup-workspace
         - integration-install-robotframework
         - inject:
             properties-file: 'env.properties'
     publishers:
         - integration-robot:
             unstable-if: 0.0
-            pass-if: 0.0
-        - archive:
-            artifacts: 'karaf.log'
-        - email-notification:
-            email-prefix: '[integration]'
-
-# Template: integration-distribution-offline-{stream}
-# Goal: Verify distribution can start with no internet connection
-# Operation: This job deployes the controller removing any external repository definition
-# whenever there is a change in a kernel project (odlparent, controller, yangtools, etc...)
-
-- job-template:
-    name: 'integration-distribution-offline-{stream}'
-
-    project-type: freestyle
-    node: dynamic_controller
-
-    logrotate:
-        daysToKeep: '{build-days-to-keep}'
-        numToKeep: '{build-num-to-keep}'
-        artifactDaysToKeep: '{build-artifact-days-to-keep}'
-        artifactNumToKeep: '{build-artifact-num-to-keep}'
-
-    parameters:
-        - project-parameter:
-            project: 'integration/distribution'
-        - integration-branch:
-            branch: '{branch}'
-        - integration-bundleurl:
-            bundleurl: 'last'
-
-    wrappers:
-        - build-timeout
-        - ssh-agent-credentials:
-            users:
-                - '{ssh-credentials}'
-
-    triggers:
-        - reverse:
-            jobs: '{trigger-jobs}'
-            result: 'success'
-
-    builders:
-        - integration-get-bundle-vars
-        - inject:
-            properties-file: 'bundle_vars.txt'
-        - integration-deploy-controller-offline
-
-    publishers:
+            pass-if: 100.0
         - archive:
-            artifacts: 'karaf.log'
+            artifacts: 'karaf.log*'
         - email-notification:
             email-prefix: '[integration]'
 
             bundleurl: 'last'
 
     triggers:
-        - timed: 'H H * * *'
+        - timed: 'H H * * 6'
 
     builders:
         - trigger-builds:
 
 # Template: integration-patch-test-{stream}
 # Goal: Build a patch and run all available system test on a distribution containing the change
-# Operation: This job teamplate builds a patch, creates a distribution containing the patch, and
+# Operation: This job template builds a patch, creates a distribution containing the patch, and
 # triggers the distribution test when test-integration is used in gerrit comments
 
 - job-template:
             refspec: '$GERRIT_REFSPEC'
         - project-parameter:
             project: '$GERRIT_PROJECT'
+        - integration-branch:
+            branch: '{branch}'
         - integration-distribution-git-url
 
     scm:
                 notbuilt: true
 
     prebuilders:
+        - integration-rebase-gerrit-patch
         - integration-get-bundle-url
         - inject:
             properties-file: 'bundle.txt'
         - wipe-org-opendaylight-repo
-        - provide-maven-settings:
-            global-settings-file: '{odl-global-settings}'
-            settings-file: '{yangtools-settings}'
         - maven-target:
             maven-version: '{mvn33}'
             pom: '$GERRIT_PROJECT/pom.xml'
-            goals: 'clean install -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r source:jar javadoc:jar'
+            goals: 'clean install -DskipTests -Dcheckstyle.skip=true -Dmaven.javadoc.skip=true -Dmaven.site.skip=true -DgenerateReports=false -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r -Dstream={stream}'
             java-opts:
                 - '-Xmx4096m -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
             settings: '{integration-settings}'
     maven:
         maven-name: '{mvn33}'
         root-pom: 'distribution/pom.xml'
-        goals: 'clean install -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r source:jar javadoc:jar'
+        goals: 'clean install -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
         maven-opts: '-Xmx1024m -XX:MaxPermSize=256m -Dmaven.compile.fork=true'
         settings: '{integration-settings}'
         global-settings: '{odl-global-settings}'
               predefined-parameters:
                   BUNDLEURL=$BUNDLEURL
 
+    publishers:
+        - email-notification:
+            email-prefix: '[$GERRIT_PROJECT]'
+
+# Template: integration-multipatch-test-{stream}
+# Goal: Build one or more patches and run all available system test on a distribution containing the change
+# Operation: This job template checks out and builds each patch provided in job parameters, creates a distribution
+# containing these patches, and triggers the distribution test job which includes most (if not all) available
+# CSIT jobs
+
+- job-template:
+    name: 'integration-multipatch-test-{stream}'
+
+    project-type: maven
+    node: dynamic_verify
+    jdk: '{jdk}'
+
+    logrotate:
+        daysToKeep: '{build-days-to-keep}'
+        numToKeep: '{build-num-to-keep}'
+        artifactDaysToKeep: '{build-artifact-days-to-keep}'
+        artifactNumToKeep: '{build-artifact-num-to-keep}'
+
+    parameters:
+        - patches-to-build-parameter:
+            patches_to_build: '$PATCHES_TO_BUILD'
+        - integration-branch:
+            branch: '{branch}'
+
+    wrappers:
+        - build-timeout
+        - ssh-agent-credentials:
+            users:
+                - '{ssh-credentials}'
+
+    prebuilders:
+        - wipe-org-opendaylight-repo
+        - integration-multipatch-builder
+        - inject:
+            properties-file: 'bundle.txt'
+        - provide-maven-settings:
+            global-settings-file: '{odl-global-settings}'
+            settings-file: '{yangtools-settings}'
+
+
+    maven:
+        maven-name: '{mvn33}'
+        root-pom: 'patch_tester/pom.xml'
+        # TODO: Make Maven option configurable. Currently tests are not skipped, everything elase is.
+        goals: 'clean install -f patch_tester/pom.xml -Dcheckstyle.skip=true -Dmaven.javadoc.skip=true -Dmaven.site.skip=true -DgenerateReports=false -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r -Dstream={stream}'
+        maven-opts: '-Xmx4096m -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
+        settings: '{yangtools-settings}'
+        global-settings: '{odl-global-settings}'
+        post-step-run-condition: 'SUCCESS'
+
+    postbuilders:
+        - trigger-builds:
+            - project: 'integration-distribution-test-{stream}'
+              block: true
+              predefined-parameters:
+                  BUNDLEURL=$BUNDLEURL
+
     publishers:
         - email-notification:
             email-prefix: '[integration]'