2 ##############################################################################
3 # Copyright (c) 2015 Huawei Technologies Co.,Ltd and others.
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
13 docker build -t opnfv/bottlenecks ${BOTTLENECKS_TOP_DIR}/ci/docker/bottlenecks-ci/
15 if [ x"${GERRIT_REFSPEC_DEBUG}" != x ]; then
16 opts="--privileged=true"
17 BOTTLENECKS_BRANCH=${GERRIT_REFSPEC_DEBUG}
19 opts="--privileged=true --rm"
20 BOTTLENECKS_BRANCH=${GIT_BRANCH##origin/}
23 envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} -e NODE_NAME=${NODE_NAME} -e EXTERNAL_NET=${EXTERNAL_NETWORK} -e BOTTLENECKS_BRANCH=${BOTTLENECKS_BRANCH} -e GERRIT_REFSPEC_DEBUG=${GERRIT_REFSPEC_DEBUG} -e BOTTLENECKS_DB_TARGET=${BOTTLENECKS_DB_TARGET} -e PACKAGE_URL=${PACKAGE_URL}"
24 volumes="-v ${BOTTLENECKS_TOP_DIR}:${BOTTLENECKS_TOP_DIR}"
25 create_instance=${BOTTLENECKS_TOP_DIR}/utils/infra_setup/heat_template/HOT_create_instance.sh
27 echo ${envs} ${ops} ${volumes}
30 cmd="sudo docker run ${opts} ${envs} ${volumes} opnfv/bottlenecks ${create_instance}"
31 echo "Bottlenecks: Running docker cmd: ${cmd}"
34 echo "Bottlenecks: done!"