summaryrefslogtreecommitdiffstats
path: root/jjb
diff options
context:
space:
mode:
authorRyota MIBU <r-mibu@cq.jp.nec.com>2016-08-29 13:50:11 +0900
committerRyota MIBU <r-mibu@cq.jp.nec.com>2016-09-09 12:22:49 +0900
commit675b99e328a11ddc184823e59be9e51e24bad858 (patch)
tree300698c8ccec6d081aefdfc4a6de196e7070a45a /jjb
parent8415c78634e4e9f05361b6995e5357208e64f114 (diff)
add doctor-functest verify job
This patch adds a new jenkins job which will be executed every time doctor patch is uploaded. The code will be verified by executing doctor scenario on the specific pod using functest. JIRA: DOCTOR-70 Change-Id: I480cd905991ccb1ef7426187fe83cbf1ae798ce9 Signed-off-by: Ryota MIBU <r-mibu@cq.jp.nec.com>
Diffstat (limited to 'jjb')
-rw-r--r--jjb/doctor/doctor.yml82
-rw-r--r--jjb/functest/functest-ci-jobs.yml4
-rwxr-xr-xjjb/functest/set-functest-env.sh4
-rw-r--r--jjb/opnfv/slave-params.yml18
4 files changed, 104 insertions, 4 deletions
diff --git a/jjb/doctor/doctor.yml b/jjb/doctor/doctor.yml
index 3b407efc9..ead6c00a1 100644
--- a/jjb/doctor/doctor.yml
+++ b/jjb/doctor/doctor.yml
@@ -3,19 +3,30 @@
project: '{name}'
- jobs:
- - 'doctor-verify-{stream}'
-
stream:
- master:
branch: '{stream}'
gs-pathname: ''
+ docker_tag: 'master'
disabled: false
- colorado:
branch: 'stable/{stream}'
gs-pathname: '/{stream}'
+ docker_tag: 'stable'
disabled: false
+ installer:
+ - apex:
+ slave-label: 'ool-virtual1'
+
+ inspector:
+ - sample
+ - congress
+
+ jobs:
+ - 'doctor-verify-{stream}'
+ - 'doctor-verify-{installer}-{inspector}-{stream}'
+
- job-template:
name: 'doctor-verify-{stream}'
@@ -58,3 +69,68 @@
builders:
- shell: "[ -e tests/run.sh ] && bash -n ./tests/run.sh"
+
+- job-template:
+ name: 'doctor-verify-{installer}-{inspector}-{stream}'
+
+ parameters:
+ - project-parameter:
+ project: '{project}'
+ - gerrit-parameter:
+ branch: '{branch}'
+ - string:
+ name: INSPECTOR_TYPE
+ default: '{inspector}'
+ description: 'Doctor inspector type to be used'
+ - string:
+ name: INSTALLER_TYPE
+ default: apex
+ description: 'OPNFV Installer type'
+ - string:
+ name: OS_CREDS
+ default: /home/jenkins/openstack.creds
+ description: 'OpenStack credentials'
+ - '{installer}-defaults'
+ - '{slave-label}-defaults'
+ - 'functest-suite-parameter'
+ - string:
+ name: DEPLOY_SCENARIO
+ default: 'os-odl_l2-nofeature-ha'
+ - string:
+ name: DOCKER_TAG
+ default: '{docker_tag}'
+ description: 'Tag to pull docker image'
+ - functest-parameter:
+ gs-pathname: '{gs-pathname}'
+
+ scm:
+ - gerrit-trigger-scm:
+ credentials-id: '{ssh-credentials}'
+ refspec: '$GERRIT_REFSPEC'
+ choosing-strategy: 'gerrit'
+
+ triggers:
+ - gerrit:
+ trigger-on:
+ - patchset-created-event:
+ exclude-drafts: 'false'
+ exclude-trivial-rebase: 'false'
+ exclude-no-code-change: 'false'
+ - draft-published-event
+ - comment-added-contains-event:
+ comment-contains-value: 'recheck'
+ - comment-added-contains-event:
+ comment-contains-value: 'reverify'
+ projects:
+ - project-compare-type: 'ANT'
+ project-pattern: '{project}'
+ branches:
+ - branch-compare-type: 'ANT'
+ branch-pattern: '**/{branch}'
+ file-paths:
+ - compare-type: ANT
+ pattern: 'tests/**'
+
+ builders:
+ - 'functest-suite-builder':
+ TESTCASE_OPTIONS: '-e INSPECTOR_TYPE=$INSPECTOR_TYPE -v $WORKSPACE:$HOME/opnfv/repos/doctor'
diff --git a/jjb/functest/functest-ci-jobs.yml b/jjb/functest/functest-ci-jobs.yml
index 0f0cabab3..7120790d8 100644
--- a/jjb/functest/functest-ci-jobs.yml
+++ b/jjb/functest/functest-ci-jobs.yml
@@ -264,6 +264,10 @@
- 'vims'
- 'multisite'
- 'parser'
+ - string:
+ name: TESTCASE_OPTIONS
+ default: ''
+ description: 'Addtional parameters specific to test case(s)'
- parameter:
name: functest-parameter
parameters:
diff --git a/jjb/functest/set-functest-env.sh b/jjb/functest/set-functest-env.sh
index b7d745a79..1c77702eb 100755
--- a/jjb/functest/set-functest-env.sh
+++ b/jjb/functest/set-functest-env.sh
@@ -59,7 +59,9 @@ test -f ${HOME}/opnfv/functest/custom/params_${DOCKER_TAG} && custom_params=$(ca
echo "Functest: Pulling image opnfv/functest:${DOCKER_TAG}"
docker pull opnfv/functest:$DOCKER_TAG >/dev/null
-cmd="sudo docker run --privileged=true -id ${envs} ${labconfig} ${sshkey} ${res_volume} ${custom_params} ${stackrc} opnfv/functest:${DOCKER_TAG} /bin/bash"
+cmd="sudo docker run --privileged=true -id ${envs} ${labconfig} ${sshkey} \
+ ${res_volume} ${custom_params} ${stackrc} ${TESTCASE_OPTIONS} \
+ opnfv/functest:${DOCKER_TAG} /bin/bash"
echo "Functest: Running docker run command: ${cmd}"
${cmd} >${redirect}
sleep 5
diff --git a/jjb/opnfv/slave-params.yml b/jjb/opnfv/slave-params.yml
index c7ec6aa9d..442c4f736 100644
--- a/jjb/opnfv/slave-params.yml
+++ b/jjb/opnfv/slave-params.yml
@@ -635,6 +635,24 @@
name: GIT_BASE
default: https://gerrit.opnfv.org/gerrit/$PROJECT
description: 'Git URL to use on this Jenkins Slave'
+- parameter:
+ name: 'ool-virtual1-defaults'
+ parameters:
+ - node:
+ name: SLAVE_NAME
+ description: 'Slave name on Jenkins'
+ allowed-slaves:
+ - ool-virtual1
+ default-slaves:
+ - ool-virtual1
+ - string:
+ name: GIT_BASE
+ default: https://gerrit.opnfv.org/gerrit/$PROJECT
+ description: 'Git URL to use on this Jenkins Slave'
+ - string:
+ name: SSH_KEY
+ default: /root/.ssh/id_rsa
+ description: 'SSH key to be used'
#####################################################
# These slaves are just dummy slaves for sandbox jobs
#####################################################