summaryrefslogtreecommitdiffstats
path: root/tests/ci/load_images.sh
diff options
context:
space:
mode:
authorCristina Pauna <cristina.pauna@enea.com>2017-09-29 15:47:59 +0300
committerCristina Pauna <cristina.pauna@enea.com>2017-09-29 15:52:02 +0300
commite70a83330eaa287fb364aad63829a38b993ad9e7 (patch)
treefb8d36bba1b17ad32a9f3d3769a9f7424a792997 /tests/ci/load_images.sh
parent9cefa935afa908cede3ab1bd8b6ca91f1e36ad2d (diff)
Adapt getting the image architecture to mcp
The part which gets the image architecture still uses the old fuel command. Adapted the script to use the mcp command. JIRA: ARMBAND-285 Change-Id: Iddce77c3a856ea11f9994861151db89a402e735e Signed-off-by: Cristina Pauna <cristina.pauna@enea.com>
Diffstat (limited to 'tests/ci/load_images.sh')
-rwxr-xr-xtests/ci/load_images.sh11
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/ci/load_images.sh b/tests/ci/load_images.sh
index c2ae4fe7b..89ebb2dde 100755
--- a/tests/ci/load_images.sh
+++ b/tests/ci/load_images.sh
@@ -13,17 +13,20 @@
set -e
YARD_IMG_ARCH=amd64
-export YARD_IMG_ARCH
if ! grep -q "Defaults env_keep += \"YARD_IMG_ARCH\"" "/etc/sudoers"; then
echo "Defaults env_keep += \"YARD_IMG_ARCH YARDSTICK_REPO_DIR\"" | sudo tee -a /etc/sudoers
fi
# Look for a compute node, that is online, and check if it is aarch64
-ARCH_SCRIPT="ssh \$(fuel2 node list | awk -F'|' '\$6 ~ /compute/ && \$11 ~ /rue/ {print \$7; exit;}') uname -m 2>/dev/null | grep -q aarch64"
-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
+if [ "${INSTALLER_TYPE}" == 'fuel' ]; then
+ COMPUTE_ARCH=$(ssh -l ubuntu ${INSTALLER_IP} -i ${SSH_KEY} ${ssh_options} \
+ "sudo salt 'cmp*' grains.get cpuarch --out yaml | awk '{print \$2; exit}'")
+ if [ "${COMPUTE_ARCH}" == 'aarch64' ]; then
+ YARD_IMG_ARCH=arm64
+ fi
fi
+export YARD_IMG_ARCH
HW_FW_TYPE=""
if [ "${YARD_IMG_ARCH}" == "arm64" ]; then