Step 2: Change csit job templates to download 2 repositories 71/26271/2
authorLuis Gomez <ecelgp@gmail.com>
Tue, 1 Sep 2015 08:07:57 +0000 (01:07 -0700)
committerLuis Gomez <ecelgp@gmail.com>
Tue, 1 Sep 2015 08:58:29 +0000 (01:58 -0700)
csit jobs will download 2 git repos: integration/test in test folder
and integration/distribution in distribution folder.

This patch adds the required basedir parameter to git macros, modifies
csit job templates to download 2 git repos and updates few shell scripts
to use distribution pom.xml under distribution folder.

Change-Id: I4163faa1af8981cf4aaf161e865540c3c6c00966
Signed-off-by: Luis Gomez <ecelgp@gmail.com>
jjb/integration/include-raw-integration-deploy-controller-run-test.sh
jjb/integration/include-raw-integration-get-bundle-url.sh
jjb/integration/include-raw-integration-get-bundle-vars.sh
jjb/integration/integration-csit-basic.yaml
jjb/integration/integration-macros.yaml
jjb/integration/integration-templates.yaml

index ed62b457fa48acc44e877e5b49152ad2d911dc1d..6eee1c6396bc8e26c464c58007500a2655eea644 100644 (file)
@@ -11,7 +11,7 @@ fi
 if [ ${BUNDLEURL} == 'last' ]; then
     NEXUSPATH="${NEXUSURL_PREFIX}/content/repositories/opendaylight.snapshot/org/opendaylight/integration/distribution-karaf"
     # Extract the BUNDLEVERSION from the pom.xml
-    export BUNDLEVERSION=`xpath pom.xml '/project/version/text()' 2> /dev/null`
+    export BUNDLEVERSION=`xpath distribution/pom.xml '/project/version/text()' 2> /dev/null`
     echo "Bundle version is ${BUNDLEVERSION}"
     # Acquire the timestamp information from maven-metadata.xml
     wget ${NEXUSPATH}/${BUNDLEVERSION}/maven-metadata.xml
index 7d8412ecf0f1b2804f8815a49cb390b92aca8342..521fcb6e6c4227766f47a5c872e78571a49fffb6 100644 (file)
@@ -1,5 +1,5 @@
 # Extract the BUNDLEVERSION from the pom.xml
-BUNDLEVERSION=`xpath integration/pom.xml '/project/version/text()' 2> /dev/null`
+BUNDLEVERSION=`xpath distribution/pom.xml '/project/version/text()' 2> /dev/null`
 echo "Bundle version is ${BUNDLEVERSION}"
 
 BUNDLEURL=${BUILD_URL}org.opendaylight.integration\$distribution-karaf/artifact/org.opendaylight.integration/distribution-karaf/${BUNDLEVERSION}/distribution-karaf-${BUNDLEVERSION}.zip
