2 name: integration-branch
7 description: 'Distribution GIT branch'
10 name: integration-bundleurl
14 default: '{bundleurl}'
15 description: 'URL to karaf distribution zip'
18 name: integration-jdk-version
22 default: '{jdkversion}'
23 description: 'Parameter to indicate JAVA Version'
26 name: integration-controller-scope
30 default: '{controller-scope}'
31 description: 'Feature Only or Feature All test'
34 name: integration-controller-features
37 name: CONTROLLERFEATURES
38 default: '{controller-features}'
39 description: 'Features to install in the controller separated by comma'
42 name: integration-distribution-stream
47 description: 'Distribution stream string, for suites to know which behavior to expect'
50 name: integration-stream-test-plan
54 default: '{stream-test-plan}'
55 description: 'Stream-specific test plan we will run'
58 name: integration-test-plan
62 default: '{test-plan}'
63 description: 'General test plan we will run unless stream-specific one is found'
66 name: integration-test-options
70 default: '{test-options}'
71 description: 'Robot command options'
74 name: integration-distribution-git-url
78 default: 'ssh://jenkins-$SILO@git.opendaylight.org:29418/integration/distribution'
79 description: 'Distribution GIT URL (do not modify)'
82 name: integration-patch-refspec
87 description: 'Integration Patch Refspec'
89 # Macro: integration-gerrit-scm
90 # Operation: this macro downloads a project gerrit
91 # Used by: all csit jobs
94 name: integration-gerrit-scm
97 credentials-id: 'opendaylight-jenkins-ssh'
104 choosing-strategy: 'gerrit'
106 # Macro: integration-distribution-scm
107 # Operation: this macro downloads the integration/distribution repo using distribution as basedir
108 # Used by: integration-patch-test-{stream} job template
111 name: integration-distribution-scm
114 credentials-id: 'opendaylight-jenkins-ssh'
115 basedir: 'distribution'
122 # Macro: integration-trigger-patch-submitted
123 # Operation: this macro sets a trigger for patch submitted on a path pattern
124 # Used by: {project}-verify-csit-* job templates
127 name: integration-trigger-patch-submitted
130 server-name: 'OpenDaylight'
132 - patchset-created-event:
133 exclude-drafts: 'true'
134 exclude-trivial-rebase: 'false'
135 exclude-no-code-change: 'true'
136 - draft-published-event
137 - comment-added-contains-event:
138 comment-contains-value: 'recheck'
139 - comment-added-contains-event:
140 comment-contains-value: 'reverify'
142 gerrit-build-unstable-verified-value: +1
143 gerrit-build-unstable-codereview-value: 0
145 - project-compare-type: 'ANT'
146 project-pattern: '{name}'
148 - branch-compare-type: 'ANT'
149 branch-pattern: '**/{branch}'
151 - compare-type: 'ANT'
154 # Macro: integration-trigger-patch-merged
155 # Operation: this macro sets a trigger for patch merged on a path pattern
156 # Used by: not used yet
159 name: integration-trigger-patch-merged
162 server-name: 'OpenDaylight'
164 - change-merged-event
165 - comment-added-contains-event:
166 comment-contains-value: 'remerge'
168 - project-compare-type: 'ANT'
169 project-pattern: '{name}'
171 - branch-compare-type: 'ANT'
172 branch-pattern: '**/{branch}'
174 - compare-type: 'ANT'
177 # Macro: integration-csit-only
178 # Operation: this macro sets a trigger on reverse job list
179 # Used by: csit -only- job templates
182 name: integration-csit-only
188 # Macro: integration-csit-all
189 # Operation: this macro sets a periodic trigger
190 # Used by: csit -all- job teamplates
193 name: integration-csit-all
197 # Macro: integration-jclouds-controller-mininet
198 # Operation: this macro will spin the controller and mininet vms
199 # Used by: {project}-csit-* job templates
202 name: integration-jclouds-controller-mininet
206 - '{controller-image}':
208 count: '{controller-vms}'
211 count: '{mininet-vms}'
213 # Macro: integration-openstack-controller-mininet
214 # Operation: this macro will spin the controller and mininet vms
215 # Used by: {project}-csit-* job templates
218 name: integration-openstack-controller-mininet
222 - cloud-name: 'ODLRPC'
223 template-name: '{controller-image}'
224 count: '{controller-vms}'
225 - cloud-name: 'ODLRPC'
226 template-name: '{mininet-image}'
227 count: '{mininet-vms}'
229 # Macro: integration-jclouds-controller-devstack
230 # Operation: this macro will spin the controller and devstack vms
231 # Used by: {project}-csit-openstack job templates
233 name: integration-jclouds-controller-devstack
237 - '{controller-image}':
239 count: '{controller-vms}'
240 - '{openstack-image}':
242 count: '{openstack-vms}'
244 # Macro: integration-openstack-controller-devstack
245 # Operation: this macro will spin the controller and devstack vms
246 # Used by: {project}-csit-openstack job templates
248 name: integration-openstack-controller-devstack
252 - cloud-name: 'ODLRPC'
253 template-name: '{controller-image}'
254 count: '{controller-vms}'
255 - cloud-name: 'ODLRPC'
256 template-name: '{openstack-image}'
257 count: '{openstack-vms}'
259 # Macro: integration-jclouds-controller-docker
260 # Operation: this macro will sping the controller and docker vms
261 # Used by: {project}-csit-docker job templates
263 name: integration-jclouds-controller-docker
267 - '{controller-image}':
269 count: '{controller-vms}'
272 count: '{docker-vms}'
278 # Macro: integration-copy-ssh-keys
279 # Operation: Copy ssh public key used as authentication for robot
280 # Used by: {project}-csit-* job templates
283 name: integration-copy-ssh-keys
287 function copy-ssh-keys-to-slave() {
289 for j in $(seq 1 $RETRIES); do
290 if `ssh-copy-id -i /home/jenkins/.ssh/id_rsa.pub "jenkins@${i}" > /dev/null 2>&1`; then
291 ssh jenkins@${i} 'echo "$(facter ipaddress_eth0) $(/bin/hostname)" | sudo tee -a /etc/hosts'
292 echo "Successfully copied public keys to slave ${i}"
294 elif [ $j -eq $RETRIES ]; then
295 echo "SSH not responding on ${i} after $RETIRES tries. Giving up."
298 echo "SSH not responding on ${i}. Retrying in 10 seconds..."
304 echo "OpenStack IPS are ${JCLOUDS_IPS}"
306 IFS=',' read -ra ADDR <<< "${JCLOUDS_IPS}"
308 for i in "${ADDR[@]}"; do
309 copy-ssh-keys-to-slave &
313 echo "Copying ssh keys complete."
315 # Macro: integration-get-slave-addresses
316 # Operation: this macro gets the IP addresses of the dynamic vms
317 # Used by: {project}-csit-* job templates
320 name: integration-get-slave-addresses
324 - include-raw-integration-get-slave-addresses.sh
326 # Macro: integration-get-bundle-vars
327 # Operation: this macro gets all bundle related variables
328 # Used by: {project}-csit-3node-* job templates
331 name: integration-get-bundle-vars
335 - include-raw-integration-get-bundle-vars.sh
337 # Macro: integration-distribution-check
338 # Operation: this macro deploys the controller with all fetures
339 # Used by: {project}-distribution-check-{stream} job template
342 name: integration-distribution-check
346 - include-raw-integration-distribution-check.sh
348 # Macro: integration-deploy-controller-verify
349 # Operation: this macro deploys the controller with all fetures
350 # Used by: integration-distribution-deploy-{stream} job template
353 name: integration-deploy-controller-verify
357 - include-raw-integration-deploy-controller-verify.sh
359 # Macro: integration-deploy-controller-offline
360 # Operation: this macro deploys the controller with no external repo configuration
361 # Used by: integration-distrbution-offline-{stream} job template
364 name: integration-deploy-controller-offline
368 - include-raw-integration-deploy-controller-offline.sh
370 # Macro: integration-deply-controller-run-test
371 # Operation: this macro deploys single contoller and runs test
372 # Used by: {project}-csit-1node-* job templates
375 name: integration-deploy-controller-run-test
379 - include-raw-integration-deploy-controller-run-test.sh
381 # Macro: integration-configure-clustering
382 # Operation: this macro configures the clustering
383 # Used by: {project}-csit-3node-* job templates
386 name: integration-configure-clustering
390 - include-raw-integration-configure-clustering.sh
392 # Macro: integration-start-cluster-run-test
393 # Operation: this macro starts the 3-node cluster and runs test
394 # Used by: {project}-csit-3node-* job templates
397 name: integration-start-cluster-run-test
401 - include-raw-integration-start-cluster-run-test.sh
403 # Macro: integration-get-bundle-url
404 # Operation: this macro gets the job generated distribution URL from distribution pom.xml
405 # Used by: integration-patch-test-{stream} job template
408 name: integration-get-bundle-url
412 - include-raw-integration-get-bundle-url.sh
414 # Macro: integration-get-bundle-url-root
415 # Operation: this macro gets the job generated distribution URL from root pom.xml
416 # Used by: integration-distribution-verify-{stream} job template
419 name: integration-get-bundle-url-root
423 - include-raw-integration-get-bundle-url-root.sh
425 # Macro: integration-install-robotframework
426 # Operation: Installs robotframework using pip to a virtualenv
427 # Used by: {project}-csit-* job templates
430 name: integration-install-robotframework
434 - include-raw-integration-install-robotframework.sh
436 # Macro: integration-cleanup-tmp
437 # Operation: Cleans up temporary files created by build
438 # Used by: {project}-csit-* job templates
441 name: integration-cleanup-tmp
445 - include-raw-integration-cleanup-tmp.sh
447 # Macro: integration-multipatch-builder
448 # Operation: checks out multiple patches and builds custom distribution
449 # Used by: integration-multipatch-test-* job templates
452 name: integration-multipatch-builder
456 - include-raw-integration-multipatch-distribution-test.sh
458 # Macro: integration-cleanup-worspace
459 # Operation: Cleans up files possibly left there by the previous build
460 # Used by: {project}-csit-* job templates
463 name: integration-cleanup-workspace
467 - include-raw-integration-cleanup-workspace.sh
469 # Macro: integration-rebase-patch
470 # Operation: For cloned project, rebase checked-out Gerrit patch onto $BRANCH.
471 # Used by: integration-patch-distribution-* job template
474 name: integration-rebase-gerrit-patch
478 - include-raw-integration-rebase-gerrit-patch.sh
481 name: integration-deploy-openstack-run-test
485 - include-raw-integration-deploy-openstack-run-test.sh
490 # Macro: integration-robot
491 # Operation: this macro publishes robot results
492 # Used by: {project}-csit-* job templates
495 name: integration-robot
500 unstable-threshold: '{unstable-if}'
501 pass-threshold: '{pass-if}'
505 name: integration-robot-tempest
510 - tempest_results.html
511 unstable-threshold: '{unstable-if}'
512 pass-threshold: '{pass-if}'
516 name: integration-csit-archive-build
522 mkdir $WORKSPACE/archives
523 curl --output robot-plugin.zip "$BUILD_URL/robot/report/*zip*/robot-plugin.zip"
524 unzip -d $WORKSPACE/archives robot-plugin.zip
525 mv *log* *.log *.csv *.png $WORKSPACE/archives || true # Don't fail if file missing
526 script-only-if-succeeded: False
527 script-only-if-failed: False
528 mark-unstable-if-failed: True