From 3d52b0b26f53953d6005624443115af5216df05f Mon Sep 17 00:00:00 2001 From: Luis Gomez Date: Mon, 31 Aug 2015 14:22:31 -0700 Subject: [PATCH] Step 1: Create git macro to download integration/distribution 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 --- jjb/integration/integration-macros.yaml | 81 +++++++++++++++++++--- jjb/integration/integration-test-jobs.yaml | 25 +++++-- 2 files changed, 94 insertions(+), 12 deletions(-) diff --git a/jjb/integration/integration-macros.yaml b/jjb/integration/integration-macros.yaml index e66647c38..960d3f057 100644 --- a/jjb/integration/integration-macros.yaml +++ b/jjb/integration/integration-macros.yaml @@ -47,12 +47,12 @@ 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 @@ -62,12 +62,16 @@ 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: @@ -75,18 +79,26 @@ 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: @@ -99,6 +111,10 @@ 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: @@ -124,6 +140,10 @@ - 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: @@ -149,6 +169,10 @@ - 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: @@ -168,6 +192,10 @@ - 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: @@ -186,28 +214,49 @@ # 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 @@ -215,18 +264,30 @@ - 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: @@ -237,6 +298,10 @@ # Publishers # ############## +# Macro: integration-robot +# Operation: this macro publishes robot results +# Used by: {project}-csit-* job templates + - publisher: name: integration-robot publishers: diff --git a/jjb/integration/integration-test-jobs.yaml b/jjb/integration/integration-test-jobs.yaml index bcc416db9..34bbd2035 100644 --- a/jjb/integration/integration-test-jobs.yaml +++ b/jjb/integration/integration-test-jobs.yaml @@ -132,6 +132,10 @@ 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}' @@ -196,6 +200,10 @@ - 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}' @@ -242,6 +250,10 @@ - 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}' @@ -272,6 +284,11 @@ - 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}' @@ -287,14 +304,14 @@ 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}' @@ -338,7 +355,7 @@ 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}' -- 2.36.6