From 93e2fda61bed4d778877ce63f07c20d5417daca2 Mon Sep 17 00:00:00 2001 From: Luis Gomez Date: Tue, 1 Sep 2015 01:07:57 -0700 Subject: [PATCH] Step 2: Change csit job templates to download 2 repositories 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 --- ...-integration-deploy-controller-run-test.sh | 2 +- .../include-raw-integration-get-bundle-url.sh | 2 +- ...include-raw-integration-get-bundle-vars.sh | 2 +- jjb/integration/integration-csit-basic.yaml | 2 +- jjb/integration/integration-macros.yaml | 32 +- jjb/integration/integration-templates.yaml | 411 ++++-------------- 6 files changed, 115 insertions(+), 336 deletions(-) diff --git a/jjb/integration/include-raw-integration-deploy-controller-run-test.sh b/jjb/integration/include-raw-integration-deploy-controller-run-test.sh index ed62b457f..6eee1c639 100644 --- a/jjb/integration/include-raw-integration-deploy-controller-run-test.sh +++ b/jjb/integration/include-raw-integration-deploy-controller-run-test.sh @@ -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 diff --git a/jjb/integration/include-raw-integration-get-bundle-url.sh b/jjb/integration/include-raw-integration-get-bundle-url.sh index 7d8412ecf..521fcb6e6 100644 --- a/jjb/integration/include-raw-integration-get-bundle-url.sh +++ b/jjb/integration/include-raw-integration-get-bundle-url.sh @@ -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 diff --git a/jjb/integration/include-raw-integration-get-bundle-vars.sh b/jjb/integration/include-raw-integration-get-bundle-vars.sh index fb07c17d8..5da4603b0 100644 --- a/jjb/integration/include-raw-integration-get-bundle-vars.sh +++ b/jjb/integration/include-raw-integration-get-bundle-vars.sh @@ -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 diff --git a/jjb/integration/integration-csit-basic.yaml b/jjb/integration/integration-csit-basic.yaml index b90a4c046..dc8fdf486 100644 --- a/jjb/integration/integration-csit-basic.yaml +++ b/jjb/integration/integration-csit-basic.yaml @@ -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' diff --git a/jjb/integration/integration-macros.yaml b/jjb/integration/integration-macros.yaml index 960d3f057..1952cd3cd 100644 --- a/jjb/integration/integration-macros.yaml +++ b/jjb/integration/integration-macros.yaml @@ -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: @@ -79,8 +79,25 @@ 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: @@ -100,10 +117,11 @@ # 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: @@ -138,7 +156,7 @@ 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/** @@ -167,7 +185,7 @@ 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/** @@ -190,7 +208,7 @@ 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 diff --git a/jjb/integration/integration-templates.yaml b/jjb/integration/integration-templates.yaml index b176334ea..be3df57dc 100644 --- a/jjb/integration/integration-templates.yaml +++ b/jjb/integration/integration-templates.yaml @@ -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 @@ -31,9 +42,10 @@ 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: @@ -46,10 +58,12 @@ 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: @@ -96,7 +110,8 @@ parameters: - project-parameter: - project: 'integration' + project: 'integration/test' + - integration-distribution-git-url - integration-branch: branch: '{branch}' - integration-bundleurl: @@ -110,12 +125,15 @@ - 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 @@ -174,289 +192,10 @@ 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 @@ -469,9 +208,10 @@ 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: @@ -484,10 +224,12 @@ 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 @@ -501,8 +243,8 @@ triggers: - integration-test-gerrit-trigger-patch-submitted: - name: 'integration' - branch: '{branch}' + name: 'integration/test' + branch: 'master' project: '{project}' builders: @@ -534,7 +276,8 @@ parameters: - project-parameter: - project: 'integration' + project: 'integration/test' + - integration-distribution-git-url - integration-branch: branch: '{branch}' - integration-bundleurl: @@ -548,12 +291,15 @@ - 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 @@ -624,7 +370,8 @@ parameters: - project-parameter: - project: 'integration' + project: 'integration/test' + - integration-distribution-git-url - integration-branch: branch: '{branch}' - integration-bundleurl: @@ -638,12 +385,15 @@ - 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: @@ -698,7 +448,7 @@ format: csv - job-template: - name: '{project}-csit-verify-3node-{functionality}-{stream}' + name: '{project}-csit-verify-3node-{functionality}' project-type: freestyle node: dynamic_robot @@ -711,9 +461,10 @@ 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: @@ -726,10 +477,12 @@ 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 @@ -743,8 +496,8 @@ triggers: - integration-test-gerrit-trigger-patch-submitted: - name: 'integration' - branch: '{branch}' + name: 'integration/test' + branch: 'master' project: '{project}' builders: @@ -780,7 +533,8 @@ parameters: - project-parameter: - project: 'integration' + project: 'integration/test' + - integration-distribution-git-url - integration-branch: branch: '{branch}' - integration-bundleurl: @@ -794,12 +548,15 @@ - 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 @@ -875,7 +632,8 @@ parameters: - project-parameter: - project: 'integration' + project: 'integration/test' + - integration-distribution-git-url - integration-branch: branch: '{branch}' - integration-bundleurl: @@ -889,12 +647,15 @@ - 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: -- 2.36.6