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: '{git-url}/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
263 # TODO: Remove this macro. This code is moved into the new macro opendaylight-infra-stack
266 name: integration-copy-ssh-keys
270 function copy-ssh-keys-to-slave() {
272 for j in $(seq 1 $RETRIES); do
273 if `ssh-copy-id -i /home/jenkins/.ssh/id_rsa.pub "jenkins@${i}" > /dev/null 2>&1`; then
274 ssh jenkins@${i} 'echo "$(facter ipaddress_eth0) $(/bin/hostname)" | sudo tee -a /etc/hosts'
275 echo "Successfully copied public keys to slave ${i}"
277 elif [ $j -eq $RETRIES ]; then
278 echo "SSH not responding on ${i} after $RETIRES tries. Giving up."
281 echo "SSH not responding on ${i}. Retrying in 10 seconds..."
287 echo "OpenStack IPS are ${JCLOUDS_IPS}"
289 IFS=',' read -ra ADDR <<< "${JCLOUDS_IPS}"
291 for i in "${ADDR[@]}"; do
292 ( copy-ssh-keys-to-slave ) &
293 # Store PID of process
297 # Detect when a process failed to copy ssh keys and fail build
300 echo "Process $p successfully copied ssh keys."
302 echo "Process $p failed to copy ssh keys."
306 echo "Copying ssh keys complete."
308 # Macro: integration-get-slave-addresses
309 # Operation: this macro gets the IP addresses of the dynamic vms
310 # Used by: {project}-csit-* job templates
313 name: integration-get-slave-addresses
317 - include-raw-integration-get-slave-addresses.sh
319 # Macro: integration-get-bundle-vars
320 # Operation: this macro gets all bundle related variables
321 # Used by: {project}-csit-3node-* job templates
324 name: integration-get-bundle-vars
328 - include-raw-integration-get-bundle-vars.sh
330 # Macro: integration-distribution-check
331 # Operation: this macro deploys the controller with all fetures
332 # Used by: {project}-distribution-check-{stream} job template
335 name: integration-distribution-check
339 - include-raw-integration-distribution-check.sh
341 # Macro: integration-deploy-controller-verify
342 # Operation: this macro deploys the controller with all fetures
343 # Used by: integration-distribution-deploy-{stream} job template
346 name: integration-deploy-controller-verify
350 - include-raw-integration-deploy-controller-verify.sh
352 # Macro: integration-deploy-controller-offline
353 # Operation: this macro deploys the controller with no external repo configuration
354 # Used by: integration-distrbution-offline-{stream} job template
357 name: integration-deploy-controller-offline
361 - include-raw-integration-deploy-controller-offline.sh
363 # Macro: integration-deply-controller-run-test
364 # Operation: this macro deploys single contoller and runs test
365 # Used by: {project}-csit-1node-* job templates
368 name: integration-deploy-controller-run-test
372 - include-raw-integration-deploy-controller-run-test.sh
374 # Macro: integration-configure-clustering
375 # Operation: this macro configures the clustering
376 # Used by: {project}-csit-3node-* job templates
379 name: integration-configure-clustering
383 - include-raw-integration-configure-clustering.sh
385 # Macro: integration-start-cluster-run-test
386 # Operation: this macro starts the 3-node cluster and runs test
387 # Used by: {project}-csit-3node-* job templates
390 name: integration-start-cluster-run-test
394 - include-raw-integration-start-cluster-run-test.sh
396 # Macro: integration-get-bundle-url
397 # Operation: this macro gets the job generated distribution URL from distribution pom.xml
398 # Used by: integration-patch-test-{stream} job template
401 name: integration-get-bundle-url
405 - include-raw-integration-get-bundle-url.sh
407 # Macro: integration-get-bundle-url-root
408 # Operation: this macro gets the job generated distribution URL from root pom.xml
409 # Used by: integration-distribution-verify-{stream} job template
412 name: integration-get-bundle-url-root
416 - include-raw-integration-get-bundle-url-root.sh
418 # Macro: integration-install-robotframework
419 # Operation: Installs robotframework using pip to a virtualenv
420 # Used by: {project}-csit-* job templates
423 name: integration-install-robotframework
427 - include-raw-integration-install-robotframework.sh
429 # Macro: integration-cleanup-tmp
430 # Operation: Cleans up temporary files created by build
431 # Used by: {project}-csit-* job templates
434 name: integration-cleanup-tmp
438 - include-raw-integration-cleanup-tmp.sh
440 # Macro: integration-multipatch-builder
441 # Operation: checks out multiple patches and builds custom distribution
442 # Used by: integration-multipatch-test-* job templates
445 name: integration-multipatch-builder
449 - include-raw-integration-multipatch-distribution-test.sh
451 # Macro: integration-cleanup-workspace
452 # Operation: Cleans up files possibly left there by the previous build
453 # Used by: {project}-csit-* job templates
456 name: integration-cleanup-workspace
460 - include-raw-integration-cleanup-workspace.sh
462 # Macro: integration-rebase-patch
463 # Operation: For cloned project, rebase checked-out Gerrit patch onto $BRANCH.
464 # Used by: integration-patch-distribution-* job template
467 name: integration-rebase-gerrit-patch
471 - include-raw-integration-rebase-gerrit-patch.sh
474 name: integration-deploy-openstack-run-test
478 - include-raw-integration-deploy-openstack-run-test.sh
483 # Macro: integration-robot
484 # Operation: this macro publishes robot results
485 # Used by: {project}-csit-* job templates
488 name: integration-robot
493 unstable-threshold: '{unstable-if}'
494 pass-threshold: '{pass-if}'
498 name: integration-robot-tempest
503 - tempest_results.html
504 unstable-threshold: '{unstable-if}'
505 pass-threshold: '{pass-if}'
509 name: integration-csit-archive-build
515 mkdir -p $WORKSPACE/archives
516 curl --output robot-plugin.zip "$BUILD_URL/robot/report/*zip*/robot-plugin.zip"
517 unzip -d $WORKSPACE/archives robot-plugin.zip
518 mv *log* *.log *.log.gz *.csv *.png $WORKSPACE/archives || true # Don't fail if file missing
519 script-only-if-succeeded: False
520 script-only-if-failed: False
521 mark-unstable-if-failed: True