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}'
28 name: integration-controller-parameters
32 default: '{controller-scope}'
33 description: 'Feature Only or Feature All test'
36 name: CONTROLLERFEATURES
37 default: '{controller-features}'
38 description: 'Features to install in the controller separated by comma'
41 name: CONTROLLERDEBUGMAP
42 default: '{controller-debug-map}'
44 Key:Value map of debugs to enable on the controller separated by spaces.
45 The module should not include org.opendaylight.
46 The levels must be one of: ERROR, WARN, INFO, DEBUG, TRACE.
47 (ex. ovsdb.lib:ERROR netvirt.vpnservice:INFO)
51 default: '{controller-use-features-boot}'
52 description: 'Boolean to toggle whether featuresBoot is appended or ignored'
56 name: integration-distribution-branch
61 description: 'Distribution GIT branch'
64 name: distribution-karaf-version
66 # karaf-version: Provide, otherwise defaults.yaml value is used.
70 default: '{karaf-version}'
71 description: 'karaf3, karaf4, odl, affects ODL deploy scripts'
74 name: integration-bundle-url
78 default: '{bundle-url}'
80 Karaf distribution zip URL. Use last for last distribution in Nexus,
81 use autorelease for last stable AR job distribution.
84 name: integration-repo-url
89 description: 'URL to feature repo artifact'
92 name: integration-jdk-version
96 default: '{jdkversion}'
97 description: 'Parameter to indicate JAVA Version'
100 name: integration-distribution-stream
105 description: 'Distribution stream string, for suites to know which behavior to expect'
108 name: integration-script-plan
112 default: '{script-plan}'
113 description: 'Script plan we will run before downloading and un-archiving am ODL distribution'
116 name: integration-config-plan
120 default: '{config-plan}'
121 description: 'Config plan we will run after un-archiving and starting an ODL distribution'
124 name: integration-stream-test-plan
128 default: '{stream-test-plan}'
129 description: 'Stream-specific test plan we will run'
132 name: integration-test-plan
136 default: '{test-plan}'
137 description: 'General test plan we will run unless stream-specific one is found'
140 name: integration-test-suites
144 default: '{test-suites}'
146 List of space-separated suites. Useful when running specific suites within a testplan.
147 Do not include ${{WORKSPACE}}/test/csit/suites/ in the values:
148 (ex. openstack/connectivity/l2.robot openstack/clustering/ha_l2.robot
149 openstack/tempest/tempest.robot netvirt/elan/elan.robot).
152 name: integration-test-options
156 default: '{test-options}'
157 description: 'Robot command options'
160 name: integration-distribution-git-url
164 default: '{git-url}/integration/distribution'
165 description: 'Distribution GIT URL (do not modify)'
168 name: integration-patch-refspec
173 description: 'Integration Patch Refspec'
175 # Macro: integration-gerrit-scm
176 # Operation: this macro downloads a project gerrit
177 # Used by: all csit jobs
180 name: integration-gerrit-scm
183 credentials-id: 'opendaylight-jenkins-ssh'
190 choosing-strategy: 'gerrit'
192 # Macro: integration-distribution-scm
193 # Operation: this macro downloads the integration/distribution repo using distribution as basedir
194 # Used by: integration-patch-test-{stream} job template
197 name: integration-distribution-scm
200 credentials-id: 'opendaylight-jenkins-ssh'
201 basedir: 'distribution'
208 # Macro: integration-trigger-patch-submitted
209 # This is a single macro to use for all csit jobs who vote on every (relevant) patch set.
210 # Only 'recheck' trigger word is supported, it always triggers the full set of relevant jobs,
211 # in order to prevent Jenkins from starting only a subset and still voting Verified+1.
212 # Contrary to gerrit-trigger-patch-submitted, this votes +1 also on unstable runs.
214 # gerrit-server-name: name of gerrit server to listen to
215 # project: pattern to match triggering projects
216 # branch: triggering branch name
217 # files: pattern to match triggering filepaths
219 name: integration-trigger-patch-submitted
222 server-name: '{gerrit-server-name}'
224 - patchset-created-event:
226 exclude-trivial-rebase: false
227 exclude-no-code-change: false
228 - draft-published-event
229 - comment-added-contains-event:
230 comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
232 gerrit-build-unstable-verified-value: +1
233 gerrit-build-unstable-codereview-value: 0
235 - project-compare-type: ANT
236 project-pattern: '{project}'
238 - branch-compare-type: ANT
239 branch-pattern: '**/{branch}'
244 # Macro: integration-csit-only
245 # Operation: this macro sets a trigger on reverse job list
246 # Used by: csit -only- job templates
249 name: integration-csit-trigger
255 # Macro: integration-openstack-controller-mininet
256 # Operation: this macro will spin the controller and mininet vms
257 # Used by: {project}-csit-* job templates
260 name: integration-openstack-controller-mininet
264 - cloud-name: 'ODLRPC'
265 template-name: '{controller-image}'
266 count: '{controller-vms}'
267 - cloud-name: 'ODLRPC'
268 template-name: '{mininet-image}'
269 count: '{mininet-vms}'
271 # Macro: integration-openstack-controller-devstack
272 # Operation: this macro will spin the controller and devstack vms
273 # Used by: {project}-csit-openstack job templates
275 name: integration-openstack-controller-devstack
279 - cloud-name: 'ODLRPC'
280 template-name: '{controller-image}'
281 count: '{controller-vms}'
282 - cloud-name: 'ODLRPC'
283 template-name: '{openstack-image}'
284 count: '{openstack-vms}'
290 # Macro: integration-get-apex-addresses
291 # Operation: this macro gets the IP addresses of the dynamic vms from apex snapshots
292 # Used by: {project}-csit-* apex related job templates
295 name: integration-get-apex-addresses
297 - shell: !include-raw: integration-get-apex-addresses.sh
299 # Macro: integration-apex-run-tests
300 # Operation: this macro just runs the robot suites
301 # Used by: {project}-csit-* apex related job templates
304 name: integration-apex-run-tests
306 - shell: !include-raw: integration-apex-run-tests.sh
308 # Macro: integration-get-slave-addresses
309 # Operation: this macro gets the IP addresses of the dynamic vms
310 # Used by: {project}-csit-* job templates
313 name: integration-get-slave-addresses
315 - shell: !include-raw: integration-get-slave-addresses.sh
318 name: integration-set-variables
319 # Operation: Construct variables not requiring online detection and export using set_variables.env
320 # Required bash variables:
321 # KARAF_VERSION: 'karaf4' or 'karaf3'. Use distribution-karaf-version macro to set.
323 - shell: !include-raw: integration-set-variables.sh
325 properties-file: set_variables.env
328 name: integration-detect-variables
329 # Operation: Construct variables including online detection and export using detect_variables.env
330 # This calls integration-set-variables internally.
331 # Required bash variables:
332 # KARAF_VERSION: 'karaf4' or 'karaf3'. Use distribution-karaf-version macro to set.
334 - integration-set-variables
335 - shell: !include-raw: integration-detect-variables.sh
337 properties-file: detect_variables.env
339 # Macro: integration-deply-controller-run-test
340 # Operation: this macro deploys single contoller and runs test
341 # Used by: {project}-csit-1node-* job templates
344 name: integration-deploy-controller-run-test
346 - shell: !include-raw: integration-deploy-controller-run-test.sh
348 # Macro: integration-configure-clustering
349 # Operation: this macro configures the clustering
350 # Used by: {project}-csit-3node-* job templates
353 name: integration-configure-clustering
355 - shell: !include-raw: integration-configure-clustering.sh
357 # Macro: integration-start-cluster-run-test
358 # Operation: this macro starts the 3-node cluster and runs test
359 # Used by: {project}-csit-3node-* job templates
362 name: integration-start-cluster-run-test
364 - shell: !include-raw: integration-start-cluster-run-test.sh
366 # Macro: integration-install-robotframework
367 # Operation: Installs robotframework using pip to a virtualenv
368 # Used by: {project}-csit-* job templates
371 name: integration-install-robotframework
373 - shell: !include-raw: integration-install-robotframework.sh
375 # Macro: integration-cleanup-tmp
376 # Operation: Cleans up temporary files created by build
377 # Used by: {project}-csit-* job templates
380 name: integration-cleanup-tmp
382 - shell: !include-raw: integration-cleanup-tmp.sh
384 # Macro: integration-multipatch-builder
385 # Operation: checks out multiple patches and builds custom distribution
386 # Used by: integration-multipatch-test-* job templates
389 name: integration-multipatch-builder
391 - shell: !include-raw: multipatch-distribution.sh
393 # Macro: integration-cleanup-workspace
394 # Operation: Cleans up files possibly left there by the previous build
395 # Used by: {project}-csit-* job templates
398 name: integration-cleanup-workspace
400 - shell: !include-raw: integration-cleanup-workspace.sh
402 # Macro: integration-rebase-patch
403 # Operation: For cloned project, rebase checked-out Gerrit patch onto $DISTROBRANCH.
404 # Used by: integration-patch-distribution-* job template
407 name: integration-rebase-gerrit-patch
409 - shell: !include-raw: integration-rebase-gerrit-patch.sh
411 # Macro: integration-install-common-functions
412 # Operation: Copy the common-functions.sh script to csit nodes
413 # Used by: {project}-csit-* job templates
415 name: integration-install-common-functions
417 - shell: !include-raw:
418 - copy-common-functions.sh
419 - common-functions.sh
422 name: integration-deploy-openstack-run-test
424 - shell: !include-raw:
425 - integration-deploy-openstack-run-test.sh
428 name: integration-apex-image-manager
430 - shell: !include-raw:
431 - ../opendaylight-infra-apex-image-management.sh
434 name: integration-compare-distributions
435 # Operation: will compare an already created distribtion (probably last
436 # published to nexus) to the current distribution being created.
437 # The comparison is done to find the list of patches that are new to the
438 # current distribution.
439 # Required bash variables:
440 # KARAF_ARTIFACT: 'karaf' or 'distribution-karaf'. Use integration-set-variables.
442 - shell: !include-raw: integration-compare-distributions.sh
445 name: integration-upload-distribution
446 # Upload distribution karaf artifact to Nexus SNAPSHOT repo for testing.
448 # {dist-pom} path to pom file containing the version
449 # Required bash variables:
450 # KARAF_VERSION: 'karaf4' or 'karaf3'.
451 # Use distribution-karaf-version macro to customize.
453 - config-file-provider:
455 - file-id: global-settings
456 variable: GLOBAL_SETTINGS_FILE
457 - file-id: integration-settings
458 variable: SETTINGS_FILE
459 - integration-set-variables
461 properties-content: BUNDLE_POM={dist-pom}
462 - shell: !include-raw-escape: integration-upload-distribution.sh
464 properties-file: integration-upload-distribution.env
471 name: integration-csit-publish
475 other-files: '{obj:robot_other_files}'
476 unstable-threshold: '{robot-unstable-threshold}'
477 pass-threshold: '{robot-pass-threshold}'
479 - integration-csit-archive-build
480 - integration-csit-run-postscript
481 - releng-openstack-stack-delete
484 name: integration-csit-archive-build
498 echo "Archiving csit artifacts"
501 for i in `seq 1 ${NUM_ODL_SYSTEM}`; do
502 NODE_FOLDER="./archives/odl_${i}"
503 mkdir -p ${NODE_FOLDER}
504 mv odl${i}_* ${NODE_FOLDER} || true
505 mv karaf_${i}_*_threads* ${NODE_FOLDER} || true
506 mv *_${i}.png ${NODE_FOLDER} || true
507 mv /tmp/odl${i}_* ${NODE_FOLDER} || true
509 curl --output robot-plugin.zip "$BUILD_URL/robot/report/*zip*/robot-plugin.zip"
510 unzip -d ./archives robot-plugin.zip
511 mv *.log *.log.gz *.csv *.png ./archives || true # Don't fail if file missing
512 # TODO: Can the following line ever fail?
513 find . -type f -name *.hprof -print0 \
514 | tar -cvf - --null -T - | xz --threads=0 > ./archives/hprof.tar.xz
515 # TODO: Tweak the compression level if better ratio (or speed) is needed.
516 mark-unstable-if-failed: true
520 name: integration-csit-run-postscript
532 - config-file-provider:
534 - file-id: 'odl-elastic-cloud'
535 target: '${HOME}/.netrc'
538 #The following script runs any configurable postplan stored in test/csit/postplans.
539 if [ -f "${WORKSPACE}/test/csit/postplans/${TESTPLAN}" ]; then
540 echo "postplan exists!!!"
541 echo "Changing the postplan path..."
542 script_name=${WORKSPACE}/test/csit/postplans/${TESTPLAN}
543 cat ${script_name} | sed "s:integration:${WORKSPACE}:" > postplan.txt
545 egrep -v '(^[[:space:]]*#|^[[:space:]]*$)' postplan.txt | while read -r line ; do
546 echo "Executing ${line}..."
551 mark-unstable-if-failed: true
554 name: integration-csit-collect-netvirt-logs
567 properties-file: 'slave_addresses.txt'
570 source /tmp/common-functions.sh ${BUNDLEFOLDER}
572 mark-unstable-if-failed: true