From 1c04ac5041a248b79bbeab5a44a4b303ca16fe7d Mon Sep 17 00:00:00 2001 From: JingLu5 Date: Tue, 29 Nov 2016 10:50:40 +0800 Subject: Decoupling prepare_env.sh and load_images.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit JIRA: YARDSTICK-430 The "prepare_env.sh" and “load_images.sh” have serious dependency. The “load_images.sh” uses the "YARD_IMG_ARCH" variable which is defined in the "prepare_env.sh" to choose the base ubuntu image version. We want to decoupling these two scripts, so they can be invoked separately. Change-Id: I30c1b4a65f73b1550fa5eb96366fe8b1d59251d7 Signed-off-by: JingLu5 --- tests/ci/load_images.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/ci/load_images.sh') diff --git a/tests/ci/load_images.sh b/tests/ci/load_images.sh index 54a145fd3..405d72076 100755 --- a/tests/ci/load_images.sh +++ b/tests/ci/load_images.sh @@ -12,6 +12,18 @@ set -e +YARD_IMG_ARCH=amd64 +export YARD_IMG_ARCH + +if ! grep -q "Defaults env_keep += \"YARD_IMG_ARCH\"" "/etc/sudoers"; then + sudo echo "Defaults env_keep += \"YARD_IMG_ARCH YARDSTICK_REPO_DIR\"" >> /etc/sudoers +fi + +ARCH_SCRIPT="test -f /etc/fuel_openstack_arch && grep -q arm64 /etc/fuel_openstack_arch" +if [ "$INSTALLER_TYPE" == "fuel" ]; then + sshpass -p r00tme ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -l root $INSTALLER_IP "${ARCH_SCRIPT}" && YARD_IMG_ARCH=arm64 +fi + UCA_HOST="cloud-images.ubuntu.com" if [ $YARD_IMG_ARCH = "arm64" ]; then export VIVID_IMG_URL="http://${UCA_HOST}/vivid/current/vivid-server-cloudimg-arm64.tar.gz" -- cgit 1.2.3-korg