Merge "Concurrent true for opnfv-yamllint-verify-master"
authormei mei <meimei@huawei.com>
Tue, 3 Jan 2017 07:02:08 +0000 (07:02 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Tue, 3 Jan 2017 07:02:08 +0000 (07:02 +0000)
jjb/yardstick/yardstick-ci-jobs.yml
jjb/yardstick/yardstick-daily.sh
utils/fetch_os_creds.sh
utils/push-test-logs.sh

index 33f557a..1ad5417 100644 (file)
         - 'yardstick-cleanup'
         #- 'yardstick-fetch-os-creds'
         - 'yardstick-{testsuite}'
+        - 'yardstick-store-results'
 
     publishers:
         - email:
         - shell:
             !include-raw: ../../utils/fetch_os_creds.sh
 
+- builder:
+    name: yardstick-store-results
+    builders:
+        - shell:
+            !include-raw: ../../utils/push-test-logs.sh
+
 - builder:
     name: yardstick-cleanup
     builders:
index b370541..da9042b 100755 (executable)
@@ -37,8 +37,15 @@ envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} \
 echo "Yardstick: Pulling image opnfv/yardstick:${DOCKER_TAG}"
 docker pull opnfv/yardstick:$DOCKER_TAG >$redirect
 
+# map log directory
+branch=${GIT_BRANCH##*/}
+dir_result="${HOME}/opnfv/yardstick/results/${branch}"
+mkdir -p ${dir_result}
+sudo rm -rf ${dir_result}/*
+map_log_dir="-v ${dir_result}:/tmp/yardstick"
+
 # Run docker
-cmd="sudo docker run ${opts} ${envs} ${labconfig} ${sshkey} opnfv/yardstick:${DOCKER_TAG} \
+cmd="sudo docker run ${opts} ${envs} ${labconfig} ${map_log_dir} ${sshkey} opnfv/yardstick:${DOCKER_TAG} \
     exec_tests.sh ${YARDSTICK_DB_BACKEND} ${YARDSTICK_SCENARIO_SUITE_NAME}"
 echo "Yardstick: Running docker cmd: ${cmd}"
 ${cmd}
index 47fbc91..ecc571d 100755 (executable)
@@ -144,9 +144,17 @@ elif [ "$installer_type" == "compass" ]; then
     sshpass -p root scp 2>/dev/null $ssh_options root@${installer_ip}:~/admin-openrc.sh $dest_path &> /dev/null
 
     info "This file contains the mgmt keystone API, we need the public one for our rc file"
-    public_ip=$(sshpass -p root ssh $ssh_options root@${installer_ip} \
-        "ssh ${controller_ip} 'source /opt/admin-openrc.sh; openstack endpoint show identity '" \
-        | grep publicurl | awk '{print $4}')
+    grep "OS_AUTH_URL.*v2" $dest_path > /dev/null 2>&1
+    if [ $?  -eq 0 ] ; then
+        public_ip=$(sshpass -p root ssh $ssh_options root@${installer_ip} \
+            "ssh ${controller_ip} 'source /opt/admin-openrc.sh; openstack endpoint show identity '" \
+            | grep publicurl | awk '{print $4}')
+    else
+        public_ip=$(sshpass -p root ssh $ssh_options root@${installer_ip} \
+            "ssh ${controller_ip} 'source /opt/admin-openrc.sh; \
+                 openstack endpoint list --interface public --service identity '" \
+            | grep identity | awk '{print $14}')
+    fi
     info "public_ip: $public_ip"
 
 
index 586afce..913748f 100644 (file)
@@ -54,7 +54,7 @@ if [ -d "$dir_result" ]; then
         else
             gsutil ls gs://artifacts.opnfv.org/"$project"/ &>/dev/null
             if [ $? != 0 ]; then
-                echo "Not possible to push results to artifact: gsutil not installed.";
+                echo "Not possible to push results to artifact: some error happened when using gsutil";
             else
                 echo "Uploading logs to artifact $project_artifact"
                 gsutil -m cp -r "$dir_result"/* gs://artifacts.opnfv.org/"$project_artifact"/ >/dev/null 2>&1