diff --git a/jenkins-scripts/docker/lib/_gazebo_utils.sh b/jenkins-scripts/docker/lib/_gazebo_utils.sh index 2f0bf0168..c1cea83f8 100644 --- a/jenkins-scripts/docker/lib/_gazebo_utils.sh +++ b/jenkins-scripts/docker/lib/_gazebo_utils.sh @@ -84,12 +84,14 @@ cd build-deps # nightlies uploads. update_done=false seconds_waiting=0 +timeout=\${timeout:-0} while (! \$update_done); do sudo DEBIAN_FRONTEND=noninteractive mk-build-deps \ -r -i ../debian/control \ --tool 'apt-get --yes -o Debug::pkgProblemResolver=yes -o Debug::BuildDeps=yes' \ && break sleep 60 && seconds_waiting=\$((seconds_waiting+60)) + apt-get update [ \$seconds_waiting -ge \$timeout ] && exit 1 done cd ..