Merge "Add auto-report to MongoDB"
authormei mei <meimei@huawei.com>
Fri, 26 May 2017 09:25:58 +0000 (09:25 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Fri, 26 May 2017 09:25:58 +0000 (09:25 +0000)
jjb/apex/apex-deploy.sh
jjb/apex/apex.yml
jjb/apex/apex.yml.j2
jjb/daisy4nfv/daisy-project-jobs.yml
jjb/daisy4nfv/daisy4nfv-merge-jobs.yml
jjb/daisy4nfv/daisy4nfv-verify-jobs.yml
jjb/dovetail/dovetail-run.sh
jjb/global/installer-params.yml
jjb/global/slave-params.yml

index d6bb485..74f67ce 100755 (executable)
@@ -128,7 +128,7 @@ if [[ "$JOB_NAME" =~ "virtual" ]]; then
   if [[ "$JOB_NAME" == *csit* ]]; then
     DEPLOY_CMD="${DEPLOY_CMD} -e csit-environment.yaml"
   fi
-  if [[ "$JOB_NAME" == *promote* ]]; then
+  if [[ "$PROMOTE" == "True" ]]; then
     DEPLOY_CMD="${DEPLOY_CMD} --virtual-computes 2"
   fi
 else
index ae21860..87aa763 100644 (file)
                   kill-phase-on: FAILURE
                   abort-all-job: true
                   git-revision: true
-        - multijob:
-            name: functest-smoke
-            condition: SUCCESSFUL
-            projects:
-              - name: 'functest-apex-virtual-suite-{stream}'
-                current-parameters: false
-                predefined-parameters: |
-                  DEPLOY_SCENARIO={verify-scenario}
-                  FUNCTEST_SUITE_NAME=healthcheck
-                  GERRIT_BRANCH=$GERRIT_BRANCH
-                  GERRIT_REFSPEC=$GERRIT_REFSPEC
-                  GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
-                  GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
-                node-parameters: true
-                kill-phase-on: FAILURE
-                abort-all-job: true
-                git-revision: false
+#        - multijob:
+#            name: functest-smoke
+#            condition: SUCCESSFUL
+#            projects:
+#              - name: 'functest-apex-virtual-suite-{stream}'
+#                current-parameters: false
+#                predefined-parameters: |
+#                  DEPLOY_SCENARIO={verify-scenario}
+#                  FUNCTEST_SUITE_NAME=healthcheck
+#                  GERRIT_BRANCH=$GERRIT_BRANCH
+#                  GERRIT_REFSPEC=$GERRIT_REFSPEC
+#                  GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
+#                  GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
+#                node-parameters: true
+#                kill-phase-on: FAILURE
+#                abort-all-job: true
+#                git-revision: false
 
 # Verify Scenario Gate
 - job-template:
                   kill-phase-on: FAILURE
                   abort-all-job: true
                   git-revision: true
-        - multijob:
-            name: functest-smoke
-            condition: SUCCESSFUL
-            projects:
-              - name: 'functest-apex-virtual-suite-{stream}'
-                current-parameters: false
-                predefined-parameters: |
-                  DEPLOY_SCENARIO={verify-scenario}
-                  FUNCTEST_SUITE_NAME=healthcheck
-                  GERRIT_BRANCH=$GERRIT_BRANCH
-                  GERRIT_REFSPEC=$GERRIT_REFSPEC
-                  GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
-                  GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
-                node-parameters: true
-                kill-phase-on: FAILURE
-                abort-all-job: true
-                git-revision: false
+#        - multijob:
+#            name: functest-smoke
+#            condition: SUCCESSFUL
+#            projects:
+#              - name: 'functest-apex-virtual-suite-{stream}'
+#                current-parameters: false
+#                predefined-parameters: |
+#                  DEPLOY_SCENARIO={verify-scenario}
+#                  FUNCTEST_SUITE_NAME=healthcheck
+#                  GERRIT_BRANCH=$GERRIT_BRANCH
+#                  GERRIT_REFSPEC=$GERRIT_REFSPEC
+#                  GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
+#                  GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
+#                node-parameters: true
+#                kill-phase-on: FAILURE
+#                abort-all-job: true
+#                git-revision: false
 
 - job-template:
     name: 'apex-runner-cperf-{stream}'
                   node-parameters: false
                   current-parameters: true
                   predefined-parameters: |
+                    GERRIT_BRANCH=$GERRIT_BRANCH
+                    GERRIT_REFSPEC=
                     OPNFV_CLEAN=yes
                     DEPLOY_SCENARIO={verify-scenario}
                   kill-phase-on: FAILURE
                   abort-all-job: true
                   git-revision: false
         - multijob:
-            name: Functest
-            condition: ALWAYS
+            name: CPERF
+            condition: SUCCESSFUL
             projects:
-                - name: 'functest-apex-baremetal-daily-{stream}'
+                - name: 'cperf-apex-intel-pod2-daily-master'
                   node-parameters: true
                   current-parameters: false
                   predefined-parameters:
 
     wrappers:
         - timeout:
-            timeout: 90
+            timeout: 150
             fail: true
 
     properties:
                     GERRIT_REFSPEC=$GERRIT_REFSPEC
                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
+                    PROMOTE=True
                   node-parameters: true
                   kill-phase-on: FAILURE
                   abort-all-job: true
                     GERRIT_REFSPEC=$GERRIT_REFSPEC
                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
+                    PROMOTE=True
                   node-parameters: true
                   kill-phase-on: FAILURE
                   abort-all-job: true
             name: GS_URL
             default: $GS_BASE{gs-pathname}
             description: "URL to Google Storage."
+        - string:
+            name: PROMOTE
+            default: 'False'
+            description: "Flag to know if we should promote/upload snapshot artifacts."
 
 ########################
 # builder macros
index 3f10e21..3bebf85 100644 (file)
                   kill-phase-on: FAILURE
                   abort-all-job: true
                   git-revision: true
-        - multijob:
-            name: functest-smoke
-            condition: SUCCESSFUL
-            projects:
-              - name: 'functest-apex-virtual-suite-{stream}'
-                current-parameters: false
-                predefined-parameters: |
-                  DEPLOY_SCENARIO={verify-scenario}
-                  FUNCTEST_SUITE_NAME=healthcheck
-                  GERRIT_BRANCH=$GERRIT_BRANCH
-                  GERRIT_REFSPEC=$GERRIT_REFSPEC
-                  GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
-                  GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
-                node-parameters: true
-                kill-phase-on: FAILURE
-                abort-all-job: true
-                git-revision: false
+#        - multijob:
+#            name: functest-smoke
+#            condition: SUCCESSFUL
+#            projects:
+#              - name: 'functest-apex-virtual-suite-{stream}'
+#                current-parameters: false
+#                predefined-parameters: |
+#                  DEPLOY_SCENARIO={verify-scenario}
+#                  FUNCTEST_SUITE_NAME=healthcheck
+#                  GERRIT_BRANCH=$GERRIT_BRANCH
+#                  GERRIT_REFSPEC=$GERRIT_REFSPEC
+#                  GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
+#                  GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
+#                node-parameters: true
+#                kill-phase-on: FAILURE
+#                abort-all-job: true
+#                git-revision: false
 
 # Verify Scenario Gate
 - job-template:
                   kill-phase-on: FAILURE
                   abort-all-job: true
                   git-revision: true
-        - multijob:
-            name: functest-smoke
-            condition: SUCCESSFUL
-            projects:
-              - name: 'functest-apex-virtual-suite-{stream}'
-                current-parameters: false
-                predefined-parameters: |
-                  DEPLOY_SCENARIO={verify-scenario}
-                  FUNCTEST_SUITE_NAME=healthcheck
-                  GERRIT_BRANCH=$GERRIT_BRANCH
-                  GERRIT_REFSPEC=$GERRIT_REFSPEC
-                  GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
-                  GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
-                node-parameters: true
-                kill-phase-on: FAILURE
-                abort-all-job: true
-                git-revision: false
+#        - multijob:
+#            name: functest-smoke
+#            condition: SUCCESSFUL
+#            projects:
+#              - name: 'functest-apex-virtual-suite-{stream}'
+#                current-parameters: false
+#                predefined-parameters: |
+#                  DEPLOY_SCENARIO={verify-scenario}
+#                  FUNCTEST_SUITE_NAME=healthcheck
+#                  GERRIT_BRANCH=$GERRIT_BRANCH
+#                  GERRIT_REFSPEC=$GERRIT_REFSPEC
+#                  GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
+#                  GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
+#                node-parameters: true
+#                kill-phase-on: FAILURE
+#                abort-all-job: true
+#                git-revision: false
 
 - job-template:
     name: 'apex-runner-cperf-{stream}'
                   node-parameters: false
                   current-parameters: true
                   predefined-parameters: |
+                    GERRIT_BRANCH=$GERRIT_BRANCH
+                    GERRIT_REFSPEC=
                     OPNFV_CLEAN=yes
                     DEPLOY_SCENARIO={verify-scenario}
                   kill-phase-on: FAILURE
                   abort-all-job: true
                   git-revision: false
         - multijob:
-            name: Functest
-            condition: ALWAYS
+            name: CPERF
+            condition: SUCCESSFUL
             projects:
-                - name: 'functest-apex-baremetal-daily-{stream}'
+                - name: 'cperf-apex-intel-pod2-daily-master'
                   node-parameters: true
                   current-parameters: false
                   predefined-parameters:
 
     wrappers:
         - timeout:
-            timeout: 90
+            timeout: 150
             fail: true
 
     properties:
                     GERRIT_REFSPEC=$GERRIT_REFSPEC
                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
+                    PROMOTE=True
                   node-parameters: true
                   kill-phase-on: FAILURE
                   abort-all-job: true
                     GERRIT_REFSPEC=$GERRIT_REFSPEC
                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
+                    PROMOTE=True
                   node-parameters: true
                   kill-phase-on: FAILURE
                   abort-all-job: true
             name: GS_URL
             default: $GS_BASE{gs-pathname}
             description: "URL to Google Storage."
+        - string:
+            name: PROMOTE
+            default: 'False'
+            description: "Flag to know if we should promote/upload snapshot artifacts."
 
 ########################
 # builder macros
index e631ee9..0a9d43d 100644 (file)
@@ -71,7 +71,7 @@
             project: '{project}'
             branch: '{branch}'
         - 'opnfv-build-centos-defaults'
-        - 'daisy-defaults'
+        - '{installer}-defaults'
         - '{installer}-project-parameter':
             gs-pathname: '{gs-pathname}'
 
         - project-parameter:
             project: '{project}'
             branch: '{branch}'
-        - 'daisy-defaults'
+        - '{installer}-defaults'
+        - '{slave-label}-defaults'
         - string:
             name: GIT_BASE
             default: https://gerrit.opnfv.org/gerrit/$PROJECT
         - string:
             name: DEPLOY_SCENARIO
             default: 'os-nosdn-nofeature-ha'
-        - 'daisy-defaults'
-        - '{slave-label}-defaults'
         - '{installer}-project-parameter':
             gs-pathname: '{gs-pathname}'
 
index 9e7b867..561ffbe 100644 (file)
             enabled: true
             max-total: 4
             option: 'project'
+        - build-blocker:
+            use-build-blocker: true
+            blocking-jobs:
+                - '{alias}-merge-(master|danube)'
+            block-level: 'NODE'
 
     scm:
         - git-scm
         - build-blocker:
             use-build-blocker: true
             blocking-jobs:
-                - '{alias}-merge-(master|danube)'
+                - '{alias}-merge-{phase}-.*'
             block-level: 'NODE'
 
     scm:
         - project-parameter:
             project: '{project}'
             branch: '{branch}'
+        - '{installer}-defaults'
         - '{slave-label}-defaults'
         - '{alias}-merge-defaults':
             gs-pathname: '{gs-pathname}'
index 6335c33..dff0ff0 100644 (file)
             enabled: true
             max-total: 4
             option: 'project'
+        - build-blocker:
+            use-build-blocker: true
+            blocking-jobs:
+                - '{installer}-merge-build-.*'
+            block-level: 'NODE'
+
     scm:
         - git-scm-gerrit
     wrappers:
             enabled: true
             max-total: 6
             option: 'project'
+        - build-blocker:
+            use-build-blocker: true
+            blocking-jobs:
+                - '{installer}-merge-build-.*'
+                - '{alias}-verify-build-.*'
+            block-level: 'NODE'
+
     scm:
         - git-scm-gerrit
     wrappers:
         - project-parameter:
             project: '{project}'
             branch: '{branch}'
+        - '{installer}-defaults'
         - '{slave-label}-defaults'
         - '{alias}-verify-defaults':
             gs-pathname: '{gs-pathname}'
+
     builders:
         - description-setter:
             description: "Built on $NODE_NAME"
index 3ad67b6..f323a8a 100755 (executable)
@@ -6,9 +6,19 @@
 set -e
 [[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null"
 
+DOVETAIL_HOME=/home/opnfv/cvp
+if [ -d ${DOVETAIL_HOME} ]; then
+    sudo rm -rf ${DOVETAIL_HOME}/*
+else
+    sudo mkdir -p ${DOVETAIL_HOME}
+fi
+
+DOVETAIL_CONFIG=${DOVETAIL_HOME}/pre_config
+sudo mkdir -p ${DOVETAIL_CONFIG}
+
 sshkey=""
 # The path of openrc.sh is defined in fetch_os_creds.sh
-OPENRC=$WORKSPACE/opnfv-openrc.sh
+OPENRC=${DOVETAIL_CONFIG}/env_config.sh
 if [[ ${INSTALLER_TYPE} == 'apex' ]]; then
     instack_mac=$(sudo virsh domiflist undercloud | grep default | \
                   grep -Eo "[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+")
@@ -37,7 +47,7 @@ releng_repo=${WORKSPACE}/releng
 git clone https://gerrit.opnfv.org/gerrit/releng ${releng_repo} >/dev/null
 
 if [[ ${INSTALLER_TYPE} != 'joid' ]]; then
-    ${releng_repo}/utils/fetch_os_creds.sh -d ${OPENRC} -i ${INSTALLER_TYPE} -a ${INSTALLER_IP} >${redirect}
+    sudo /bin/bash ${releng_repo}/utils/fetch_os_creds.sh -d ${OPENRC} -i ${INSTALLER_TYPE} -a ${INSTALLER_IP} >${redirect}
 fi
 
 if [[ -f $OPENRC ]]; then
@@ -65,13 +75,8 @@ else
     echo "HA test cases may not run properly."
 fi
 
-pod_file_dir="/home/opnfv/dovetail/userconfig"
-if [ -d ${pod_file_dir} ]; then
-    sudo rm -rf ${pod_file_dir}/*
-else
-    sudo mkdir -p ${pod_file_dir}
-fi
-cmd="sudo python ${releng_repo}/utils/create_pod_file.py -t ${INSTALLER_TYPE} -i ${INSTALLER_IP} ${options} -f ${pod_file_dir}/pod.yaml"
+cmd="sudo python ${releng_repo}/utils/create_pod_file.py -t ${INSTALLER_TYPE} \
+     -i ${INSTALLER_IP} ${options} -f ${DOVETAIL_CONFIG}/pod.yaml"
 echo ${cmd}
 ${cmd}
 
@@ -79,11 +84,11 @@ deactivate
 
 cd ${WORKSPACE}
 
-if [ -f ${pod_file_dir}/pod.yaml ]; then
-    echo "file ${pod_file_dir}/pod.yaml:"
-    cat ${pod_file_dir}/pod.yaml
+if [ -f ${DOVETAIL_CONFIG}/pod.yaml ]; then
+    echo "file ${DOVETAIL_CONFIG}/pod.yaml:"
+    cat ${DOVETAIL_CONFIG}/pod.yaml
 else
-    echo "Error: There doesn't exist file ${pod_file_dir}/pod.yaml."
+    echo "Error: There doesn't exist file ${DOVETAIL_CONFIG}/pod.yaml."
     echo "HA test cases may not run properly."
 fi
 
@@ -91,20 +96,19 @@ ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
 
 if [ "$INSTALLER_TYPE" == "fuel" ]; then
     echo "Fetching id_rsa file from jump_server $INSTALLER_IP..."
-    sshpass -p r00tme sudo scp $ssh_options root@${INSTALLER_IP}:~/.ssh/id_rsa ${pod_file_dir}/id_rsa
+    sshpass -p r00tme sudo scp $ssh_options root@${INSTALLER_IP}:~/.ssh/id_rsa ${DOVETAIL_CONFIG}/id_rsa
 fi
 
 opts="--privileged=true -id"
-results_envs="-v /var/run/docker.sock:/var/run/docker.sock \
-              -v /home/opnfv/dovetail/results:/home/opnfv/dovetail/results"
-openrc_volume="-v ${OPENRC}:${OPENRC}"
-userconfig_volume="-v ${pod_file_dir}:${pod_file_dir}"
+
+docker_volume="-v /var/run/docker.sock:/var/run/docker.sock"
+dovetail_home_volume="-v ${DOVETAIL_HOME}:${DOVETAIL_HOME}"
 
 # Pull the image with correct tag
 echo "Dovetail: Pulling image opnfv/dovetail:${DOCKER_TAG}"
 docker pull opnfv/dovetail:$DOCKER_TAG >$redirect
 
-cmd="docker run ${opts} ${results_envs} ${openrc_volume} ${userconfig_volume} \
+cmd="docker run ${opts} -e ${DOVETAIL_HOME} ${docker_volume} ${dovetail_home_volume} \
      ${sshkey} opnfv/dovetail:${DOCKER_TAG} /bin/bash"
 echo "Dovetail: running docker run command: ${cmd}"
 ${cmd} >${redirect}
@@ -126,13 +130,13 @@ if [ $(docker ps | grep "opnfv/dovetail:${DOCKER_TAG}" | wc -l) == 0 ]; then
 fi
 
 list_cmd="dovetail list ${TESTSUITE}"
-run_cmd="dovetail run --openrc ${OPENRC} --testsuite ${TESTSUITE} -d"
+run_cmd="dovetail run --testsuite ${TESTSUITE} -d"
 echo "Container exec command: ${list_cmd}"
 docker exec $container_id ${list_cmd}
 echo "Container exec command: ${run_cmd}"
 docker exec $container_id ${run_cmd}
 
-sudo cp -r ${DOVETAIL_REPO_DIR}/results ./
+sudo cp -r ${DOVETAIL_HOME}/results ./
 # To make sure the file owner is the current user, for the copied results files in the above line
 # if not, there will be error when next time to wipe workspace
 # CURRENT_USER=${SUDO_USER:-$USER}
index fc9f34a..40fc42c 100644 (file)
     parameters:
         - string:
             name: INSTALLER_IP
-            default: '10.20.0.2'
+            default: '10.20.7.3'
             description: 'IP of the installer'
         - string:
             name: INSTALLER_TYPE
             default: daisy
             description: 'Installer used for deploying OPNFV on this POD'
+        - string:
+            name: BRIDGE
+            default: 'br7'
+            description: 'pxe bridge for booting of Fuel master'
 
 - parameter:
     name: 'infra-defaults'
index 44666a7..cdc08ea 100644 (file)
         - label:
             name: SLAVE_LABEL
             default: 'daisy-baremetal'
+        - string:
+            name: INSTALLER_IP
+            default: '10.20.11.2'
+            description: 'IP of the installer'
         - string:
             name: GIT_BASE
             default: https://gerrit.opnfv.org/gerrit/$PROJECT
         - label:
             name: SLAVE_LABEL
             default: 'daisy-virtual'
+        - string:
+            name: INSTALLER_IP
+            default: '10.20.11.2'
+            description: 'IP of the installer'
+        - string:
+            name: BRIDGE
+            default: 'daisy1'
+            description: 'pxe bridge for booting of Fuel master'
         - string:
             name: GIT_BASE
             default: https://gerrit.opnfv.org/gerrit/$PROJECT
             description: 'Git URL to use on this Jenkins Slave'
         - string:
             name: INSTALLER_IP
-            default: '10.20.7.2'
+            default: '10.20.7.3'
             description: 'IP of the installer'
         - string:
             name: BRIDGE