#!/bin/bash
-set -e
+set -ex
check_env(){
#Checking python-pip software status. If failed, reinstall it.
fi
}
+checkout_arm64(){
+ VERSION="dcc6d07"
+ git checkout ${VERSION}
+ sed -i 's:opnfv/:cyb70289/:' build/build-aarch64.yaml
+}
+
check_env
echo "begin build compass"
cd compass4nfv
+if [ "$(uname -m)" = 'aarch64' ]; then
+ echo "Checkout compass4nfv to Arm64 version"
+ checkout_arm64
+fi
+
COMPASS_WORK_DIR=$WORKSPACE/../compass-work
mkdir -p $COMPASS_WORK_DIR
sudo docker rm -f `sudo docker ps | grep compass | cut -f1 -d' '` || true
-curl -s http://people.linaro.org/~yibo.cai/compass/compass4nfv-arm64-fixup.sh | bash || true
+curl -sL http://people.linaro.org/~yibo.cai/compass/compass4nfv-arm64-fixup.sh | bash || true
./build.sh
+# Fix permissions so we can archive log files before pushing to Nexus
+sudo chown $(id -u):$(id -g) -R "${WORKSPACE}"
+
exit 0