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
289 # Macro: integration-get-slave-addresses
290 # Operation: this macro gets the IP addresses of the dynamic vms
291 # Used by: {project}-csit-* job templates
294 name: integration-get-slave-addresses
296 - shell: !include-raw: integration-get-slave-addresses.sh
299 name: integration-set-variables
300 # Operation: Construct variables not requiring online detection and export using set_variables.env
301 # Required bash variables:
302 # KARAF_VERSION: 'karaf4' or 'karaf3'. Use distribution-karaf-version macro to set.
304 - shell: !include-raw: integration-set-variables.sh
306 properties-file: set_variables.env
309 name: integration-detect-variables
310 # Operation: Construct variables including online detection and export using detect_variables.env
311 # This calls integration-set-variables internally.
312 # Required bash variables:
313 # KARAF_VERSION: 'karaf4' or 'karaf3'. Use distribution-karaf-version macro to set.
315 - integration-set-variables
316 - shell: !include-raw: integration-detect-variables.sh
318 properties-file: detect_variables.env
320 # Macro: integration-deply-controller-run-test
321 # Operation: this macro deploys single contoller and runs test
322 # Used by: {project}-csit-1node-* job templates
325 name: integration-deploy-controller-run-test
327 - shell: !include-raw: integration-deploy-controller-run-test.sh
329 # Macro: integration-deply-non-karaf-controller-run-test
330 # Operation: this macro deploys non-karaf controller application and run test
331 # Used by: {project}-csit-1node-* job templates
334 name: integration-run-test
336 - shell: !include-raw: integration-run-test.sh
338 # Macro: integration-configure-clustering
339 # Operation: this macro configures the clustering
340 # Used by: {project}-csit-3node-* job templates
343 name: integration-configure-clustering
345 - shell: !include-raw: integration-configure-clustering.sh
347 # Macro: integration-start-cluster-run-test
348 # Operation: this macro starts the 3-node cluster and runs test
349 # Used by: {project}-csit-3node-* job templates
352 name: integration-start-cluster-run-test
354 - shell: !include-raw: integration-start-cluster-run-test.sh
356 # Macro: integration-install-robotframework
357 # Operation: Installs robotframework using pip to a virtualenv
358 # Used by: {project}-csit-* job templates
361 name: integration-install-robotframework
363 - shell: !include-raw: integration-install-robotframework.sh
365 # Macro: integration-cleanup-tmp
366 # Operation: Cleans up temporary files created by build
367 # Used by: {project}-csit-* job templates
370 name: integration-cleanup-tmp
372 - shell: !include-raw: integration-cleanup-tmp.sh
374 # Macro: integration-multipatch-builder
375 # Operation: checks out multiple patches and builds custom distribution
376 # Used by: integration-multipatch-test-* job templates
379 name: integration-multipatch-builder
381 - shell: !include-raw: multipatch-distribution.sh
383 # Macro: integration-rebase-patch
384 # Operation: For cloned project, rebase checked-out Gerrit patch onto $DISTROBRANCH.
385 # Used by: integration-patch-distribution-* job template
388 name: integration-rebase-gerrit-patch
390 - shell: !include-raw: integration-rebase-gerrit-patch.sh
392 # Macro: integration-install-common-functions
393 # Operation: Copy the common-functions.sh script to csit nodes
394 # Used by: {project}-csit-* job templates
396 name: integration-install-common-functions
398 - shell: !include-raw:
399 - copy-common-functions.sh
400 - common-functions.sh
403 name: integration-compare-distributions
404 # Operation: will compare an already created distribtion (probably last
405 # published to nexus) to the current distribution being created.
406 # The comparison is done to find the list of patches that are new to the
407 # current distribution.
408 # Required bash variables:
409 # KARAF_ARTIFACT: 'karaf' or 'distribution-karaf'. Use integration-set-variables.
411 - shell: !include-raw: integration-compare-distributions.sh
414 name: integration-upload-distribution
415 # Upload distribution karaf artifact to Nexus SNAPSHOT repo for testing.
417 # {dist-pom} path to pom file containing the version
418 # Required bash variables:
419 # KARAF_VERSION: 'karaf4' or 'karaf3'.
420 # Use distribution-karaf-version macro to customize.
422 - config-file-provider:
424 - file-id: global-settings
425 variable: GLOBAL_SETTINGS_FILE
426 - file-id: "{settings-project}-settings"
427 variable: SETTINGS_FILE
428 - integration-set-variables
430 properties-content: BUNDLE_POM={dist-pom}
431 - shell: !include-raw-escape: integration-upload-distribution.sh
433 properties-file: integration-upload-distribution.env
440 name: integration-csit-publish
444 other-files: "{obj:robot_other_files}"
445 unstable-threshold: "{robot-unstable-threshold}"
446 pass-threshold: "{robot-pass-threshold}"
448 - integration-csit-archive-build
449 - integration-csit-run-postscript
452 name: integration-csit-archive-build
466 echo "Archiving csit artifacts"
469 for i in `seq 1 ${NUM_ODL_SYSTEM}`; do
470 NODE_FOLDER="./archives/odl_${i}"
471 mkdir -p ${NODE_FOLDER}
472 mv odl${i}_* ${NODE_FOLDER} || true
473 mv karaf_${i}_*_threads* ${NODE_FOLDER} || true
474 mv *_${i}.png ${NODE_FOLDER} || true
475 mv /tmp/odl${i}_* ${NODE_FOLDER} || true
476 mv gclogs-${i} ${NODE_FOLDER} || true
478 curl --output robot-plugin.zip "$BUILD_URL/robot/report/*zip*/robot-plugin.zip"
479 unzip -d ./archives robot-plugin.zip
480 mv *.log *.log.gz *.csv *.png ./archives || true # Don't fail if file missing
481 # TODO: Can the following line ever fail?
482 find . -type f -name *.hprof -print0 \
483 | tar -cvf - --null -T - | xz --threads=0 > ./archives/hprof.tar.xz
484 # TODO: Tweak the compression level if better ratio (or speed) is needed.
485 mark-unstable-if-failed: true
488 name: integration-csit-run-postscript
502 #The following script runs any configurable postplan stored in test/csit/postplans.
503 if [ -f "${WORKSPACE}/test/csit/postplans/${TESTPLAN}" ]; then
504 echo "postplan exists!!!"
505 echo "Changing the postplan path..."
506 script_name=${WORKSPACE}/test/csit/postplans/${TESTPLAN}
507 cat ${script_name} | sed "s:integration:${WORKSPACE}:" > postplan.txt
509 egrep -v '(^[[:space:]]*#|^[[:space:]]*$)' postplan.txt | while read -r line ; do
510 echo "Executing ${line}..."
514 mark-unstable-if-failed: true