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: '{server-name}'
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-csit-only
155 # Operation: this macro sets a trigger on reverse job list
156 # Used by: csit -only- job templates
159 name: integration-csit-only
165 # Macro: integration-csit-all
166 # Operation: this macro sets a periodic trigger
167 # Used by: csit -all- job teamplates
170 name: integration-csit-all
174 # Macro: integration-jclouds-controller-mininet
175 # Operation: this macro will spin the controller and mininet vms
176 # Used by: {project}-csit-* job templates
179 name: integration-jclouds-controller-mininet
183 - '{controller-image}':
185 count: '{controller-vms}'
188 count: '{mininet-vms}'
190 # Macro: integration-openstack-controller-mininet
191 # Operation: this macro will spin the controller and mininet vms
192 # Used by: {project}-csit-* job templates
195 name: integration-openstack-controller-mininet
199 - cloud-name: 'ODLRPC'
200 template-name: '{controller-image}'
201 count: '{controller-vms}'
202 - cloud-name: 'ODLRPC'
203 template-name: '{mininet-image}'
204 count: '{mininet-vms}'
206 # Macro: integration-jclouds-controller-devstack
207 # Operation: this macro will spin the controller and devstack vms
208 # Used by: {project}-csit-openstack job templates
210 name: integration-jclouds-controller-devstack
214 - '{controller-image}':
216 count: '{controller-vms}'
217 - '{openstack-image}':
219 count: '{openstack-vms}'
221 # Macro: integration-openstack-controller-devstack
222 # Operation: this macro will spin the controller and devstack vms
223 # Used by: {project}-csit-openstack job templates
225 name: integration-openstack-controller-devstack
229 - cloud-name: 'ODLRPC'
230 template-name: '{controller-image}'
231 count: '{controller-vms}'
232 - cloud-name: 'ODLRPC'
233 template-name: '{openstack-image}'
234 count: '{openstack-vms}'
236 # Macro: integration-jclouds-controller-docker
237 # Operation: this macro will sping the controller and docker vms
238 # Used by: {project}-csit-docker job templates
240 name: integration-jclouds-controller-docker
244 - '{controller-image}':
246 count: '{controller-vms}'
249 count: '{docker-vms}'
255 # Macro: integration-copy-ssh-keys
256 # Operation: Copy ssh public key used as authentication for robot
257 # Used by: {project}-csit-* job templates
260 name: integration-copy-ssh-keys
264 function copy-ssh-keys-to-slave() {
266 for j in $(seq 1 $RETRIES); do
267 if `ssh-copy-id -i /home/jenkins/.ssh/id_rsa.pub "jenkins@${i}" > /dev/null 2>&1`; then
268 ssh jenkins@${i} 'echo "$(facter ipaddress_eth0) $(/bin/hostname)" | sudo tee -a /etc/hosts'
269 echo "Successfully copied public keys to slave ${i}"
271 elif [ $j -eq $RETRIES ]; then
272 echo "SSH not responding on ${i} after $RETIRES tries. Giving up."
275 echo "SSH not responding on ${i}. Retrying in 10 seconds..."
281 echo "OpenStack IPS are ${JCLOUDS_IPS}"
283 IFS=',' read -ra ADDR <<< "${JCLOUDS_IPS}"
285 for i in "${ADDR[@]}"; do
286 ( copy-ssh-keys-to-slave ) &
287 # Store PID of process
291 # Detect when a process failed to copy ssh keys and fail build
294 echo "Process $p successfully copied ssh keys."
296 echo "Process $p failed to copy ssh keys."
300 echo "Copying ssh keys complete."
302 # Macro: integration-get-slave-addresses
303 # Operation: this macro gets the IP addresses of the dynamic vms
304 # Used by: {project}-csit-* job templates
307 name: integration-get-slave-addresses
311 - include-raw-integration-get-slave-addresses.sh
313 # Macro: integration-get-bundle-vars
314 # Operation: this macro gets all bundle related variables
315 # Used by: {project}-csit-3node-* job templates
318 name: integration-get-bundle-vars
322 - include-raw-integration-get-bundle-vars.sh
324 # Macro: integration-distribution-check
325 # Operation: this macro deploys the controller with all fetures
326 # Used by: {project}-distribution-check-{stream} job template
329 name: integration-distribution-check
333 - include-raw-integration-distribution-check.sh
335 # Macro: integration-deploy-controller-verify
336 # Operation: this macro deploys the controller with all fetures
337 # Used by: integration-distribution-deploy-{stream} job template
340 name: integration-deploy-controller-verify
344 - include-raw-integration-deploy-controller-verify.sh
346 # Macro: integration-deploy-controller-offline
347 # Operation: this macro deploys the controller with no external repo configuration
348 # Used by: integration-distrbution-offline-{stream} job template
351 name: integration-deploy-controller-offline
355 - include-raw-integration-deploy-controller-offline.sh
357 # Macro: integration-deply-controller-run-test
358 # Operation: this macro deploys single contoller and runs test
359 # Used by: {project}-csit-1node-* job templates
362 name: integration-deploy-controller-run-test
366 - include-raw-integration-deploy-controller-run-test.sh
368 # Macro: integration-configure-clustering
369 # Operation: this macro configures the clustering
370 # Used by: {project}-csit-3node-* job templates
373 name: integration-configure-clustering
377 - include-raw-integration-configure-clustering.sh
379 # Macro: integration-start-cluster-run-test
380 # Operation: this macro starts the 3-node cluster and runs test
381 # Used by: {project}-csit-3node-* job templates
384 name: integration-start-cluster-run-test
388 - include-raw-integration-start-cluster-run-test.sh
390 # Macro: integration-get-bundle-url
391 # Operation: this macro gets the job generated distribution URL from distribution pom.xml
392 # Used by: integration-patch-test-{stream} job template
395 name: integration-get-bundle-url
399 - include-raw-integration-get-bundle-url.sh
401 # Macro: integration-get-bundle-url-root
402 # Operation: this macro gets the job generated distribution URL from root pom.xml
403 # Used by: integration-distribution-verify-{stream} job template
406 name: integration-get-bundle-url-root
410 - include-raw-integration-get-bundle-url-root.sh
412 # Macro: integration-install-robotframework
413 # Operation: Installs robotframework using pip to a virtualenv
414 # Used by: {project}-csit-* job templates
417 name: integration-install-robotframework
421 - include-raw-integration-install-robotframework.sh
423 # Macro: integration-cleanup-tmp
424 # Operation: Cleans up temporary files created by build
425 # Used by: {project}-csit-* job templates
428 name: integration-cleanup-tmp
432 - include-raw-integration-cleanup-tmp.sh
434 # Macro: integration-multipatch-builder
435 # Operation: checks out multiple patches and builds custom distribution
436 # Used by: integration-multipatch-test-* job templates
439 name: integration-multipatch-builder
443 - include-raw-integration-multipatch-distribution-test.sh
445 # Macro: integration-cleanup-worspace
446 # Operation: Cleans up files possibly left there by the previous build
447 # Used by: {project}-csit-* job templates
450 name: integration-cleanup-workspace
454 - include-raw-integration-cleanup-workspace.sh
456 # Macro: integration-rebase-patch
457 # Operation: For cloned project, rebase checked-out Gerrit patch onto $BRANCH.
458 # Used by: integration-patch-distribution-* job template
461 name: integration-rebase-gerrit-patch
465 - include-raw-integration-rebase-gerrit-patch.sh
468 name: integration-deploy-openstack-run-test
472 - include-raw-integration-deploy-openstack-run-test.sh
477 # Macro: integration-robot
478 # Operation: this macro publishes robot results
479 # Used by: {project}-csit-* job templates
482 name: integration-robot
487 unstable-threshold: '{unstable-if}'
488 pass-threshold: '{pass-if}'
492 name: integration-robot-tempest
497 - tempest_results.html
498 unstable-threshold: '{unstable-if}'
499 pass-threshold: '{pass-if}'
503 name: integration-csit-archive-build
509 mkdir $WORKSPACE/archives
510 curl --output robot-plugin.zip "$BUILD_URL/robot/report/*zip*/robot-plugin.zip"
511 unzip -d $WORKSPACE/archives robot-plugin.zip
512 mv *log* *.log *.log.gz *.csv *.png $WORKSPACE/archives || true # Don't fail if file missing
513 script-only-if-succeeded: False
514 script-only-if-failed: False
515 mark-unstable-if-failed: True