Step 1: Create git macro to download integration/distribution 55/26255/5
authorLuis Gomez <ecelgp@gmail.com>
Mon, 31 Aug 2015 21:22:31 +0000 (14:22 -0700)
committerLuis Gomez <ecelgp@gmail.com>
Tue, 1 Sep 2015 07:37:28 +0000 (00:37 -0700)
Most integration/test jobs will download 2 git repos: The first will
use the $PROJECT and $GIT_BASE parameters while the second will use
fix project integration/distribution and fix BaseURL.

This patch will create a macro for the second git as well as update
the patch-test job to use this macro.

Change-Id: I82cd9fec6b0076700c31cd9e7e9c0a5d9ae8bbcb
Signed-off-by: Luis Gomez <ecelgp@gmail.com>
jjb/integration/integration-macros.yaml
jjb/integration/integration-test-jobs.yaml

index e66647c383d5e520a9317cf3f934631d41471ff5..960d3f057af16d8e474c69f4c03d4bdf4e0b489e 100644 (file)
             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 gerrit from any project and uses the project as basedir
+# Used by: integration-patch-test-{stream} job template
+
 - scm:
     name: integration-gerrit-scm
     scm:
         - git:
             credentials-id: '{credentials-id}'
-            url: '$PATCHGITURL'
+            url: '$GIT_BASE'
             basedir: '$GERRIT_PROJECT'
             refspec: '$GERRIT_REFSPEC'
             branches:
             skip-tag: true
             choosing-strategy: 'gerrit'
 
+# Macro: integration-distribution-scm
+# Operation: this macro downloads the integration/distribution repo and uses distribution as basedir
+# Used by: {project}-csit-* and integration-patch-test-{stream} job templates
+
 - 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
 
+# 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-patch-scm
     scm:
             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:
                   - compare-type: 'ANT'
                     pattern: 'test/csit/suites/{project}/**'
 
+# 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:
                   - compare-type: 'ANT'
                     pattern: 'test/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:
                   - compare-type: 'ANT'
                     pattern: 'test/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
     wrappers:
 # 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: integration-get-bundle-vars
     builders:
         - shell:
             !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-configure-clustering
         - shell:
             !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:
 # Publishers #
 ##############
 
+# Macro: integration-robot
+# Operation: this macro publishes robot results
+# Used by: {project}-csit-* job templates
+
 - publisher:
     name: integration-robot
     publishers:
index bcc416db9606b1c8bb6fb33911b95eb86e2bcbdc..34bbd2035cd8efc0af2cc01eb2cb0f2c3db1fac0 100644 (file)
         aaa-distribution-{stream},
         integration-distribution-merge-{stream}
 
+# Template: integration-csit-verify-1node-{stream}
+# Goal: Verify changes in csit folder not covered by projects suite verify jobs (e.g. library or variables)
+# Operation: This job template performs a base openflow test every time there is a change in the csit folder.
+
 - job-template:
     name: 'integration-csit-verify-1node-{stream}'
 
         - email-notification:
             email-prefix: '[integration]'
 
+# Template: integration-distribution-offline-{stream}
+# Goal: Verify distribution can start with no internet connection
+# Operation: This daily job template deployes the controller removing any external repository definition
+
 - job-template:
     name: 'integration-distribution-offline-{stream}'
 
         - email-notification:
             email-prefix: '[integration]'
 
+# Template: integration-distribution-test-{stream}
+# Goal: Verify a distribution through all system test available
+# Operation: This daily job template takes a distribution and passes all available system test
+
 - job-template:
     name: 'integration-distribution-test-{stream}'
 
         - email-notification:
             email-prefix: '[integration]'
 
+# 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
+# triggers the distribution test when test-integration is used in gerrit comments
+
 - job-template:
     name: 'integration-patch-test-{stream}'
 
 
     parameters:
         - project-parameter:
-            project: 'integration'
-        - integration-patch-git-url
+            project: '$GERRIT_PROJECT'
+        - integration-distribution-git-url
 
     scm:
         - integration-gerrit-scm:
             credentials-id: '{ssh-credentials}'
             branch: '{branch}'
-        - integration-git-scm:
+        - integration-distribution-scm:
             credentials-id: '{ssh-credentials}'
             branch: '{branch}'
 
 
     maven:
         maven-name: '{mvn33}'
-        root-pom: 'integration/pom.xml'
+        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'
         maven-opts: '-Xmx1024m -XX:MaxPermSize=256m -Dmaven.compile.fork=true'
         settings: '{integration-settings}'