X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=installers%2Finstall_from_source.sh;h=02d9e05a5d0fb4038fa1c96857abb29fb892da87;hb=c0a6596e29baceb1717a94d9f66f602ac8f355e9;hp=77209f5d47da95ac7651c518fcfda6638b40fef2;hpb=d8b80f8e4126827eca31945d1367792cdc0d8b62;p=osm%2Fdevops.git diff --git a/installers/install_from_source.sh b/installers/install_from_source.sh index 77209f5d..02d9e05a 100755 --- a/installers/install_from_source.sh +++ b/installers/install_from_source.sh @@ -66,7 +66,7 @@ function update(){ lxc exec $CONTAINER -- git -C $INSTALL_FOLDER fetch --all BRANCH="" BRANCH=`lxc exec $CONTAINER -- git -C $INSTALL_FOLDER status -sb | head -n1 | sed -n 's/^## \(.*\).*/\1/p'|awk '{print $1}' |sed 's/\(.*\)\.\.\..*/\1/'` - [ -z "$BRANCH" ] && echo " Could not find the current branch in use in the $MDG" && exit 1 + [ -z "$BRANCH" ] && FATAL "Could not find the current branch in use in the '$MDG'" CURRENT=`lxc exec $CONTAINER -- git -C $INSTALL_FOLDER status |head -n1` CURRENT_COMMIT_ID=`lxc exec $CONTAINER -- git -C $INSTALL_FOLDER rev-parse HEAD` echo " FROM: $CURRENT ($CURRENT_COMMIT_ID)" @@ -102,7 +102,7 @@ function update(){ lxc exec $CONTAINER -- git -C $INSTALL_FOLDER fetch --all BRANCH="" BRANCH=`lxc exec $CONTAINER -- git -C $INSTALL_FOLDER status -sb | head -n1 | sed -n 's/^## \(.*\).*/\1/p'|awk '{print $1}' |sed 's/\(.*\)\.\.\..*/\1/'` - [ -z "$BRANCH" ] && echo " Could not find the current branch in use in the $MDG" && exit 1 + [ -z "$BRANCH" ] && FATAL "Could not find the current branch in use in the '$MDG'" CURRENT=`lxc exec $CONTAINER -- git -C $INSTALL_FOLDER status |head -n1` CURRENT_COMMIT_ID=`lxc exec $CONTAINER -- git -C $INSTALL_FOLDER rev-parse HEAD` echo " FROM: $CURRENT ($CURRENT_COMMIT_ID)" @@ -279,6 +279,9 @@ if [ -z "$ASSUME_YES" ]; then [ "$USER_CONFIRMATION" != "y" ] && echo "Cancelled!" && exit 0 fi +echo -e "Checking required packages: lxd" +lxd --version &>/dev/null || echo -e "lxd not present, exiting " >&2 && exit 1 + [ -z "$COMMIT_ID" ] && [ -n "$LATEST_STABLE_DEVOPS" ] && COMMIT_ID="tags/$LATEST_STABLE_DEVOPS" echo -e "\n Installing OSM from refspec: $COMMIT_ID" @@ -290,10 +293,10 @@ echo -e "\nChecking required packages: wget, curl, tar" dpkg -l wget curl tar &>/dev/null || ! echo -e " One or several packages are not installed.\nInstalling required packages\n Root privileges are required" || sudo apt install -y wget curl tar echo -e "\nCreating the containers and building ..." -$OSM_DEVOPS/jenkins/host/start_build RO --notest checkout $COMMIT_ID -$OSM_DEVOPS/jenkins/host/start_build VCA -$OSM_DEVOPS/jenkins/host/start_build SO checkout $COMMIT_ID -$OSM_DEVOPS/jenkins/host/start_build UI checkout $COMMIT_ID +$OSM_DEVOPS/jenkins/host/start_build RO --notest checkout $COMMIT_ID || FATAL "RO container build failed (refspec: '$COMMIT_ID')" +$OSM_DEVOPS/jenkins/host/start_build VCA || FATAL "VCA container build failed" +$OSM_DEVOPS/jenkins/host/start_build SO checkout $COMMIT_ID || FATAL "SO container build failed (refspec: '$COMMIT_ID')" +$OSM_DEVOPS/jenkins/host/start_build UI checkout $COMMIT_ID || FATAL "UI container build failed (refspec: '$COMMIT_ID')" #Install iptables-persistent and configure NAT rules nat @@ -301,6 +304,5 @@ nat #Configure components configure +wget -q -O- https://osm-download.etsi.org/ftp/osm-1.0-one/README2.txt &> /dev/null echo -e "\nDONE" - -