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}'
79 description: 'URL to karaf distribution zip'
82 name: integration-repo-url
87 description: 'URL to feature repo artifact'
90 name: integration-jdk-version
94 default: '{jdkversion}'
95 description: 'Parameter to indicate JAVA Version'
98 name: integration-distribution-stream
103 description: 'Distribution stream string, for suites to know which behavior to expect'
106 name: integration-script-plan
110 default: '{script-plan}'
111 description: 'Script plan we will run before downloading and un-archiving am ODL distribution'
114 name: integration-config-plan
118 default: '{config-plan}'
119 description: 'Config plan we will run after un-archiving and starting an ODL distribution'
122 name: integration-stream-test-plan
126 default: '{stream-test-plan}'
127 description: 'Stream-specific test plan we will run'
130 name: integration-test-plan
134 default: '{test-plan}'
135 description: 'General test plan we will run unless stream-specific one is found'
138 name: integration-test-suites
142 default: '{test-suites}'
144 List of space-separated suites. Useful when running specific suites within a testplan.
145 Do not include ${{WORKSPACE}}/test/csit/suites/ in the values:
146 (ex. openstack/connectivity/l2.robot openstack/clustering/ha_l2.robot
147 openstack/tempest/tempest.robot netvirt/elan/elan.robot).
150 name: integration-test-options
154 default: '{test-options}'
155 description: 'Robot command options'
158 name: integration-distribution-git-url
162 default: '{git-url}/integration/distribution'
163 description: 'Distribution GIT URL (do not modify)'
166 name: integration-patch-refspec
171 description: 'Integration Patch Refspec'
173 # Macro: integration-gerrit-scm
174 # Operation: this macro downloads a project gerrit
175 # Used by: all csit jobs
178 name: integration-gerrit-scm
181 credentials-id: 'opendaylight-jenkins-ssh'
188 choosing-strategy: 'gerrit'
190 # Macro: integration-distribution-scm
191 # Operation: this macro downloads the integration/distribution repo using distribution as basedir
192 # Used by: integration-patch-test-{stream} job template
195 name: integration-distribution-scm
198 credentials-id: 'opendaylight-jenkins-ssh'
199 basedir: 'distribution'
206 # Macro: integration-trigger-patch-submitted
207 # This is a single macro to use for all csit jobs who vote on every (relevant) patch set.
208 # Only 'recheck' trigger word is supported, it always triggers the full set of relevant jobs,
209 # in order to prevent Jenkins from starting only a subset and still voting Verified+1.
210 # Contrary to gerrit-trigger-patch-submitted, this votes +1 also on unstable runs.
212 # gerrit-server-name: name of gerrit server to listen to
213 # project: pattern to match triggering projects
214 # branch: triggering branch name
215 # files: pattern to match triggering filepaths
217 name: integration-trigger-patch-submitted
220 server-name: '{gerrit-server-name}'
222 - patchset-created-event:
224 exclude-trivial-rebase: false
225 exclude-no-code-change: false
226 - draft-published-event
227 - comment-added-contains-event:
228 comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
230 gerrit-build-unstable-verified-value: +1
231 gerrit-build-unstable-codereview-value: 0
233 - project-compare-type: ANT
234 project-pattern: '{project}'
236 - branch-compare-type: ANT
237 branch-pattern: '**/{branch}'
242 # Macro: integration-csit-only
243 # Operation: this macro sets a trigger on reverse job list
244 # Used by: csit -only- job templates
247 name: integration-csit-trigger
253 # Macro: integration-openstack-controller-mininet
254 # Operation: this macro will spin the controller and mininet vms
255 # Used by: {project}-csit-* job templates
258 name: integration-openstack-controller-mininet
262 - cloud-name: 'ODLRPC'
263 template-name: '{controller-image}'
264 count: '{controller-vms}'
265 - cloud-name: 'ODLRPC'
266 template-name: '{mininet-image}'
267 count: '{mininet-vms}'
269 # Macro: integration-openstack-controller-devstack
270 # Operation: this macro will spin the controller and devstack vms
271 # Used by: {project}-csit-openstack job templates
273 name: integration-openstack-controller-devstack
277 - cloud-name: 'ODLRPC'
278 template-name: '{controller-image}'
279 count: '{controller-vms}'
280 - cloud-name: 'ODLRPC'
281 template-name: '{openstack-image}'
282 count: '{openstack-vms}'
288 # Macro: integration-get-apex-addresses
289 # Operation: this macro gets the IP addresses of the dynamic vms from apex snapshots
290 # Used by: {project}-csit-* apex related job templates
293 name: integration-get-apex-addresses
295 - shell: !include-raw: integration-get-apex-addresses.sh
297 # Macro: integration-apex-run-tests
298 # Operation: this macro just runs the robot suites
299 # Used by: {project}-csit-* apex related job templates
302 name: integration-apex-run-tests
304 - shell: !include-raw: integration-apex-run-tests.sh
306 # Macro: integration-get-slave-addresses
307 # Operation: this macro gets the IP addresses of the dynamic vms
308 # Used by: {project}-csit-* job templates
311 name: integration-get-slave-addresses
313 - shell: !include-raw: integration-get-slave-addresses.sh
316 name: integration-set-variables
317 # Operation: Construct variables not requiring online detection and export using set_variables.env
318 # Required bash variables:
319 # KARAF_VERSION: 'karaf4' or 'karaf3'. Use distribution-karaf-version macro to set.
321 - shell: !include-raw: integration-set-variables.sh
323 properties-file: set_variables.env
326 name: integration-detect-variables
327 # Operation: Construct variables including online detection and export using detect_variables.env
328 # This calls integration-set-variables internally.
329 # Required bash variables:
330 # KARAF_VERSION: 'karaf4' or 'karaf3'. Use distribution-karaf-version macro to set.
332 - integration-set-variables
333 - shell: !include-raw: integration-detect-variables.sh
335 properties-file: detect_variables.env
337 # Macro: integration-deply-controller-run-test
338 # Operation: this macro deploys single contoller and runs test
339 # Used by: {project}-csit-1node-* job templates
342 name: integration-deploy-controller-run-test
344 - shell: !include-raw: integration-deploy-controller-run-test.sh
346 # Macro: integration-configure-clustering
347 # Operation: this macro configures the clustering
348 # Used by: {project}-csit-3node-* job templates
351 name: integration-configure-clustering
353 - shell: !include-raw: integration-configure-clustering.sh
355 # Macro: integration-start-cluster-run-test
356 # Operation: this macro starts the 3-node cluster and runs test
357 # Used by: {project}-csit-3node-* job templates
360 name: integration-start-cluster-run-test
362 - shell: !include-raw: integration-start-cluster-run-test.sh
364 # Macro: integration-install-robotframework
365 # Operation: Installs robotframework using pip to a virtualenv
366 # Used by: {project}-csit-* job templates
369 name: integration-install-robotframework
371 - shell: !include-raw: integration-install-robotframework.sh
373 # Macro: integration-cleanup-tmp
374 # Operation: Cleans up temporary files created by build
375 # Used by: {project}-csit-* job templates
378 name: integration-cleanup-tmp
380 - shell: !include-raw: integration-cleanup-tmp.sh
382 # Macro: integration-multipatch-builder
383 # Operation: checks out multiple patches and builds custom distribution
384 # Used by: integration-multipatch-test-* job templates
387 name: integration-multipatch-builder
389 - shell: !include-raw: multipatch-distribution.sh
391 # Macro: integration-cleanup-workspace
392 # Operation: Cleans up files possibly left there by the previous build
393 # Used by: {project}-csit-* job templates
396 name: integration-cleanup-workspace
398 - shell: !include-raw: integration-cleanup-workspace.sh
400 # Macro: integration-rebase-patch
401 # Operation: For cloned project, rebase checked-out Gerrit patch onto $DISTROBRANCH.
402 # Used by: integration-patch-distribution-* job template
405 name: integration-rebase-gerrit-patch
407 - shell: !include-raw: integration-rebase-gerrit-patch.sh
409 # Macro: integration-install-common-functions
410 # Operation: Copy the common-functions.sh script to csit nodes
411 # Used by: {project}-csit-* job templates
413 name: integration-install-common-functions
415 - shell: !include-raw:
416 - copy-common-functions.sh
417 - common-functions.sh
420 name: integration-deploy-openstack-run-test
422 - shell: !include-raw:
423 - integration-deploy-openstack-run-test.sh
426 name: integration-apex-image-manager
428 - shell: !include-raw:
429 - ../opendaylight-infra-apex-image-management.sh
432 name: integration-compare-distributions
433 # Operation: will compare an already created distribtion (probably last
434 # published to nexus) to the current distribution being created.
435 # The comparison is done to find the list of patches that are new to the
436 # current distribution.
437 # Required bash variables:
438 # KARAF_ARTIFACT: 'karaf' or 'distribution-karaf'. Use integration-set-variables.
440 - shell: !include-raw: integration-compare-distributions.sh
443 name: integration-upload-distribution
444 # Upload distribution karaf artifact to Nexus SNAPSHOT repo for testing.
446 # {dist-pom} path to pom file containing the version
447 # Required bash variables:
448 # KARAF_VERSION: 'karaf4' or 'karaf3'.
449 # Use distribution-karaf-version macro to customize.
451 - config-file-provider:
453 - file-id: global-settings
454 variable: GLOBAL_SETTINGS_FILE
455 - file-id: integration-settings
456 variable: SETTINGS_FILE
457 - integration-set-variables
459 properties-content: BUNDLE_POM={dist-pom}
460 - shell: !include-raw-escape: integration-upload-distribution.sh
462 properties-file: integration-upload-distribution.env
469 name: integration-csit-publish
473 other-files: '{obj:robot_other_files}'
474 unstable-threshold: '{robot-unstable-threshold}'
475 pass-threshold: '{robot-pass-threshold}'
477 - integration-csit-archive-build
478 - integration-csit-run-postscript
479 - releng-openstack-stack-delete
482 name: integration-csit-archive-build
496 echo "Archiving csit artifacts"
499 for i in `seq 1 ${NUM_ODL_SYSTEM}`; do
500 NODE_FOLDER="./archives/odl_${i}"
501 mkdir -p ${NODE_FOLDER}
502 mv odl${i}_* ${NODE_FOLDER} || true
503 mv karaf_${i}_*_threads* ${NODE_FOLDER} || true
504 mv *_${i}.png ${NODE_FOLDER} || true
505 mv /tmp/odl${i}_* ${NODE_FOLDER} || true
507 curl --output robot-plugin.zip "$BUILD_URL/robot/report/*zip*/robot-plugin.zip"
508 unzip -d ./archives robot-plugin.zip
509 mv *.log *.log.gz *.csv *.png ./archives || true # Don't fail if file missing
510 # TODO: Can the following line ever fail?
511 find . -type f -name *.hprof -print0 \
512 | tar -cvf - --null -T - | xz --threads=0 > ./archives/hprof.tar.xz
513 # TODO: Tweak the compression level if better ratio (or speed) is needed.
514 mark-unstable-if-failed: true
518 name: integration-csit-run-postscript
530 - config-file-provider:
532 - file-id: 'odl-elastic-cloud'
533 target: '${HOME}/.netrc'
536 #The following script runs any configurable postplan stored in test/csit/postplans.
537 if [ -f "${WORKSPACE}/test/csit/postplans/${TESTPLAN}" ]; then
538 echo "postplan exists!!!"
539 echo "Changing the postplan path..."
540 script_name=${WORKSPACE}/test/csit/postplans/${TESTPLAN}
541 cat ${script_name} | sed "s:integration:${WORKSPACE}:" > postplan.txt
543 egrep -v '(^[[:space:]]*#|^[[:space:]]*$)' postplan.txt | while read -r line ; do
544 echo "Executing ${line}..."
549 mark-unstable-if-failed: true
552 name: integration-csit-collect-netvirt-logs
565 properties-file: 'slave_addresses.txt'
568 source /tmp/common-functions.sh ${BUNDLEFOLDER}
570 mark-unstable-if-failed: true