index fb07c17d8443577694d81906d704518824fbaa5d..5da4603b02bae34f0fa7190fe22311a257a01f50 100644 (file)
@@ -7,7 +7,7 @@ NEXUSURL_PREFIX=${ODLNEXUSPROXY:-https://nexus.opendaylight.org}
 if [ ${BUNDLEURL} == 'last' ]; then
     NEXUSPATH="${NEXUSURL_PREFIX}/content/repositories/opendaylight.snapshot/org/opendaylight/integration/distribution-karaf"
     # Extract the BUNDLEVERSION from the pom.xml
-    BUNDLEVERSION=`xpath pom.xml '/project/version/text()' 2> /dev/null`
+    BUNDLEVERSION=`xpath distribution/pom.xml '/project/version/text()' 2> /dev/null`
     echo "Bundle version is ${BUNDLEVERSION}"
     # Acquire the timestamp information from maven-metadata.xml
     wget ${NEXUSPATH}/${BUNDLEVERSION}/maven-metadata.xml
index b90a4c04660ec7fe02826b4b81d911bdc3df6955..dc8fdf4862b956a0490381814103f3fa3816e213 100644 (file)
@@ -3,7 +3,7 @@
     jobs:
         - '{project}-csit-1node-{functionality}-{install}-{stream}'
         - '{project}-csit-3node-{functionality}-{install}-{stream}'
-        - '{project}-csit-verify-1node-{functionality}-{stream}'
+        - '{project}-csit-verify-1node-{functionality}'
 
     # The project name
     project: 'integration'
index 960d3f057af16d8e474c69f4c03d4bdf4e0b489e..1952cd3cdcb97217810a3daf9e01596c5f6a8aac 100644 (file)
@@ -4,7 +4,7 @@
         - string:
             name: BRANCH
             default: '{branch}'
-            description: 'GIT branch'
+            description: 'Distribution GIT branch'
 
 - parameter:
     name: integration-bundleurl
@@ -63,7 +63,7 @@
             description: 'Integration Patch Refspec'
 
 # Macro: integration-gerrit-scm
-# Operation: this macro downloads a gerrit from any project and uses the project as basedir
+# Operation: this macro downloads a project gerrit and using the project name as basedir
 # Used by: integration-patch-test-{stream} job template
 
 - scm:
             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 and uses distribution as basedir
+# Operation: this macro downloads the integration/distribution repo using distribution as basedir
 # Used by: {project}-csit-* and integration-patch-test-{stream} job templates
 
 - scm:
 # Used by: {project}-csit-* job templates
 
 - scm:
-    name: integration-patch-scm
+    name: integration-test-scm
     scm:
         - git:
             credentials-id: '{credentials-id}'
+            basedir: 'test'
             url: '$GIT_BASE'
             refspec: '$PATCHREFSPEC'
             branches:
                     branch-pattern: '**/{branch}'
                 file-paths:
                   - compare-type: 'ANT'
-                    pattern: 'test/csit/suites/{project}/**'
+                    pattern: 'csit/suites/{project}/**'
 
 # Macro: integration-csit-gerrit-trigger-patch-submitted
 # Operation: this macro sets a trigger for patch submit on test/csit/**
                     branch-pattern: '**/{branch}'
                 file-paths:
                   - compare-type: 'ANT'
-                    pattern: 'test/csit/**'
+                    pattern: 'csit/**'
 
 # Macro: integration-csit-gerrit-trigger-patch-merged
 # Operation: this macro sets a trigger for patch merged on test/csit/**
                     branch-pattern: '**/{branch}'
                 file-paths:
                   - compare-type: 'ANT'
-                    pattern: 'test/csit/**'
+                    pattern: 'csit/**'
 
 # Macro: integration-jclouds-controller-mininet
 # Operation: this macro will spin the controller and mininet vms
index b176334ea61d85068a59f89aa43aaca14df53a52..be3df57dc2593f6e6f8e25a23d4dd2b1788f79c4 100644 (file)
@@ -1,24 +1,35 @@
 # Job templates in this file (please update with every new template):
-#
-# {project}-csit-verify-{functionality}-{stream}
+# 
+# Old templates:
+# {project}-csit-verify-1node-{functionality}-{stream}
 # {project}-csit-1node-imds-{functionality}-{install}-{stream}
-# {project}-csit-1node-cds-{functionality}-{install}-{stream}
-# {project}-csit-periodic-1node-cds-{functionality}-{install}-{stream}
-# {project}-csit-3node-cds-{functionality}-{install}-{stream}
 #
 # New (for Be release):
-# {project}-csit-verify-1node-{functionality}-{stream}
+# {project}-csit-verify-1node-{functionality}
 # {project}-csit-1node-{functionality}-{install}-{stream}
 # {project}-csit-1node-periodic-{functionality}-{install}-{stream}
-# {project}-csit-verify-3node-{functionality}-{stream}
+# {project}-csit-verify-3node-{functionality}
 # {project}-csit-3node-{functionality}-{install}-{stream}
 # {project}-csit-3node-periodic-{functionality}-{install}-{stream}
 #
+# Parameters:
+#
+# project-parameter: main project integration/test ($PROJECT)
+# integration-distribution-git-url: distribution GIT ($DISTROGITURL)
+# integration-branch: distribution branch ($BRANCH)
+# integration-controller-bundleurl: distribution URL ($BUNDLEURL)
+# integration-controller-scope: only or all features ($CONTROLLERSCOPE)
+# integration-controller-features: features under test ($CONTROLLER FEATURES)
+# integration-test-options: robot options ($TESTOPTIONS)
+# integration-test-plan: robot test plan ($TESTPLAN)
+# integration-patch-refspec: test branch ($PATCHREFSPEC)
+
+
 
 # Old templates
 
 - job-template:
-    name: '{project}-csit-verify-{functionality}-{stream}'
+    name: '{project}-csit-verify-1node-{functionality}-{stream}'
 
     project-type: freestyle
     node: dynamic_robot
 
     parameters:
         - project-parameter:
-            project: 'integration'
+            project: 'integration/test'
+        - integration-distribution-git-url
         - integration-branch:
-            branch: '{branch}'
+            branch: 'master'
         - integration-bundleurl:
             bundleurl: 'last'
         - integration-controller-scope:
             test-plan: '{project}-{functionality}.txt'
 
     scm:
-        - gerrit-trigger-scm:
+        - integration-distribution-scm:
             credentials-id: '{ssh-credentials}'
-            refspec: '$GERRIT_REFSPEC'
-            choosing-strategy: 'gerrit'
+            branch: 'master'
+        - integration-gerrit-test-scm:
+            credentials-id: '{ssh-credentials}'
+            branch: 'master'
 
     wrappers:
         - build-timeout
@@ -63,8 +77,8 @@
 
     triggers:
         - integration-test-gerrit-trigger-patch-submitted:
-            name: 'integration'
-            branch: '{branch}'
+            name: 'integration/test'
+            branch: 'master'
             project: '{project}'
 
     builders:
 
     parameters:
         - project-parameter:
-            project: 'integration'
+            project: 'integration/test'
+        - integration-distribution-git-url
         - integration-branch:
             branch: '{branch}'
         - integration-bundleurl:
         - integration-test-plan:
             test-plan: '{project}-{functionality}.txt'
         - integration-patch-refspec:
-            branch: '{branch}'
+            branch: 'stable/helium'
 
     scm:
-        - integration-patch-scm:
+        - integration-distribution-scm:
             credentials-id: '{ssh-credentials}'
             branch: '{branch}'
+        - integration-test-scm:
+            credentials-id: '{ssh-credentials}'
+            branch: 'stable/helium'
 
     wrappers:
         - build-timeout
                 display-table: true
                 format: csv
 
-- job-template:
-    name: '{project}-csit-1node-cds-{functionality}-{install}-{stream}'
-
-    project-type: freestyle
-    node: dynamic_robot
-
-    logrotate:
-        daysToKeep: '{build-days-to-keep}'
-        numToKeep: '{build-num-to-keep}'
-        artifactDaysToKeep: '{build-artifact-days-to-keep}'
-        artifactNumToKeep: '{build-num-to-keep}'
-
-    parameters:
-        - project-parameter:
-            project: 'integration'
-        - integration-branch:
-            branch: '{branch}'
-        - integration-bundleurl:
-            bundleurl: 'last'
-        - integration-controller-scope:
-            controller-scope: '{scope}'
-        - integration-controller-features:
-            controller-features: '{install-features}'
-        - integration-test-options:
-            test-options: '{robot-options}'
-        - integration-test-plan:
-            test-plan: '{project}-{functionality}.txt'
-        - integration-patch-refspec:
-            branch: '{branch}'
-
-    scm:
-        - integration-patch-scm:
-            credentials-id: '{ssh-credentials}'
-            branch: '{branch}'
-
-    wrappers:
-        - build-timeout
-        - integration-jclouds-controller-mininet:
-            controller-vms: 1
-            mininet-image: '{mininet-image}'
-            mininet-vms: '{mininet-vms}'
-        - ssh-agent-credentials:
-            users:
-                - '{ssh-credentials}'
-
-    triggers:
-        - reverse:
-            jobs: '{trigger-jobs}'
-            result: 'success'
-
-    builders:
-        - integration-get-slave-addresses
-        - inject:
-            properties-file: 'slave_addresses.txt'
-        - integration-deploy-controller-run-test
-
-    publishers:
-        - integration-robot:
-            unstable-if: 0.0
-            pass-if: 100.0
-        - archive:
-            artifacts: 'karaf.log'
-        - email-notification:
-            email-prefix: '[{project}]'
-        - plot:
-          - title: '{01-plot-title}'
-            yaxis: '{01-plot-yaxis}'
-            group: '{01-plot-group}'
-            num-builds: '5400'
-            style: line
-            use-description: false
-            csv-file-name: '{project}-csit-1node-cds-{functionality}-{install}-{stream}-{01-plot-data-file}-history.csv'
-            keep-records: true
-            series:
-              - file: '{01-plot-data-file}'
-                inclusion-flag: 'off'
-                display-table: true
-                format: csv
-          - title: '{02-plot-title}'
-            yaxis: '{02-plot-yaxis}'
-            group: '{02-plot-group}'
-            num-builds: '5400'
-            style: line
-            use-description: false
-            csv-file-name: '{project}-csit-1node-cds-{functionality}-{install}-{stream}-{02-plot-data-file}-history.csv'
-            keep-records: true
-            series:
-              - file: '{02-plot-data-file}'
-                inclusion-flag: 'off'
-                display-table: true
-                format: csv
-
-
-- job-template:
-    name: '{project}-csit-periodic-1node-cds-{functionality}-{install}-{stream}'
-
-    project-type: freestyle
-    node: dynamic_robot
-
-    logrotate:
-        daysToKeep: '{build-days-to-keep}'
-        numToKeep: '{build-num-to-keep}'
-        artifactDaysToKeep: '{build-artifact-days-to-keep}'
-        artifactNumToKeep: '{build-num-to-keep}'
-
-    parameters:
-        - project-parameter:
-            project: 'integration'
-        - integration-branch:
-            branch: '{branch}'
-        - integration-bundleurl:
-            bundleurl: 'last'
-        - integration-controller-scope:
-            controller-scope: '{scope}'
-        - integration-controller-features:
-            controller-features: '{install-features}'
-        - integration-test-options:
-            test-options: '{robot-options}'
-        - integration-test-plan:
-            test-plan: '{project}-{functionality}.txt'
-        - integration-patch-refspec:
-            branch: '{branch}'
-
-    scm:
-        - integration-patch-scm:
-            credentials-id: '{ssh-credentials}'
-            branch: '{branch}'
-
-    wrappers:
-        - integration-jclouds-controller-mininet:
-            controller-vms: 1
-            mininet-image: '{mininet-image}'
-            mininet-vms: '{mininet-vms}'
-        - ssh-agent-credentials:
-            users:
-                - '{ssh-credentials}'
-
-    triggers:
-        - timed: '{schedule}'
-
-    builders:
-        - integration-get-slave-addresses
-        - inject:
-            properties-file: 'slave_addresses.txt'
-        - integration-deploy-controller-run-test
-
-    publishers:
-        - integration-robot:
-            unstable-if: 0.0
-            pass-if: 100.0
-        - archive:
-            artifacts: 'karaf.log'
-        - email-notification:
-            email-prefix: '[{project}]'
-        - plot:
-          - title: '{01-plot-title}'
-            yaxis: '{01-plot-yaxis}'
-            group: '{01-plot-group}'
-            num-builds: '180'
-            style: line
-            use-description: false
-            csv-file-name: '{project}-csit-periodic-1node-cds-{functionality}-{install}-{stream}-{01-plot-data-file}-history.csv'
-            keep-records: true
-            series:
-              - file: '{01-plot-data-file}'
-                inclusion-flag: 'off'
-                display-table: true
-                format: csv
-          - title: '{02-plot-title}'
-            yaxis: '{02-plot-yaxis}'
-            group: '{02-plot-group}'
-            num-builds: '180'
-            style: line
-            use-description: false
-            csv-file-name: '{project}-csit-periodic-1node-cds-{functionality}-{install}-{stream}-{02-plot-data-file}-history.csv'
-            keep-records: true
-            series:
-              - file: '{02-plot-data-file}'
-                inclusion-flag: 'off'
-                display-table: true
-                format: csv
-
-
-- job-template:
-    name: '{project}-csit-3node-cds-{functionality}-{install}-{stream}'
-
-    project-type: freestyle
-    node: dynamic_robot
-
-    logrotate:
-        daysToKeep: '{build-days-to-keep}'
-        numToKeep: '{build-num-to-keep}'
-        artifactDaysToKeep: '{build-artifact-days-to-keep}'
-        artifactNumToKeep: '{build-num-to-keep}'
-
-    parameters:
-        - project-parameter:
-            project: 'integration'
-        - integration-branch:
-            branch: '{branch}'
-        - integration-bundleurl:
-            bundleurl: 'last'
-        - integration-controller-scope:
-            controller-scope: '{scope}'
-        - integration-controller-features:
-            controller-features: 'odl-mdsal-clustering,{install-features}'
-        - integration-test-options:
-            test-options: '{robot-options}'
-        - integration-test-plan:
-            test-plan: '{project}-{functionality}.txt'
-        - integration-patch-refspec:
-            branch: '{branch}'
-
-    scm:
-        - integration-patch-scm:
-            credentials-id: '{ssh-credentials}'
-            branch: '{branch}'
-
-    wrappers:
-        - build-timeout
-        - integration-jclouds-controller-mininet:
-            controller-vms: 3
-            mininet-image: '{mininet-image}'
-            mininet-vms: '{mininet-vms}'
-        - ssh-agent-credentials:
-            users:
-                - '{ssh-credentials}'
-
-    triggers:
-        - reverse:
-            jobs: '{trigger-jobs}'
-            result: 'success'
-
-    builders:
-        - integration-get-slave-addresses
-        - inject:
-            properties-file: 'slave_addresses.txt'
-        - integration-get-bundle-vars
-        - inject:
-            properties-file: 'bundle_vars.txt'
-        - integration-deploy-controller
-        - integration-configure-clustering
-        - integration-start-cluster-run-test
-    publishers:
-        - integration-robot:
-            unstable-if: 0.0
-            pass-if: 100.0
-        - archive:
-            artifacts: '*karaf.log'
-        - email-notification:
-            email-prefix: '[{project}]'
-        - plot:
-          - title: '{01-plot-title}'
-            yaxis: '{01-plot-yaxis}'
-            group: '{01-plot-group}'
-            num-builds: '5400'
-            style: line
-            use-description: false
-            csv-file-name: '{project}-csit-3node-cds-{functionality}-{install}-{stream}-{01-plot-data-file}-history.csv'
-            keep-records: true
-            series:
-              - file: '{01-plot-data-file}'
-                inclusion-flag: 'off'
-                display-table: true
-                format: csv
-          - title: '{02-plot-title}'
-            yaxis: '{02-plot-yaxis}'
-            group: '{02-plot-group}'
-            num-builds: '5400'
-            style: line
-            use-description: false
-            csv-file-name: '{project}-csit-3node-cds-{functionality}-{install}-{stream}-{02-plot-data-file}-history.csv'
-            keep-records: true
-            series:
-              - file: '{02-plot-data-file}'
-                inclusion-flag: 'off'
-                display-table: true
-                format: csv
-
 # New templates
 
 - job-template:
-    name: '{project}-csit-verify-1node-{functionality}-{stream}'
+    name: '{project}-csit-verify-1node-{functionality}'
 
     project-type: freestyle
     node: dynamic_robot
 
     parameters:
         - project-parameter:
-            project: 'integration'
+            project: 'integration/test'
+        - integration-distribution-git-url
         - integration-branch:
-            branch: '{branch}'
+            branch: 'master'
         - integration-bundleurl:
             bundleurl: 'last'
         - integration-controller-scope:
             test-plan: '{project}-{functionality}.txt'
 
     scm:
-        - gerrit-trigger-scm:
+        - integration-distribution-scm:
             credentials-id: '{ssh-credentials}'
-            refspec: '$GERRIT_REFSPEC'
-            choosing-strategy: 'gerrit'
+            branch: 'master'
+        - integration-gerrit-test-scm:
+            credentials-id: '{ssh-credentials}'
+            branch: 'master'
 
     wrappers:
         - build-timeout
 
     triggers:
         - integration-test-gerrit-trigger-patch-submitted:
-            name: 'integration'
-            branch: '{branch}'
+            name: 'integration/test'
+            branch: 'master'
             project: '{project}'
 
     builders:
 
     parameters:
         - project-parameter:
-            project: 'integration'
+            project: 'integration/test'
+        - integration-distribution-git-url
         - integration-branch:
             branch: '{branch}'
         - integration-bundleurl:
         - integration-test-plan:
             test-plan: '{project}-{functionality}.txt'
         - integration-patch-refspec:
-            branch: '{branch}'
+            branch: 'master'
 
     scm:
-        - integration-patch-scm:
+        - integration-distribution-scm:
             credentials-id: '{ssh-credentials}'
             branch: '{branch}'
+        - integration-test-scm:
+            credentials-id: '{ssh-credentials}'
+            branch: 'master'
 
     wrappers:
         - build-timeout
 
     parameters:
         - project-parameter:
-            project: 'integration'
+            project: 'integration/test'
+        - integration-distribution-git-url
         - integration-branch:
             branch: '{branch}'
         - integration-bundleurl:
         - integration-test-plan:
             test-plan: '{project}-{functionality}.txt'
         - integration-patch-refspec:
-            branch: '{branch}'
+            branch: 'master'
 
     scm:
-        - integration-patch-scm:
+        - integration-distribution-scm:
             credentials-id: '{ssh-credentials}'
             branch: '{branch}'
+        - integration-test-scm:
+            credentials-id: '{ssh-credentials}'
+            branch: 'master'
 
     wrappers:
         - integration-jclouds-controller-mininet:
                 format: csv
 
 - job-template:
-    name: '{project}-csit-verify-3node-{functionality}-{stream}'
+    name: '{project}-csit-verify-3node-{functionality}'
 
     project-type: freestyle
     node: dynamic_robot
 
     parameters:
         - project-parameter:
-            project: 'integration'
+            project: 'integration/test'
+        - integration-distribution-git-url
         - integration-branch:
-            branch: '{branch}'
+            branch: 'master'
         - integration-bundleurl:
             bundleurl: 'last'
         - integration-controller-scope:
             test-plan: '{project}-{functionality}.txt'
 
     scm:
-        - gerrit-trigger-scm:
+        - integration-distribution-scm:
             credentials-id: '{ssh-credentials}'
-            refspec: '$GERRIT_REFSPEC'
-            choosing-strategy: 'gerrit'
+            branch: 'master'
+        - integration-gerrit-test-scm:
+            credentials-id: '{ssh-credentials}'
+            branch: 'master'
 
     wrappers:
         - build-timeout
 
     triggers:
         - integration-test-gerrit-trigger-patch-submitted:
-            name: 'integration'
-            branch: '{branch}'
+            name: 'integration/test'
+            branch: 'master'
             project: '{project}'
 
     builders:
 
     parameters:
         - project-parameter:
-            project: 'integration'
+            project: 'integration/test'
+        - integration-distribution-git-url
         - integration-branch:
             branch: '{branch}'
         - integration-bundleurl:
         - integration-test-plan:
             test-plan: '{project}-{functionality}.txt'
         - integration-patch-refspec:
-            branch: '{branch}'
+            branch: 'master'
 
     scm:
-        - integration-patch-scm:
+        - integration-distribution-scm:
             credentials-id: '{ssh-credentials}'
             branch: '{branch}'
+        - integration-test-scm:
+            credentials-id: '{ssh-credentials}'
+            branch: 'master'
 
     wrappers:
         - build-timeout
 
     parameters:
         - project-parameter:
-            project: 'integration'
+            project: 'integration/test'
+        - integration-distribution-git-url
         - integration-branch:
             branch: '{branch}'
         - integration-bundleurl:
         - integration-test-plan:
             test-plan: '{project}-{functionality}.txt'
         - integration-patch-refspec:
-            branch: '{branch}'
+            branch: 'master'
 
     scm:
-        - integration-patch-scm:
+        - integration-distribution-scm:
             credentials-id: '{ssh-credentials}'
             branch: '{branch}'
+        - integration-test-scm:
+            credentials-id: '{ssh-credentials}'
+            branch: 'master'
 
     wrappers:
         - integration-jclouds-controller-mininet: