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}"
28 - distribution-is-karaf-appl:
29 karaf-based-controller: "{karaf-based-controller}"
30 - distribution-karaf-version:
31 karaf-version: "{karaf-version}"
34 name: integration-controller-parameters
38 default: "{controller-scope}"
39 description: "Feature Only or Feature All test"
42 name: CONTROLLERFEATURES
43 default: "{controller-features}"
45 Features to install in the controller separated by comma.
46 (note: Do not include decanter* features used for harvesting JVM metrics.
47 They are inserted in install scripts.)
50 name: CONTROLLERDEBUGMAP
51 default: "{controller-debug-map}"
53 Key:Value map of debugs to enable on the controller separated by spaces.
54 The module should not include org.opendaylight.
55 The levels must be one of: ERROR, WARN, INFO, DEBUG, TRACE.
56 (ex. ovsdb.lib:ERROR netvirt.vpnservice:INFO)
59 name: CONTROLLERMAXMEM
60 default: "{controller-max-mem}"
62 Max Heap size to use when starting the controller.
65 name: ELASTICSEARCHATTRIBUTE
66 default: "{feature-elasticsearch-attribute}"
68 Configure the period the script should harvest JVM metrics.
69 Possible values: long (=120000)
71 any number between 5000 and 120000
72 disabled (use for disabling harvesting)
76 default: "{controller-use-features-boot}"
77 description: "Boolean to toggle whether featuresBoot is appended or ignored"
80 name: integration-distribution-branch
85 description: "Distribution GIT branch"
88 name: distribution-is-karaf-appl
92 default: "{karaf-based-controller}"
93 description: "Boolean to let pipeline know if the project has a different deployer"
96 name: distribution-karaf-version
98 # karaf-version: Provide, otherwise defaults.yaml value is used.
102 default: "{karaf-version}"
103 description: "karaf3, karaf4, odl, bgpcep, controller, netconf affects ODL deploy scripts"
106 name: integration-bundle-url
110 default: "{bundle-url}"
111 description: "URL to karaf distribution zip"
114 name: integration-repo-url
118 default: "{repo-url}"
119 description: "URL to feature repo artifact"
122 name: integration-jdk-version
126 default: "{jdkversion}"
127 description: "Parameter to indicate JAVA Version"
130 name: integration-distribution-stream
135 description: "Distribution stream string, for suites to know which behavior to expect"
138 name: integration-script-plan
142 default: "{script-plan}"
143 description: "Script plan we will run before downloading and un-archiving am ODL distribution"
146 name: integration-config-plan
150 default: "{config-plan}"
151 description: "Config plan we will run after un-archiving and starting an ODL distribution"
154 name: integration-stream-test-plan
158 default: "{stream-test-plan}"
159 description: "Stream-specific test plan we will run"
162 name: integration-test-plan
166 default: "{test-plan}"
167 description: "General test plan we will run unless stream-specific one is found"
170 name: integration-test-suites
174 default: "{test-suites}"
176 List of space-separated suites. Useful when running specific suites within a testplan.
177 Do not include ${{WORKSPACE}}/test/csit/suites/ in the values:
178 (ex. openstack/connectivity/l2.robot openstack/clustering/ha_l2.robot
179 openstack/tempest/tempest.robot netvirt/elan/elan.robot).
182 name: integration-test-options
186 default: "{test-options}"
187 description: "Robot command options"
190 name: integration-distribution-git-url
194 default: "{git-url}/integration/distribution"
195 description: "Distribution GIT URL (do not modify)"
198 name: integration-patch-refspec
203 description: "Integration Patch Refspec"
205 # Macro: integration-gerrit-scm
206 # Operation: this macro downloads a project gerrit
207 # Used by: all csit jobs
210 name: integration-gerrit-scm
213 credentials-id: "opendaylight-jenkins-ssh"
220 choosing-strategy: "gerrit"
222 # Macro: integration-distribution-scm
223 # Operation: this macro downloads the integration/distribution repo using distribution as basedir
224 # Used by: integration-patch-test-{stream} job template
227 name: integration-distribution-scm
230 credentials-id: "opendaylight-jenkins-ssh"
231 basedir: "distribution"
238 # Macro: integration-trigger-patch-submitted
239 # This is a single macro to use for all csit jobs who vote on every (relevant) patch set.
240 # Only 'recheck' trigger word is supported, it always triggers the full set of relevant jobs,
241 # in order to prevent Jenkins from starting only a subset and still voting Verified+1.
242 # Contrary to gerrit-trigger-patch-submitted, this votes +1 also on unstable runs.
244 # gerrit-server-name: name of gerrit server to listen to
245 # project: pattern to match triggering projects
246 # branch: triggering branch name
247 # files: pattern to match triggering filepaths
249 name: integration-trigger-patch-submitted
252 server-name: "{gerrit-server-name}"
254 - patchset-created-event:
256 exclude-trivial-rebase: false
257 exclude-no-code-change: false
258 - draft-published-event
259 - comment-added-contains-event:
260 comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
262 gerrit-build-unstable-verified-value: +1
263 gerrit-build-unstable-codereview-value: 0
265 - project-compare-type: ANT
266 project-pattern: "{project}"
268 - branch-compare-type: ANT
269 branch-pattern: "**/{branch}"
274 # Macro: integration-csit-only
275 # Operation: this macro sets a trigger on reverse job list
276 # Used by: csit -only- job templates
279 name: integration-csit-trigger
285 # Macro: integration-openstack-controller-mininet
286 # Operation: this macro will spin the controller and mininet vms
287 # Used by: {project}-csit-* job templates
290 name: integration-openstack-controller-mininet
294 - cloud-name: "ODLRPC"
295 template-name: "{controller-image}"
296 count: "{controller-vms}"
297 - cloud-name: "ODLRPC"
298 template-name: "{mininet-image}"
299 count: "{mininet-vms}"
301 # Macro: integration-openstack-controller-devstack
302 # Operation: this macro will spin the controller and devstack vms
303 # Used by: {project}-csit-openstack job templates
305 name: integration-openstack-controller-devstack
309 - cloud-name: "ODLRPC"
310 template-name: "{controller-image}"
311 count: "{controller-vms}"
312 - cloud-name: "ODLRPC"
313 template-name: "{openstack-image}"
314 count: "{openstack-vms}"
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-deply-non-karaf-controller-run-test
361 # Operation: this macro deploys non-karaf controller application and run test
362 # Used by: {project}-csit-1node-* job templates
365 name: integration-run-test
367 - shell: !include-raw: integration-run-test.sh
369 # Macro: integration-configure-clustering
370 # Operation: this macro configures the clustering
371 # Used by: {project}-csit-3node-* job templates
374 name: integration-configure-clustering
376 - shell: !include-raw: integration-configure-clustering.sh
378 # Macro: integration-start-cluster-run-test
379 # Operation: this macro starts the 3-node cluster and runs test
380 # Used by: {project}-csit-3node-* job templates
383 name: integration-start-cluster-run-test
385 - shell: !include-raw: integration-start-cluster-run-test.sh
387 # Macro: integration-install-robotframework
388 # Operation: Installs robotframework using pip to a virtualenv
389 # Used by: {project}-csit-* job templates
392 name: integration-install-robotframework
394 - shell: !include-raw: integration-install-robotframework.sh
396 # Macro: integration-cleanup-tmp
397 # Operation: Cleans up temporary files created by build
398 # Used by: {project}-csit-* job templates
401 name: integration-cleanup-tmp
403 - shell: !include-raw: integration-cleanup-tmp.sh
405 # Macro: integration-multipatch-builder
406 # Operation: checks out multiple patches and builds custom distribution
407 # Used by: integration-multipatch-test-* job templates
410 name: integration-multipatch-builder
412 - shell: !include-raw: multipatch-distribution.sh
414 # Macro: integration-cleanup-workspace
415 # Operation: Cleans up files possibly left there by the previous build
416 # Used by: {project}-csit-* job templates
419 name: integration-cleanup-workspace
421 - shell: !include-raw: integration-cleanup-workspace.sh
423 # Macro: integration-rebase-patch
424 # Operation: For cloned project, rebase checked-out Gerrit patch onto $DISTROBRANCH.
425 # Used by: integration-patch-distribution-* job template
428 name: integration-rebase-gerrit-patch
430 - shell: !include-raw: integration-rebase-gerrit-patch.sh
432 # Macro: integration-install-common-functions
433 # Operation: Copy the common-functions.sh script to csit nodes
434 # Used by: {project}-csit-* job templates
436 name: integration-install-common-functions
438 - shell: !include-raw:
439 - copy-common-functions.sh
440 - common-functions.sh
443 name: integration-deploy-openstack-run-test
445 - shell: !include-raw:
446 - integration-deploy-openstack-run-test.sh
449 name: integration-compare-distributions
450 # Operation: will compare an already created distribtion (probably last
451 # published to nexus) to the current distribution being created.
452 # The comparison is done to find the list of patches that are new to the
453 # current distribution.
454 # Required bash variables:
455 # KARAF_ARTIFACT: 'karaf' or 'distribution-karaf'. Use integration-set-variables.
457 - shell: !include-raw: integration-compare-distributions.sh
460 name: integration-upload-distribution
461 # Upload distribution karaf artifact to Nexus SNAPSHOT repo for testing.
463 # {dist-pom} path to pom file containing the version
464 # Required bash variables:
465 # KARAF_VERSION: 'karaf4' or 'karaf3'.
466 # Use distribution-karaf-version macro to customize.
468 - config-file-provider:
470 - file-id: global-settings
471 variable: GLOBAL_SETTINGS_FILE
472 - file-id: "{settings-project}-settings"
473 variable: SETTINGS_FILE
474 - integration-set-variables
476 properties-content: BUNDLE_POM={dist-pom}
477 - shell: !include-raw-escape: integration-upload-distribution.sh
479 properties-file: integration-upload-distribution.env
486 name: integration-csit-publish
490 other-files: "{obj:robot_other_files}"
491 unstable-threshold: "{robot-unstable-threshold}"
492 pass-threshold: "{robot-pass-threshold}"
494 - integration-csit-archive-build
495 - integration-csit-run-postscript
498 name: integration-csit-archive-build
512 echo "Archiving csit artifacts"
515 for i in `seq 1 ${NUM_ODL_SYSTEM}`; do
516 NODE_FOLDER="./archives/odl_${i}"
517 mkdir -p ${NODE_FOLDER}
518 mv odl${i}_* ${NODE_FOLDER} || true
519 mv karaf_${i}_*_threads* ${NODE_FOLDER} || true
520 mv *_${i}.png ${NODE_FOLDER} || true
521 mv /tmp/odl${i}_* ${NODE_FOLDER} || true
522 mv gclogs-${i} ${NODE_FOLDER} || true
524 curl --output robot-plugin.zip "$BUILD_URL/robot/report/*zip*/robot-plugin.zip"
525 unzip -d ./archives robot-plugin.zip
526 mv *.log *.log.gz *.csv *.png ./archives || true # Don't fail if file missing
527 # TODO: Can the following line ever fail?
528 find . -type f -name *.hprof -print0 \
529 | tar -cvf - --null -T - | xz --threads=0 > ./archives/hprof.tar.xz
530 # TODO: Tweak the compression level if better ratio (or speed) is needed.
531 mark-unstable-if-failed: true
534 name: integration-csit-run-postscript
548 #The following script runs any configurable postplan stored in test/csit/postplans.
549 if [ -f "${WORKSPACE}/test/csit/postplans/${TESTPLAN}" ]; then
550 echo "postplan exists!!!"
551 echo "Changing the postplan path..."
552 script_name=${WORKSPACE}/test/csit/postplans/${TESTPLAN}
553 cat ${script_name} | sed "s:integration:${WORKSPACE}:" > postplan.txt
555 egrep -v '(^[[:space:]]*#|^[[:space:]]*$)' postplan.txt | while read -r line ; do
556 echo "Executing ${line}..."
560 mark-unstable-if-failed: true
563 name: integration-csit-collect-netvirt-logs
576 properties-file: "slave_addresses.txt"
579 source /tmp/common-functions.sh ${BUNDLEFOLDER}
581 mark-unstable-if-failed: true