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-max-mem: "{controller-max-mem}"
25 controller-scope: "{controller-scope}"
26 controller-use-features-boot: "{use-features-boot}"
27 feature-elasticsearch-attribute: "{elasticsearch-attribute}"
30 name: integration-controller-parameters
34 default: "{controller-scope}"
35 description: "Feature Only or Feature All test"
38 name: CONTROLLERFEATURES
39 default: "{controller-features}"
41 Features to install in the controller separated by comma.
42 (note: Do not include decanter* features used for harvesting JVM metrics.
43 They are inserted in install scripts.)
46 name: CONTROLLERDEBUGMAP
47 default: "{controller-debug-map}"
49 Key:Value map of debugs to enable on the controller separated by spaces.
50 The module should not include org.opendaylight.
51 The levels must be one of: ERROR, WARN, INFO, DEBUG, TRACE.
52 (ex. ovsdb.lib:ERROR netvirt.vpnservice:INFO)
55 name: CONTROLLERMAXMEM
56 default: "{controller-max-mem}"
58 Max Heap size to use when starting the controller.
61 name: ELASTICSEARCHATTRIBUTE
62 default: "{feature-elasticsearch-attribute}"
64 Configure the period the script should harvest JVM metrics.
65 Possible values: long (=120000)
67 any number between 5000 and 120000
68 disabled (use for disabling harvesting)
72 default: "{controller-use-features-boot}"
73 description: "Boolean to toggle whether featuresBoot is appended or ignored"
76 name: integration-distribution-branch
81 description: "Distribution GIT branch"
84 name: distribution-karaf-version
86 # karaf-version: Provide, otherwise defaults.yaml value is used.
90 default: "{karaf-version}"
91 description: "karaf3, karaf4, odl, affects ODL deploy scripts"
94 name: integration-bundle-url
98 default: "{bundle-url}"
99 description: "URL to karaf distribution zip"
102 name: integration-repo-url
106 default: "{repo-url}"
107 description: "URL to feature repo artifact"
110 name: integration-jdk-version
114 default: "{jdkversion}"
115 description: "Parameter to indicate JAVA Version"
118 name: integration-distribution-stream
123 description: "Distribution stream string, for suites to know which behavior to expect"
126 name: integration-script-plan
130 default: "{script-plan}"
131 description: "Script plan we will run before downloading and un-archiving am ODL distribution"
134 name: integration-config-plan
138 default: "{config-plan}"
139 description: "Config plan we will run after un-archiving and starting an ODL distribution"
142 name: integration-stream-test-plan
146 default: "{stream-test-plan}"
147 description: "Stream-specific test plan we will run"
150 name: integration-test-plan
154 default: "{test-plan}"
155 description: "General test plan we will run unless stream-specific one is found"
158 name: integration-test-suites
162 default: "{test-suites}"
164 List of space-separated suites. Useful when running specific suites within a testplan.
165 Do not include ${{WORKSPACE}}/test/csit/suites/ in the values:
166 (ex. openstack/connectivity/l2.robot openstack/clustering/ha_l2.robot
167 openstack/tempest/tempest.robot netvirt/elan/elan.robot).
170 name: integration-test-options
174 default: "{test-options}"
175 description: "Robot command options"
178 name: integration-distribution-git-url
182 default: "{git-url}/integration/distribution"
183 description: "Distribution GIT URL (do not modify)"
186 name: integration-patch-refspec
191 description: "Integration Patch Refspec"
193 # Macro: integration-gerrit-scm
194 # Operation: this macro downloads a project gerrit
195 # Used by: all csit jobs
198 name: integration-gerrit-scm
201 credentials-id: "opendaylight-jenkins-ssh"
208 choosing-strategy: "gerrit"
210 # Macro: integration-distribution-scm
211 # Operation: this macro downloads the integration/distribution repo using distribution as basedir
212 # Used by: integration-patch-test-{stream} job template
215 name: integration-distribution-scm
218 credentials-id: "opendaylight-jenkins-ssh"
219 basedir: "distribution"
226 # Macro: integration-trigger-patch-submitted
227 # This is a single macro to use for all csit jobs who vote on every (relevant) patch set.
228 # Only 'recheck' trigger word is supported, it always triggers the full set of relevant jobs,
229 # in order to prevent Jenkins from starting only a subset and still voting Verified+1.
230 # Contrary to gerrit-trigger-patch-submitted, this votes +1 also on unstable runs.
232 # gerrit-server-name: name of gerrit server to listen to
233 # project: pattern to match triggering projects
234 # branch: triggering branch name
235 # files: pattern to match triggering filepaths
237 name: integration-trigger-patch-submitted
240 server-name: "{gerrit-server-name}"
242 - patchset-created-event:
244 exclude-trivial-rebase: false
245 exclude-no-code-change: false
246 - draft-published-event
247 - comment-added-contains-event:
248 comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
250 gerrit-build-unstable-verified-value: +1
251 gerrit-build-unstable-codereview-value: 0
253 - project-compare-type: ANT
254 project-pattern: "{project}"
256 - branch-compare-type: ANT
257 branch-pattern: "**/{branch}"
262 # Macro: integration-csit-only
263 # Operation: this macro sets a trigger on reverse job list
264 # Used by: csit -only- job templates
267 name: integration-csit-trigger
273 # Macro: integration-openstack-controller-mininet
274 # Operation: this macro will spin the controller and mininet vms
275 # Used by: {project}-csit-* job templates
278 name: integration-openstack-controller-mininet
282 - cloud-name: "ODLRPC"
283 template-name: "{controller-image}"
284 count: "{controller-vms}"
285 - cloud-name: "ODLRPC"
286 template-name: "{mininet-image}"
287 count: "{mininet-vms}"
289 # Macro: integration-openstack-controller-devstack
290 # Operation: this macro will spin the controller and devstack vms
291 # Used by: {project}-csit-openstack job templates
293 name: integration-openstack-controller-devstack
297 - cloud-name: "ODLRPC"
298 template-name: "{controller-image}"
299 count: "{controller-vms}"
300 - cloud-name: "ODLRPC"
301 template-name: "{openstack-image}"
302 count: "{openstack-vms}"
308 # Macro: integration-get-apex-addresses
309 # Operation: this macro gets the IP addresses of the dynamic vms from apex snapshots
310 # Used by: {project}-csit-* apex related job templates
313 name: integration-get-apex-addresses
315 - shell: !include-raw: integration-get-apex-addresses.sh
317 # Macro: integration-apex-run-tests
318 # Operation: this macro just runs the robot suites
319 # Used by: {project}-csit-* apex related job templates
322 name: integration-apex-run-tests
324 - shell: !include-raw: integration-apex-run-tests.sh
326 # Macro: integration-get-slave-addresses
327 # Operation: this macro gets the IP addresses of the dynamic vms
328 # Used by: {project}-csit-* job templates
331 name: integration-get-slave-addresses
333 - shell: !include-raw: integration-get-slave-addresses.sh
336 name: integration-set-variables
337 # Operation: Construct variables not requiring online detection and export using set_variables.env
338 # Required bash variables:
339 # KARAF_VERSION: 'karaf4' or 'karaf3'. Use distribution-karaf-version macro to set.
341 - shell: !include-raw: integration-set-variables.sh
343 properties-file: set_variables.env
346 name: integration-detect-variables
347 # Operation: Construct variables including online detection and export using detect_variables.env
348 # This calls integration-set-variables internally.
349 # Required bash variables:
350 # KARAF_VERSION: 'karaf4' or 'karaf3'. Use distribution-karaf-version macro to set.
352 - integration-set-variables
353 - shell: !include-raw: integration-detect-variables.sh
355 properties-file: detect_variables.env
357 # Macro: integration-deply-controller-run-test
358 # Operation: this macro deploys single contoller and runs test
359 # Used by: {project}-csit-1node-* job templates
362 name: integration-deploy-controller-run-test
364 - shell: !include-raw: integration-deploy-controller-run-test.sh
366 # Macro: integration-configure-clustering
367 # Operation: this macro configures the clustering
368 # Used by: {project}-csit-3node-* job templates
371 name: integration-configure-clustering
373 - shell: !include-raw: integration-configure-clustering.sh
375 # Macro: integration-start-cluster-run-test
376 # Operation: this macro starts the 3-node cluster and runs test
377 # Used by: {project}-csit-3node-* job templates
380 name: integration-start-cluster-run-test
382 - shell: !include-raw: integration-start-cluster-run-test.sh
384 # Macro: integration-install-robotframework
385 # Operation: Installs robotframework using pip to a virtualenv
386 # Used by: {project}-csit-* job templates
389 name: integration-install-robotframework
391 - shell: !include-raw: integration-install-robotframework.sh
393 # Macro: integration-cleanup-tmp
394 # Operation: Cleans up temporary files created by build
395 # Used by: {project}-csit-* job templates
398 name: integration-cleanup-tmp
400 - shell: !include-raw: integration-cleanup-tmp.sh
402 # Macro: integration-multipatch-builder
403 # Operation: checks out multiple patches and builds custom distribution
404 # Used by: integration-multipatch-test-* job templates
407 name: integration-multipatch-builder
409 - shell: !include-raw: multipatch-distribution.sh
411 # Macro: integration-cleanup-workspace
412 # Operation: Cleans up files possibly left there by the previous build
413 # Used by: {project}-csit-* job templates
416 name: integration-cleanup-workspace
418 - shell: !include-raw: integration-cleanup-workspace.sh
420 # Macro: integration-rebase-patch
421 # Operation: For cloned project, rebase checked-out Gerrit patch onto $DISTROBRANCH.
422 # Used by: integration-patch-distribution-* job template
425 name: integration-rebase-gerrit-patch
427 - shell: !include-raw: integration-rebase-gerrit-patch.sh
429 # Macro: integration-install-common-functions
430 # Operation: Copy the common-functions.sh script to csit nodes
431 # Used by: {project}-csit-* job templates
433 name: integration-install-common-functions
435 - shell: !include-raw:
436 - copy-common-functions.sh
437 - common-functions.sh
440 name: integration-deploy-openstack-run-test
442 - shell: !include-raw:
443 - integration-deploy-openstack-run-test.sh
446 name: integration-apex-image-manager
448 - shell: !include-raw:
449 - ../opendaylight-infra-apex-image-management.sh
452 name: integration-compare-distributions
453 # Operation: will compare an already created distribtion (probably last
454 # published to nexus) to the current distribution being created.
455 # The comparison is done to find the list of patches that are new to the
456 # current distribution.
457 # Required bash variables:
458 # KARAF_ARTIFACT: 'karaf' or 'distribution-karaf'. Use integration-set-variables.
460 - shell: !include-raw: integration-compare-distributions.sh
463 name: integration-upload-distribution
464 # Upload distribution karaf artifact to Nexus SNAPSHOT repo for testing.
466 # {dist-pom} path to pom file containing the version
467 # Required bash variables:
468 # KARAF_VERSION: 'karaf4' or 'karaf3'.
469 # Use distribution-karaf-version macro to customize.
471 - config-file-provider:
473 - file-id: global-settings
474 variable: GLOBAL_SETTINGS_FILE
475 - file-id: integration-settings
476 variable: SETTINGS_FILE
477 - integration-set-variables
479 properties-content: BUNDLE_POM={dist-pom}
480 - shell: !include-raw-escape: integration-upload-distribution.sh
482 properties-file: integration-upload-distribution.env
489 name: integration-csit-publish
493 other-files: "{obj:robot_other_files}"
494 unstable-threshold: "{robot-unstable-threshold}"
495 pass-threshold: "{robot-pass-threshold}"
497 - integration-csit-archive-build
498 - integration-csit-run-postscript
501 name: integration-csit-archive-build
515 echo "Archiving csit artifacts"
518 for i in `seq 1 ${NUM_ODL_SYSTEM}`; do
519 NODE_FOLDER="./archives/odl_${i}"
520 mkdir -p ${NODE_FOLDER}
521 mv odl${i}_* ${NODE_FOLDER} || true
522 mv karaf_${i}_*_threads* ${NODE_FOLDER} || true
523 mv *_${i}.png ${NODE_FOLDER} || true
524 mv /tmp/odl${i}_* ${NODE_FOLDER} || true
525 mv gclogs-${i} ${NODE_FOLDER} || true
527 curl --output robot-plugin.zip "$BUILD_URL/robot/report/*zip*/robot-plugin.zip"
528 unzip -d ./archives robot-plugin.zip
529 mv *.log *.log.gz *.csv *.png ./archives || true # Don't fail if file missing
530 # TODO: Can the following line ever fail?
531 find . -type f -name *.hprof -print0 \
532 | tar -cvf - --null -T - | xz --threads=0 > ./archives/hprof.tar.xz
533 # TODO: Tweak the compression level if better ratio (or speed) is needed.
534 mark-unstable-if-failed: true
537 name: integration-csit-run-postscript
549 - config-file-provider:
551 - file-id: "odl-elastic-cloud"
552 target: "${HOME}/.netrc"
555 #The following script runs any configurable postplan stored in test/csit/postplans.
556 if [ -f "${WORKSPACE}/test/csit/postplans/${TESTPLAN}" ]; then
557 echo "postplan exists!!!"
558 echo "Changing the postplan path..."
559 script_name=${WORKSPACE}/test/csit/postplans/${TESTPLAN}
560 cat ${script_name} | sed "s:integration:${WORKSPACE}:" > postplan.txt
562 egrep -v '(^[[:space:]]*#|^[[:space:]]*$)' postplan.txt | while read -r line ; do
563 echo "Executing ${line}..."
568 mark-unstable-if-failed: true
571 name: integration-csit-collect-netvirt-logs
584 properties-file: "slave_addresses.txt"
587 source /tmp/common-functions.sh ${BUNDLEFOLDER}
589 mark-unstable-if-failed: true