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 # This is a single macro to use for all csit jobs who vote on every (relevant) patch set.
124 # Only 'recheck' trigger word is supported, it always triggers the full set of relevant jobs,
125 # in order to prevent Jenkins from starting only a subset and still voting Verified+1.
126 # Contrary to gerrit-trigger-patch-submitted, this votes +1 also on unstable runs.
128 # server: name of gerrit server to listen to
129 # project: pattern to match triggering projects
130 # branch: triggering branch name
131 # files: pattern to match triggering filepaths
133 name: integration-trigger-patch-submitted
136 server-name: '{server}'
138 - patchset-created-event:
139 exclude-drafts: 'true'
140 exclude-trivial-rebase: 'false'
141 exclude-no-code-change: 'true'
142 - draft-published-event
143 - comment-added-contains-event:
144 comment-contains-value: 'recheck'
146 gerrit-build-unstable-verified-value: +1
147 gerrit-build-unstable-codereview-value: 0
149 - project-compare-type: 'ANT'
150 project-pattern: '{project}'
152 - branch-compare-type: 'ANT'
153 branch-pattern: '**/{branch}'
155 - compare-type: 'ANT'
158 # Macro: integration-csit-only
159 # Operation: this macro sets a trigger on reverse job list
160 # Used by: csit -only- job templates
163 name: integration-csit-only
169 # Macro: integration-csit-all
170 # Operation: this macro sets a periodic trigger
171 # Used by: csit -all- job teamplates
174 name: integration-csit-all
178 # Macro: integration-jclouds-controller-mininet
179 # Operation: this macro will spin the controller and mininet vms
180 # Used by: {project}-csit-* job templates
183 name: integration-jclouds-controller-mininet
187 - '{controller-image}':
189 count: '{controller-vms}'
192 count: '{mininet-vms}'
194 # Macro: integration-openstack-controller-mininet
195 # Operation: this macro will spin the controller and mininet vms
196 # Used by: {project}-csit-* job templates
199 name: integration-openstack-controller-mininet
203 - cloud-name: 'ODLRPC'
204 template-name: '{controller-image}'
205 count: '{controller-vms}'
206 - cloud-name: 'ODLRPC'
207 template-name: '{mininet-image}'
208 count: '{mininet-vms}'
210 # Macro: integration-jclouds-controller-devstack
211 # Operation: this macro will spin the controller and devstack vms
212 # Used by: {project}-csit-openstack job templates
214 name: integration-jclouds-controller-devstack
218 - '{controller-image}':
220 count: '{controller-vms}'
221 - '{openstack-image}':
223 count: '{openstack-vms}'
225 # Macro: integration-openstack-controller-devstack
226 # Operation: this macro will spin the controller and devstack vms
227 # Used by: {project}-csit-openstack job templates
229 name: integration-openstack-controller-devstack
233 - cloud-name: 'ODLRPC'
234 template-name: '{controller-image}'
235 count: '{controller-vms}'
236 - cloud-name: 'ODLRPC'
237 template-name: '{openstack-image}'
238 count: '{openstack-vms}'
240 # Macro: integration-jclouds-controller-docker
241 # Operation: this macro will sping the controller and docker vms
242 # Used by: {project}-csit-docker job templates
244 name: integration-jclouds-controller-docker
248 - '{controller-image}':
250 count: '{controller-vms}'
253 count: '{docker-vms}'
259 # Macro: integration-copy-ssh-keys
260 # Operation: Copy ssh public key used as authentication for robot
261 # Used by: {project}-csit-* job templates
264 name: integration-copy-ssh-keys
268 function copy-ssh-keys-to-slave() {
270 for j in $(seq 1 $RETRIES); do
271 if `ssh-copy-id -i /home/jenkins/.ssh/id_rsa.pub "jenkins@${i}" > /dev/null 2>&1`; then
272 ssh jenkins@${i} 'echo "$(facter ipaddress_eth0) $(/bin/hostname)" | sudo tee -a /etc/hosts'
273 echo "Successfully copied public keys to slave ${i}"
275 elif [ $j -eq $RETRIES ]; then
276 echo "SSH not responding on ${i} after $RETIRES tries. Giving up."
279 echo "SSH not responding on ${i}. Retrying in 10 seconds..."
285 echo "OpenStack IPS are ${JCLOUDS_IPS}"
287 IFS=',' read -ra ADDR <<< "${JCLOUDS_IPS}"
289 for i in "${ADDR[@]}"; do
290 ( copy-ssh-keys-to-slave ) &
291 # Store PID of process
295 # Detect when a process failed to copy ssh keys and fail build
298 echo "Process $p successfully copied ssh keys."
300 echo "Process $p failed to copy ssh keys."
304 echo "Copying ssh keys complete."
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
315 - include-raw-integration-get-slave-addresses.sh
317 # Macro: integration-get-bundle-vars
318 # Operation: this macro gets all bundle related variables
319 # Used by: {project}-csit-3node-* job templates
322 name: integration-get-bundle-vars
326 - include-raw-integration-get-bundle-vars.sh
328 # Macro: integration-distribution-check
329 # Operation: this macro deploys the controller with all fetures
330 # Used by: {project}-distribution-check-{stream} job template
333 name: integration-distribution-check
337 - include-raw-integration-distribution-check.sh
339 # Macro: integration-deploy-controller-verify
340 # Operation: this macro deploys the controller with all fetures
341 # Used by: integration-distribution-deploy-{stream} job template
344 name: integration-deploy-controller-verify
348 - include-raw-integration-deploy-controller-verify.sh
350 # Macro: integration-deploy-controller-offline
351 # Operation: this macro deploys the controller with no external repo configuration
352 # Used by: integration-distrbution-offline-{stream} job template
355 name: integration-deploy-controller-offline
359 - include-raw-integration-deploy-controller-offline.sh
361 # Macro: integration-deply-controller-run-test
362 # Operation: this macro deploys single contoller and runs test
363 # Used by: {project}-csit-1node-* job templates
366 name: integration-deploy-controller-run-test
370 - include-raw-integration-deploy-controller-run-test.sh
372 # Macro: integration-configure-clustering
373 # Operation: this macro configures the clustering
374 # Used by: {project}-csit-3node-* job templates
377 name: integration-configure-clustering
381 - include-raw-integration-configure-clustering.sh
383 # Macro: integration-start-cluster-run-test
384 # Operation: this macro starts the 3-node cluster and runs test
385 # Used by: {project}-csit-3node-* job templates
388 name: integration-start-cluster-run-test
392 - include-raw-integration-start-cluster-run-test.sh
394 # Macro: integration-get-bundle-url
395 # Operation: this macro gets the job generated distribution URL from distribution pom.xml
396 # Used by: integration-patch-test-{stream} job template
399 name: integration-get-bundle-url
403 - include-raw-integration-get-bundle-url.sh
405 # Macro: integration-get-bundle-url-root
406 # Operation: this macro gets the job generated distribution URL from root pom.xml
407 # Used by: integration-distribution-verify-{stream} job template
410 name: integration-get-bundle-url-root
414 - include-raw-integration-get-bundle-url-root.sh
416 # Macro: integration-install-robotframework
417 # Operation: Installs robotframework using pip to a virtualenv
418 # Used by: {project}-csit-* job templates
421 name: integration-install-robotframework
425 - include-raw-integration-install-robotframework.sh
427 # Macro: integration-cleanup-tmp
428 # Operation: Cleans up temporary files created by build
429 # Used by: {project}-csit-* job templates
432 name: integration-cleanup-tmp
436 - include-raw-integration-cleanup-tmp.sh
438 # Macro: integration-multipatch-builder
439 # Operation: checks out multiple patches and builds custom distribution
440 # Used by: integration-multipatch-test-* job templates
443 name: integration-multipatch-builder
447 - include-raw-integration-multipatch-distribution-test.sh
449 # Macro: integration-cleanup-worspace
450 # Operation: Cleans up files possibly left there by the previous build
451 # Used by: {project}-csit-* job templates
454 name: integration-cleanup-workspace
458 - include-raw-integration-cleanup-workspace.sh
460 # Macro: integration-rebase-patch
461 # Operation: For cloned project, rebase checked-out Gerrit patch onto $BRANCH.
462 # Used by: integration-patch-distribution-* job template
465 name: integration-rebase-gerrit-patch
469 - include-raw-integration-rebase-gerrit-patch.sh
472 name: integration-deploy-openstack-run-test
476 - include-raw-integration-deploy-openstack-run-test.sh
481 # Macro: integration-robot
482 # Operation: this macro publishes robot results
483 # Used by: {project}-csit-* job templates
486 name: integration-robot
491 unstable-threshold: '{unstable-if}'
492 pass-threshold: '{pass-if}'
496 name: integration-robot-tempest
501 - tempest_results.html
502 unstable-threshold: '{unstable-if}'
503 pass-threshold: '{pass-if}'
507 name: integration-csit-archive-build
513 mkdir -p $WORKSPACE/archives
514 curl --output robot-plugin.zip "$BUILD_URL/robot/report/*zip*/robot-plugin.zip"
515 unzip -d $WORKSPACE/archives robot-plugin.zip
516 mv *log* *.log *.log.gz *.csv *.png $WORKSPACE/archives || true # Don't fail if file missing
517 script-only-if-succeeded: False
518 script-only-if-failed: False
519 mark-unstable-if-failed: True