1 ###################################
2 # job configuration for functest
3 ###################################
10 installer_type: 'fuel'
11 installer_ip: '10.20.0.2'
12 functest_repo_dir: '/home/opnfv/repos/functest'
15 installer_type: 'foreman'
16 installer_ip: '172.30.10.73'
17 functest_repo_dir: '/home/opnfv/repos/functest'
21 installer_type: 'foreman'
22 installer_ip: '172.30.10.73'
23 functest_repo_dir: '/home/opnfv/repos/functest'
26 - 'set-functest-env-{pod}'
28 - 'clean-functest-env-{pod}'
29 - 'set-functest-env-{installer}-{stream}'
30 - 'functest-{installer}-{stream}'
31 - 'clean-functest-env-{installer}-{stream}'
32 - 'functest-openstack-bench-test-{pod}'
33 - 'functest-openstack-tempest-smoke-test-{pod}'
34 - 'functest-odl-test-{pod}'
35 - 'functest-vims-{installer}-{stream}'
36 - 'functest-vping-test-{pod}'
37 - 'functest-daily-{stream}'
38 - 'functest-merge-{stream}'
39 - 'functest-verify-{stream}'
41 # stream: branch with - in place of / (eg. stable-arno)
42 # branch: branch (eg. stable/arno)
53 ################################
55 ################################
57 name: set-functest-env-{pod}
59 project-type: freestyle
66 artifactDaysToKeep: -1
75 name: clean-functest-env-{pod}
77 project-type: freestyle
84 artifactDaysToKeep: -1
92 name: set-functest-env-{installer}-{stream}
94 project-type: freestyle
101 artifactDaysToKeep: -1
102 artifactNumToKeep: -1
109 name: clean-functest-env-{installer}-{stream}
111 project-type: freestyle
118 artifactDaysToKeep: -1
119 artifactNumToKeep: -1
125 name: functest-openstack-bench-test-{pod}
127 project-type: freestyle
134 artifactDaysToKeep: -1
135 artifactNumToKeep: -1
138 - 'functest-rally-bench'
142 name: functest-openstack-tempest-smoke-test-{pod}
144 project-type: freestyle
151 artifactDaysToKeep: -1
152 artifactNumToKeep: -1
155 - 'functest-tempest-smoke'
158 name: functest-odl-test-{pod}
160 project-type: freestyle
167 artifactDaysToKeep: -1
168 artifactNumToKeep: -1
176 name: functest-vping-test-{pod}
178 project-type: freestyle
185 artifactDaysToKeep: -1
186 artifactNumToKeep: -1
195 project-type: freestyle
204 default: '{installer_type}'
205 description: "Installer name that is used for deployment."
208 default: '{installer_ip}'
209 description: "Installer IP."
211 name: FUNCTEST_REPO_DIR
212 default: '{functest_repo_dir}'
213 description: "Directory where the root functest repo is cloned in the docker."
218 credentials-id: '{ssh-credentials}'
225 artifactDaysToKeep: -1
226 artifactNumToKeep: -1
231 - 'functest-store-results'
235 name: functest-{installer}-{stream}
237 project-type: freestyle
246 default: '{installer_type}'
247 description: "Installer name that is used for deployment."
250 default: '{installer_ip}'
251 description: "Installer IP."
253 name: FUNCTEST_REPO_DIR
254 default: '{functest_repo_dir}'
255 description: "Directory where the root functest repo is cloned in the docker."
258 default: ssh://gerrit.opnfv.org:29418/$PROJECT
259 description: "Override GIT_BASE"
263 credentials-id: '{ssh-credentials}'
270 artifactDaysToKeep: -1
271 artifactNumToKeep: -1
276 - 'functest-store-results'
280 name: functest-vims-{installer}-{stream}
282 project-type: freestyle
291 default: '{installer_type}'
292 description: "Installer name that is used for deployment."
295 default: '{installer_ip}'
296 description: "Installer IP."
298 name: FUNCTEST_REPO_DIR
299 default: '{functest_repo_dir}'
300 description: "Directory where the root functest repo is cloned in the docker."
303 default: ssh://gerrit.opnfv.org:29418/$PROJECT
304 description: "Override GIT_BASE"
308 credentials-id: '{ssh-credentials}'
315 artifactDaysToKeep: -1
316 artifactNumToKeep: -1
322 name: 'functest-daily-{stream}'
326 # Job template for daily builders
328 # Required Variables:
329 # stream: branch with - in place of / (eg. stable)
330 # branch: branch (eg. stable)
332 project-type: freestyle
333 varsetabove: '{somevar}'
336 daysToKeep: '{build-days-to-keep}'
337 numToKeep: '{build-num-to-keep}'
338 artifactDaysToKeep: '{build-artifact-days-to-keep}'
339 artifactNumToKeep: '{build-artifact-num-to-keep}'
344 - functest-parameter:
345 gs-pathname: '{gs-pathname}'
349 credentials-id: '{ssh-credentials}'
354 - ssh-agent-credentials:
355 user: '{ssh-credentials}'
358 - 'functest-{stream}'
365 !include-raw ../opnfvdocs/docu-build.sh
371 name: 'functest-verify-{stream}'
375 project-type: freestyle
380 artifactDaysToKeep: -1
381 artifactNumToKeep: -1
389 - gerrit-trigger-scm:
390 credentials-id: '{ssh-credentials}'
391 refspec: '$GERRIT_REFSPEC'
392 choosing-strategy: 'gerrit'
395 - ssh-agent-credentials:
396 user: '{ssh-credentials}'
401 - patchset-created-event:
402 exclude-drafts: 'false'
403 exclude-trivial-rebase: 'false'
404 exclude-no-code-change: 'false'
405 - draft-published-event
406 - comment-added-contains-event:
407 comment-contains-value: 'recheck'
408 - comment-added-contains-event:
409 comment-contains-value: 'reverify'
411 - project-compare-type: 'ANT'
412 project-pattern: 'functest'
414 - branch-compare-type: 'ANT'
415 branch-pattern: '**/{branch}'
419 !include-raw ../opnfvdocs/docu-build.sh
422 name: 'functest-merge-{stream}'
426 # builder-merge job to run JJB update
428 # This job's purpose is to update all the JJB
430 project-type: freestyle
435 artifactDaysToKeep: -1
445 - gerrit-trigger-scm:
446 credentials-id: '{ssh-credentials}'
448 choosing-strategy: 'default'
451 - ssh-agent-credentials:
452 user: '{ssh-credentials}'
457 - change-merged-event
458 - comment-added-contains-event:
459 comment-contains-value: 'remerge'
461 - project-compare-type: 'ANT'
462 project-pattern: 'functest'
464 - branch-compare-type: 'ANT'
465 branch-pattern: '**/{branch}'
469 !include-raw ../opnfvdocs/docu-build.sh
471 ########################
473 ########################
475 name: functest-parameter
479 default: '{gs-pathname}'
480 description: "Version directory where the opnfv documents will be stored in gs repository"
487 default: https://gerrit.opnfv.org/gerrit/$PROJECT
488 description: "Override GIT_BASE"
495 default: ssh://gerrit.opnfv.org:29418/$PROJECT
496 description: "Override GIT_BASE"
503 default: ssh://gerrit.opnfv.org:29418/$PROJECT
504 description: "Override GIT_BASE"
505 ########################
507 ########################
509 name: 'functest-master'
511 - pollscm: "H 9 * * *"
514 name: 'functest-stable-arno'
516 - pollscm: "H 21 * * *"
518 ########################
520 ########################
529 echo "Functest: running all the tests"
530 cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh"
531 container_id=$(docker ps -a | grep opnfv/functest | awk '{print $1}' | head -1)
532 docker exec $container_id $cmd
536 name: set-functest-env
542 echo "Functest: Start Docker and prepare environment"
543 envs="INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP}"
544 docker ps -a | grep opnfv/functest | awk '{print $1}' | xargs docker rm -f &>/dev/null
545 docker pull opnfv/functest
546 echo "Functest: Running docker run command: docker run -i -e $envs opnfv/functest /bin/bash &"
547 docker run -i -e $envs opnfv/functest /bin/bash &
550 container_id=$(docker ps -a | grep opnfv/functest | awk '{print $1}' | head -1)
551 echo "Container ID=${container_id}"
552 if [ -z ${container_id} ]; then
553 echo "Cannot find opnfv/functest container ID ${container_id}. Please check if it is existing."
557 echo "Starting the container: docker start ${container_id}"
558 docker start ${container_id}
561 if [ $(docker ps | grep opnfv/functest | wc -l) == 0 ]; then
562 echo "The container opnfv/functest with ID=${container_id} has not been properly started. Exiting..."
565 cmd="${FUNCTEST_REPO_DIR}/docker/prepare_env.sh"
566 echo "Executing command inside the docker: ${cmd}"
567 docker exec ${container_id} ${cmd}
577 echo "Functest: run vPing"
578 cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh --test vping"
579 container_id=$(docker ps -a | grep opnfv/functest | awk '{print $1}' | head -1)
580 docker exec $container_id $cmd
589 echo "Functest: run ODL suite"
590 cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh --test odl"
591 container_id=$(docker ps -a | grep opnfv/functest | awk '{print $1}' | head -1)
592 docker exec $container_id $cmd
595 name: functest-tempest-smoke
602 echo "Functest: run Tempest suite"
603 cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh --test tempest"
604 container_id=$(docker ps -a | grep opnfv/functest | awk '{print $1}' | head -1)
605 docker exec $container_id $cmd
610 name: functest-rally-bench
616 echo "Functest: run Functest Rally Bench suites"
617 cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh --test rally"
618 container_id=$(docker ps -a | grep opnfv/functest | awk '{print $1}' | head -1)
619 docker exec $container_id $cmd
629 echo "Functest: run Functest vIMS test"
630 cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh --test vims"
631 container_id=$(docker ps -a | grep opnfv/functest | awk '{print $1}' | head -1)
632 docker exec $container_id $cmd
637 name: functest-store-results
640 !include-raw res-build.sh
643 name: functest-cleanup
649 # cleanup: remove any docker containers leftovers
650 echo "Removing the docker container..."
651 docker rm -f $(docker ps | grep opnfv/functest | awk '{print $1}')
652 echo "Removing the docker image..."
653 docker rmi -f $(docker images | grep opnfv/functest | awk '{print $3}')