image: Move my repeat func to my_travis_retry

This commit is contained in:
Artem Smirnov
2018-10-14 05:17:48 +03:00
parent c17dde8f8f
commit 89cee43d38

View File

@@ -75,20 +75,7 @@ resolve_rosdep() {
echo_stamp "Installing dependencies apps with rosdep in ${CATKIN_PATH}"
cd ${CATKIN_PATH}
set +e
# Successfull unmount flag (false at thismoment)
install_ok=false
# Repeat 5 times
for i in {1..5}; do
# Resolving Dependencies with rosdep
rosdep install -y --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} -r --os=${OS_DISTRO}:${OS_VERSION} \
&& install_ok=true && break || (echo_stamp "rosdep iteration #$i failed!" "ERROR"; sleep 2)
done
set -e
# Stage fail if this condition is not true
[[ $install_ok ]] \
&& echo_stamp "All rosdep dependencies was installed!" "SUCCESS" \
|| (echo_stamp "Rosdep installation was failed!" "ERROR"; exit 1)
my_travis_retry rosdep install -y --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} -r --os=${OS_DISTRO}:${OS_VERSION}
}
INSTALL_ROS_PACK_SOURCES=${INSTALL_ROS_PACK_SOURCES:='false'}