2 # TODO: Make all bash constants more readable.
3 # e.g.: DISTRIBUTION_BRANCH instead of DISTROBRANCH.
6 name: integration-csit-parameters
8 - opendaylight-infra-parameters:
10 project: 'integration/test'
12 refspec: 'refs/heads/{branch}'
13 artifacts: '{archive-artifacts}'
15 - integration-bundle-url:
16 bundle-url: '{bundle-url}'
17 - integration-repo-url:
18 repo-url: '{repo-url}'
19 - integration-test-options:
20 test-options: '{robot-options}'
21 - integration-controller-parameters:
22 controller-debug-map: '{debug-map}'
23 controller-features: '{install-features}'
24 controller-scope: '{controller-scope}'
25 controller-use-features-boot: '{use-features-boot}'
26 feature-elasticsearch-attribute: '{elasticsearch-attribute}'
29 name: integration-controller-parameters
33 default: '{controller-scope}'
34 description: 'Feature Only or Feature All test'
37 name: CONTROLLERFEATURES
38 default: '{controller-features}'
40 Features to install in the controller separated by comma
41 (note: extra features such as decanter are inserted in install scripts)
44 name: CONTROLLERDEBUGMAP
45 default: '{controller-debug-map}'
47 Key:Value map of debugs to enable on the controller separated by spaces.
48 The module should not include org.opendaylight.
49 The levels must be one of: ERROR, WARN, INFO, DEBUG, TRACE.
50 (ex. ovsdb.lib:ERROR netvirt.vpnservice:INFO)
53 name: ELASTICSEARCHATTRIBUTE
54 default: '{feature-elasticsearch-attribute}'
56 Configure the period the script should harvest JVM metrics.
58 Possible values: long (its value is 120000)
59 short (its value is 5000)
60 any number between 5000 and 120000
64 default: '{controller-use-features-boot}'
65 description: 'Boolean to toggle whether featuresBoot is appended or ignored'
69 name: integration-distribution-branch
74 description: 'Distribution GIT branch'
77 name: distribution-karaf-version
79 # karaf-version: Provide, otherwise defaults.yaml value is used.
83 default: '{karaf-version}'
84 description: 'karaf3, karaf4, odl, affects ODL deploy scripts'
87 name: integration-bundle-url
91 default: '{bundle-url}'
92 description: 'URL to karaf distribution zip'
95 name: integration-repo-url
100 description: 'URL to feature repo artifact'
103 name: integration-jdk-version
107 default: '{jdkversion}'
108 description: 'Parameter to indicate JAVA Version'
111 name: integration-distribution-stream
116 description: 'Distribution stream string, for suites to know which behavior to expect'
119 name: integration-script-plan
123 default: '{script-plan}'
124 description: 'Script plan we will run before downloading and un-archiving am ODL distribution'
127 name: integration-config-plan
131 default: '{config-plan}'
132 description: 'Config plan we will run after un-archiving and starting an ODL distribution'
135 name: integration-stream-test-plan
139 default: '{stream-test-plan}'
140 description: 'Stream-specific test plan we will run'
143 name: integration-test-plan
147 default: '{test-plan}'
148 description: 'General test plan we will run unless stream-specific one is found'
151 name: integration-test-suites
155 default: '{test-suites}'
157 List of space-separated suites. Useful when running specific suites within a testplan.
158 Do not include ${{WORKSPACE}}/test/csit/suites/ in the values:
159 (ex. openstack/connectivity/l2.robot openstack/clustering/ha_l2.robot
160 openstack/tempest/tempest.robot netvirt/elan/elan.robot).
163 name: integration-test-options
167 default: '{test-options}'
168 description: 'Robot command options'
171 name: integration-distribution-git-url
175 default: '{git-url}/integration/distribution'
176 description: 'Distribution GIT URL (do not modify)'
179 name: integration-patch-refspec
184 description: 'Integration Patch Refspec'
186 # Macro: integration-gerrit-scm
187 # Operation: this macro downloads a project gerrit
188 # Used by: all csit jobs
191 name: integration-gerrit-scm
194 credentials-id: 'opendaylight-jenkins-ssh'
201 choosing-strategy: 'gerrit'
203 # Macro: integration-distribution-scm
204 # Operation: this macro downloads the integration/distribution repo using distribution as basedir
205 # Used by: integration-patch-test-{stream} job template
208 name: integration-distribution-scm
211 credentials-id: 'opendaylight-jenkins-ssh'
212 basedir: 'distribution'
219 # Macro: integration-trigger-patch-submitted
220 # This is a single macro to use for all csit jobs who vote on every (relevant) patch set.
221 # Only 'recheck' trigger word is supported, it always triggers the full set of relevant jobs,
222 # in order to prevent Jenkins from starting only a subset and still voting Verified+1.
223 # Contrary to gerrit-trigger-patch-submitted, this votes +1 also on unstable runs.
225 # gerrit-server-name: name of gerrit server to listen to
226 # project: pattern to match triggering projects
227 # branch: triggering branch name
228 # files: pattern to match triggering filepaths
230 name: integration-trigger-patch-submitted
233 server-name: '{gerrit-server-name}'
235 - patchset-created-event:
237 exclude-trivial-rebase: false
238 exclude-no-code-change: false
239 - draft-published-event
240 - comment-added-contains-event:
241 comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
243 gerrit-build-unstable-verified-value: +1
244 gerrit-build-unstable-codereview-value: 0
246 - project-compare-type: ANT
247 project-pattern: '{project}'
249 - branch-compare-type: ANT
250 branch-pattern: '**/{branch}'
255 # Macro: integration-csit-only
256 # Operation: this macro sets a trigger on reverse job list
257 # Used by: csit -only- job templates
260 name: integration-csit-trigger
266 # Macro: integration-openstack-controller-mininet
267 # Operation: this macro will spin the controller and mininet vms
268 # Used by: {project}-csit-* job templates
271 name: integration-openstack-controller-mininet
275 - cloud-name: 'ODLRPC'
276 template-name: '{controller-image}'
277 count: '{controller-vms}'
278 - cloud-name: 'ODLRPC'
279 template-name: '{mininet-image}'
280 count: '{mininet-vms}'
282 # Macro: integration-openstack-controller-devstack
283 # Operation: this macro will spin the controller and devstack vms
284 # Used by: {project}-csit-openstack job templates
286 name: integration-openstack-controller-devstack
290 - cloud-name: 'ODLRPC'
291 template-name: '{controller-image}'
292 count: '{controller-vms}'
293 - cloud-name: 'ODLRPC'
294 template-name: '{openstack-image}'
295 count: '{openstack-vms}'
301 # Macro: integration-get-apex-addresses
302 # Operation: this macro gets the IP addresses of the dynamic vms from apex snapshots
303 # Used by: {project}-csit-* apex related job templates
306 name: integration-get-apex-addresses
308 - shell: !include-raw: integration-get-apex-addresses.sh
310 # Macro: integration-apex-run-tests
311 # Operation: this macro just runs the robot suites
312 # Used by: {project}-csit-* apex related job templates
315 name: integration-apex-run-tests
317 - shell: !include-raw: integration-apex-run-tests.sh
319 # Macro: integration-get-slave-addresses
320 # Operation: this macro gets the IP addresses of the dynamic vms
321 # Used by: {project}-csit-* job templates
324 name: integration-get-slave-addresses
326 - shell: !include-raw: integration-get-slave-addresses.sh
329 name: integration-set-variables
330 # Operation: Construct variables not requiring online detection and export using set_variables.env
331 # Required bash variables:
332 # KARAF_VERSION: 'karaf4' or 'karaf3'. Use distribution-karaf-version macro to set.
334 - shell: !include-raw: integration-set-variables.sh
336 properties-file: set_variables.env
339 name: integration-detect-variables
340 # Operation: Construct variables including online detection and export using detect_variables.env
341 # This calls integration-set-variables internally.
342 # Required bash variables:
343 # KARAF_VERSION: 'karaf4' or 'karaf3'. Use distribution-karaf-version macro to set.
345 - integration-set-variables
346 - shell: !include-raw: integration-detect-variables.sh
348 properties-file: detect_variables.env
350 # Macro: integration-deply-controller-run-test
351 # Operation: this macro deploys single contoller and runs test
352 # Used by: {project}-csit-1node-* job templates
355 name: integration-deploy-controller-run-test
357 - shell: !include-raw: integration-deploy-controller-run-test.sh
359 # Macro: integration-configure-clustering
360 # Operation: this macro configures the clustering
361 # Used by: {project}-csit-3node-* job templates
364 name: integration-configure-clustering
366 - shell: !include-raw: integration-configure-clustering.sh
368 # Macro: integration-start-cluster-run-test
369 # Operation: this macro starts the 3-node cluster and runs test
370 # Used by: {project}-csit-3node-* job templates
373 name: integration-start-cluster-run-test
375 - shell: !include-raw: integration-start-cluster-run-test.sh
377 # Macro: integration-install-robotframework
378 # Operation: Installs robotframework using pip to a virtualenv
379 # Used by: {project}-csit-* job templates
382 name: integration-install-robotframework
384 - shell: !include-raw: integration-install-robotframework.sh
386 # Macro: integration-cleanup-tmp
387 # Operation: Cleans up temporary files created by build
388 # Used by: {project}-csit-* job templates
391 name: integration-cleanup-tmp
393 - shell: !include-raw: integration-cleanup-tmp.sh
395 # Macro: integration-multipatch-builder
396 # Operation: checks out multiple patches and builds custom distribution
397 # Used by: integration-multipatch-test-* job templates
400 name: integration-multipatch-builder
402 - shell: !include-raw: multipatch-distribution.sh
404 # Macro: integration-cleanup-workspace
405 # Operation: Cleans up files possibly left there by the previous build
406 # Used by: {project}-csit-* job templates
409 name: integration-cleanup-workspace
411 - shell: !include-raw: integration-cleanup-workspace.sh
413 # Macro: integration-rebase-patch
414 # Operation: For cloned project, rebase checked-out Gerrit patch onto $DISTROBRANCH.
415 # Used by: integration-patch-distribution-* job template
418 name: integration-rebase-gerrit-patch
420 - shell: !include-raw: integration-rebase-gerrit-patch.sh
422 # Macro: integration-install-common-functions
423 # Operation: Copy the common-functions.sh script to csit nodes
424 # Used by: {project}-csit-* job templates
426 name: integration-install-common-functions
428 - shell: !include-raw:
429 - copy-common-functions.sh
430 - common-functions.sh
433 name: integration-deploy-openstack-run-test
435 - shell: !include-raw:
436 - integration-deploy-openstack-run-test.sh
439 name: integration-apex-image-manager
441 - shell: !include-raw:
442 - ../opendaylight-infra-apex-image-management.sh
445 name: integration-compare-distributions
446 # Operation: will compare an already created distribtion (probably last
447 # published to nexus) to the current distribution being created.
448 # The comparison is done to find the list of patches that are new to the
449 # current distribution.
450 # Required bash variables:
451 # KARAF_ARTIFACT: 'karaf' or 'distribution-karaf'. Use integration-set-variables.
453 - shell: !include-raw: integration-compare-distributions.sh
456 name: integration-upload-distribution
457 # Upload distribution karaf artifact to Nexus SNAPSHOT repo for testing.
459 # {dist-pom} path to pom file containing the version
460 # Required bash variables:
461 # KARAF_VERSION: 'karaf4' or 'karaf3'.
462 # Use distribution-karaf-version macro to customize.
464 - config-file-provider:
466 - file-id: global-settings
467 variable: GLOBAL_SETTINGS_FILE
468 - file-id: integration-settings
469 variable: SETTINGS_FILE
470 - integration-set-variables
472 properties-content: BUNDLE_POM={dist-pom}
473 - shell: !include-raw-escape: integration-upload-distribution.sh
475 properties-file: integration-upload-distribution.env
482 name: integration-csit-publish
486 other-files: '{obj:robot_other_files}'
487 unstable-threshold: '{robot-unstable-threshold}'
488 pass-threshold: '{robot-pass-threshold}'
490 - integration-csit-archive-build
491 - integration-csit-run-postscript
492 - releng-openstack-stack-delete
495 name: integration-csit-archive-build
509 echo "Archiving csit artifacts"
512 for i in `seq 1 ${NUM_ODL_SYSTEM}`; do
513 NODE_FOLDER="./archives/odl_${i}"
514 mkdir -p ${NODE_FOLDER}
515 mv odl${i}_* ${NODE_FOLDER} || true
516 mv karaf_${i}_*_threads* ${NODE_FOLDER} || true
517 mv *_${i}.png ${NODE_FOLDER} || true
518 mv /tmp/odl${i}_* ${NODE_FOLDER} || true
519 mv gclogs-${i} ${NODE_FOLDER} || true
521 curl --output robot-plugin.zip "$BUILD_URL/robot/report/*zip*/robot-plugin.zip"
522 unzip -d ./archives robot-plugin.zip
523 mv *.log *.log.gz *.csv *.png ./archives || true # Don't fail if file missing
524 # TODO: Can the following line ever fail?
525 find . -type f -name *.hprof -print0 \
526 | tar -cvf - --null -T - | xz --threads=0 > ./archives/hprof.tar.xz
527 # TODO: Tweak the compression level if better ratio (or speed) is needed.
528 mark-unstable-if-failed: true
532 name: integration-csit-run-postscript
544 - config-file-provider:
546 - file-id: 'odl-elastic-cloud'
547 target: '${HOME}/.netrc'
550 #The following script runs any configurable postplan stored in test/csit/postplans.
551 if [ -f "${WORKSPACE}/test/csit/postplans/${TESTPLAN}" ]; then
552 echo "postplan exists!!!"
553 echo "Changing the postplan path..."
554 script_name=${WORKSPACE}/test/csit/postplans/${TESTPLAN}
555 cat ${script_name} | sed "s:integration:${WORKSPACE}:" > postplan.txt
557 egrep -v '(^[[:space:]]*#|^[[:space:]]*$)' postplan.txt | while read -r line ; do
558 echo "Executing ${line}..."
563 mark-unstable-if-failed: true
566 name: integration-csit-collect-netvirt-logs
579 properties-file: 'slave_addresses.txt'
582 source /tmp/common-functions.sh ${BUNDLEFOLDER}
584 mark-unstable-if-failed: true