2 ##############################################################################
3 ## Copyright (c) 2015 Intel Corp.
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 ###############################################################################
12 echo "Usage: ${0} rpmdir image_dir"
16 if [[ $# -ne 2 ]]; then
23 ROOT_DIR=$(cd $(dirname "$0")/.. && pwd)
24 ENVDIR=${ROOT_DIR}/ci/envs/
29 # We should have already remove running containers when pull the image
30 docker rmi opnfv/yardstick
33 # Make sure we have latest image
34 docker ps | grep opnfv/yardstick-ci |\
35 awk '{print $1}' | xargs -r docker stop &>/dev/null
36 docker ps -a | grep opnfv/yardstick |\
37 awk '{print $1}' | xargs -r docker rm &>/dev/null
38 docker pull opnfv/yardstick
44 -e "INSTALLER_TYPE=${INSTALLER_TYPE}" \
45 -e "INSTALLER_IP=${INSTALLER_IP}" \
48 trap 'cleanup $id' SIGHUP SIGINT SIGTERM
50 ${ROOT_DIR}/tests/update_yardstick.sh $id ${rpmdir} ${imagedir}
54 echo "Failed to update the yardstick environment"
58 docker exec $id sh -c "/opt/testexec.sh"