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: Do not include decanter* features used for harvesting JVM metrics.
42 They are inserted in install scripts.)
45 name: CONTROLLERDEBUGMAP
46 default: '{controller-debug-map}'
48 Key:Value map of debugs to enable on the controller separated by spaces.
49 The module should not include org.opendaylight.
50 The levels must be one of: ERROR, WARN, INFO, DEBUG, TRACE.
51 (ex. ovsdb.lib:ERROR netvirt.vpnservice:INFO)
54 name: ELASTICSEARCHATTRIBUTE
55 default: '{feature-elasticsearch-attribute}'
57 Configure the period the script should harvest JVM metrics.
58 Possible values: long (=120000)
60 any number between 5000 and 120000
61 disabled (use for disabling harvesting)
65 default: '{controller-use-features-boot}'
66 description: 'Boolean to toggle whether featuresBoot is appended or ignored'
70 name: integration-distribution-branch
75 description: 'Distribution GIT branch'
78 name: distribution-karaf-version
80 # karaf-version: Provide, otherwise defaults.yaml value is used.
84 default: '{karaf-version}'
85 description: 'karaf3, karaf4, odl, affects ODL deploy scripts'
88 name: integration-bundle-url
92 default: '{bundle-url}'
93 description: 'URL to karaf distribution zip'
96 name: integration-repo-url
100 default: '{repo-url}'
101 description: 'URL to feature repo artifact'
104 name: integration-jdk-version
108 default: '{jdkversion}'
109 description: 'Parameter to indicate JAVA Version'
112 name: integration-distribution-stream
117 description: 'Distribution stream string, for suites to know which behavior to expect'
120 name: integration-script-plan
124 default: '{script-plan}'
125 description: 'Script plan we will run before downloading and un-archiving am ODL distribution'
128 name: integration-config-plan
132 default: '{config-plan}'
133 description: 'Config plan we will run after un-archiving and starting an ODL distribution'
136 name: integration-stream-test-plan
140 default: '{stream-test-plan}'
141 description: 'Stream-specific test plan we will run'
144 name: integration-test-plan
148 default: '{test-plan}'
149 description: 'General test plan we will run unless stream-specific one is found'
152 name: integration-test-suites
156 default: '{test-suites}'
158 List of space-separated suites. Useful when running specific suites within a testplan.
159 Do not include ${{WORKSPACE}}/test/csit/suites/ in the values:
160 (ex. openstack/connectivity/l2.robot openstack/clustering/ha_l2.robot
161 openstack/tempest/tempest.robot netvirt/elan/elan.robot).
164 name: integration-test-options
168 default: '{test-options}'
169 description: 'Robot command options'
172 name: integration-distribution-git-url
176 default: '{git-url}/integration/distribution'
177 description: 'Distribution GIT URL (do not modify)'
180 name: integration-patch-refspec
185 description: 'Integration Patch Refspec'
187 # Macro: integration-gerrit-scm
188 # Operation: this macro downloads a project gerrit
189 # Used by: all csit jobs
192 name: integration-gerrit-scm
195 credentials-id: 'opendaylight-jenkins-ssh'
202 choosing-strategy: 'gerrit'
204 # Macro: integration-distribution-scm
205 # Operation: this macro downloads the integration/distribution repo using distribution as basedir
206 # Used by: integration-patch-test-{stream} job template
209 name: integration-distribution-scm
212 credentials-id: 'opendaylight-jenkins-ssh'
213 basedir: 'distribution'
220 # Macro: integration-trigger-patch-submitted
221 # This is a single macro to use for all csit jobs who vote on every (relevant) patch set.
222 # Only 'recheck' trigger word is supported, it always triggers the full set of relevant jobs,
223 # in order to prevent Jenkins from starting only a subset and still voting Verified+1.
224 # Contrary to gerrit-trigger-patch-submitted, this votes +1 also on unstable runs.
226 # gerrit-server-name: name of gerrit server to listen to
227 # project: pattern to match triggering projects
228 # branch: triggering branch name
229 # files: pattern to match triggering filepaths
231 name: integration-trigger-patch-submitted
234 server-name: '{gerrit-server-name}'
236 - patchset-created-event:
238 exclude-trivial-rebase: false
239 exclude-no-code-change: false
240 - draft-published-event
241 - comment-added-contains-event:
242 comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
244 gerrit-build-unstable-verified-value: +1
245 gerrit-build-unstable-codereview-value: 0
247 - project-compare-type: ANT
248 project-pattern: '{project}'
250 - branch-compare-type: ANT
251 branch-pattern: '**/{branch}'
256 # Macro: integration-csit-only
257 # Operation: this macro sets a trigger on reverse job list
258 # Used by: csit -only- job templates
261 name: integration-csit-trigger
267 # Macro: integration-openstack-controller-mininet
268 # Operation: this macro will spin the controller and mininet vms
269 # Used by: {project}-csit-* job templates
272 name: integration-openstack-controller-mininet
276 - cloud-name: 'ODLRPC'
277 template-name: '{controller-image}'
278 count: '{controller-vms}'
279 - cloud-name: 'ODLRPC'
280 template-name: '{mininet-image}'
281 count: '{mininet-vms}'
283 # Macro: integration-openstack-controller-devstack
284 # Operation: this macro will spin the controller and devstack vms
285 # Used by: {project}-csit-openstack job templates
287 name: integration-openstack-controller-devstack
291 - cloud-name: 'ODLRPC'
292 template-name: '{controller-image}'
293 count: '{controller-vms}'
294 - cloud-name: 'ODLRPC'
295 template-name: '{openstack-image}'
296 count: '{openstack-vms}'
302 # Macro: integration-get-apex-addresses
303 # Operation: this macro gets the IP addresses of the dynamic vms from apex snapshots
304 # Used by: {project}-csit-* apex related job templates
307 name: integration-get-apex-addresses
309 - shell: !include-raw: integration-get-apex-addresses.sh
311 # Macro: integration-apex-run-tests
312 # Operation: this macro just runs the robot suites
313 # Used by: {project}-csit-* apex related job templates
316 name: integration-apex-run-tests
318 - shell: !include-raw: integration-apex-run-tests.sh
320 # Macro: integration-get-slave-addresses
321 # Operation: this macro gets the IP addresses of the dynamic vms
322 # Used by: {project}-csit-* job templates
325 name: integration-get-slave-addresses
327 - shell: !include-raw: integration-get-slave-addresses.sh
330 name: integration-set-variables
331 # Operation: Construct variables not requiring online detection and export using set_variables.env
332 # Required bash variables:
333 # KARAF_VERSION: 'karaf4' or 'karaf3'. Use distribution-karaf-version macro to set.
335 - shell: !include-raw: integration-set-variables.sh
337 properties-file: set_variables.env
340 name: integration-detect-variables
341 # Operation: Construct variables including online detection and export using detect_variables.env
342 # This calls integration-set-variables internally.
343 # Required bash variables:
344 # KARAF_VERSION: 'karaf4' or 'karaf3'. Use distribution-karaf-version macro to set.
346 - integration-set-variables
347 - shell: !include-raw: integration-detect-variables.sh
349 properties-file: detect_variables.env
351 # Macro: integration-deply-controller-run-test
352 # Operation: this macro deploys single contoller and runs test
353 # Used by: {project}-csit-1node-* job templates
356 name: integration-deploy-controller-run-test
358 - shell: !include-raw: integration-deploy-controller-run-test.sh
360 # Macro: integration-configure-clustering
361 # Operation: this macro configures the clustering
362 # Used by: {project}-csit-3node-* job templates
365 name: integration-configure-clustering
367 - shell: !include-raw: integration-configure-clustering.sh
369 # Macro: integration-start-cluster-run-test
370 # Operation: this macro starts the 3-node cluster and runs test
371 # Used by: {project}-csit-3node-* job templates
374 name: integration-start-cluster-run-test
376 - shell: !include-raw: integration-start-cluster-run-test.sh
378 # Macro: integration-install-robotframework
379 # Operation: Installs robotframework using pip to a virtualenv
380 # Used by: {project}-csit-* job templates
383 name: integration-install-robotframework
385 - shell: !include-raw: integration-install-robotframework.sh
387 # Macro: integration-cleanup-tmp
388 # Operation: Cleans up temporary files created by build
389 # Used by: {project}-csit-* job templates
392 name: integration-cleanup-tmp
394 - shell: !include-raw: integration-cleanup-tmp.sh
396 # Macro: integration-multipatch-builder
397 # Operation: checks out multiple patches and builds custom distribution
398 # Used by: integration-multipatch-test-* job templates
401 name: integration-multipatch-builder
403 - shell: !include-raw: multipatch-distribution.sh
405 # Macro: integration-cleanup-workspace
406 # Operation: Cleans up files possibly left there by the previous build
407 # Used by: {project}-csit-* job templates
410 name: integration-cleanup-workspace
412 - shell: !include-raw: integration-cleanup-workspace.sh
414 # Macro: integration-rebase-patch
415 # Operation: For cloned project, rebase checked-out Gerrit patch onto $DISTROBRANCH.
416 # Used by: integration-patch-distribution-* job template
419 name: integration-rebase-gerrit-patch
421 - shell: !include-raw: integration-rebase-gerrit-patch.sh
423 # Macro: integration-install-common-functions
424 # Operation: Copy the common-functions.sh script to csit nodes
425 # Used by: {project}-csit-* job templates
427 name: integration-install-common-functions
429 - shell: !include-raw:
430 - copy-common-functions.sh
431 - common-functions.sh
434 name: integration-deploy-openstack-run-test
436 - shell: !include-raw:
437 - integration-deploy-openstack-run-test.sh
440 name: integration-apex-image-manager
442 - shell: !include-raw:
443 - ../opendaylight-infra-apex-image-management.sh
446 name: integration-compare-distributions
447 # Operation: will compare an already created distribtion (probably last
448 # published to nexus) to the current distribution being created.
449 # The comparison is done to find the list of patches that are new to the
450 # current distribution.
451 # Required bash variables:
452 # KARAF_ARTIFACT: 'karaf' or 'distribution-karaf'. Use integration-set-variables.
454 - shell: !include-raw: integration-compare-distributions.sh
457 name: integration-upload-distribution
458 # Upload distribution karaf artifact to Nexus SNAPSHOT repo for testing.
460 # {dist-pom} path to pom file containing the version
461 # Required bash variables:
462 # KARAF_VERSION: 'karaf4' or 'karaf3'.
463 # Use distribution-karaf-version macro to customize.
465 - config-file-provider:
467 - file-id: global-settings
468 variable: GLOBAL_SETTINGS_FILE
469 - file-id: integration-settings
470 variable: SETTINGS_FILE
471 - integration-set-variables
473 properties-content: BUNDLE_POM={dist-pom}
474 - shell: !include-raw-escape: integration-upload-distribution.sh
476 properties-file: integration-upload-distribution.env
483 name: integration-csit-publish
487 other-files: '{obj:robot_other_files}'
488 unstable-threshold: '{robot-unstable-threshold}'
489 pass-threshold: '{robot-pass-threshold}'
491 - integration-csit-archive-build
492 - integration-csit-run-postscript
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