Add envs to Bottlenecks docker 89/38589/2
authorYang Yu <Gabriel.yuyang@huawei.com>
Wed, 2 Aug 2017 08:28:28 +0000 (16:28 +0800)
committerYang Yu <Gabriel.yuyang@huawei.com>
Wed, 2 Aug 2017 10:52:43 +0000 (18:52 +0800)
JIRA: BOTTLENECK-158

Pass envs to Bottlenecks docker that used for report

Change-Id: Id7e34533c5fdd81dacaf95bb9321625dd6c8713c
Signed-off-by: Yang Yu <Gabriel.yuyang@huawei.com>
jjb/bottlenecks/bottlenecks-ci-jobs.yml
jjb/bottlenecks/bottlenecks-run-suite.sh

index 455fa72..bb9e0f2 100644 (file)
     parameters:
         - string:
             name: BOTTLENECKS_DB_TARGET
-            default: '104.197.68.199:8086'
+            default: 'testresults.opnfv.org/test/api/v1/results'
             description: 'Arguments to use in order to choose the backend DB'
 
 - parameter:
     parameters:
         - string:
             name: BOTTLENECKS_DB_TARGET
-            default: ''
+            default: 'testresults.opnfv.org/test/api/v1/results'
             description: 'Arguments to use in order to choose the backend DB'
 
 - parameter:
     parameters:
         - string:
             name: BOTTLENECKS_DB_TARGET
-            default: '104.197.68.199:8086'
+            default: 'testresults.opnfv.org/test/api/v1/results'
             description: 'Arguments to use in order to choose the backend DB'
index b81f4ca..06fb5da 100644 (file)
@@ -53,9 +53,14 @@ if [[ $SUITE_NAME == *posca* ]]; then
     docker pull opnfv/bottlenecks:${DOCKER_TAG} >$redirect
 
     opts="--privileged=true -id"
+    envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} \
+          -e NODE_NAME=${NODE_NAME} -e EXTERNAL_NET=${EXTERNAL_NETWORK} \
+          -e BRANCH=${BRANCH} -e GERRIT_REFSPEC_DEBUG=${GERRIT_REFSPEC_DEBUG} \
+          -e BOTTLENECKS_DB_TARGET=${BOTTLENECKS_DB_TARGET} -e PACKAGE_URL=${PACKAGE_URL} \
+          -e DEPLOY_SCENARIO=${DEPLOY_SCENARIO}"
     docker_volume="-v /var/run/docker.sock:/var/run/docker.sock -v /tmp:/tmp"
 
-    cmd="docker run ${opts} --name bottlenecks-load-master ${docker_volume} opnfv/bottlenecks:${DOCKER_TAG} /bin/bash"
+    cmd="docker run ${opts} ${envs} --name bottlenecks-load-master ${docker_volume} opnfv/bottlenecks:${DOCKER_TAG} /bin/bash"
     echo "BOTTLENECKS INFO: running docker run commond: ${cmd}"
     ${cmd} >$redirect
     sleep 5