Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ROS_DISTRO=false #834

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions industrial_ci/src/isolation/docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ function ici_isolate() {

if [ -z "${ROS_DISTRO:-}" ]; then
ROS_DISTRO=$(docker image inspect --format "{{.Config.Env}}" "${DOCKER_IMAGE}" | grep -o -P "(?<=ROS_DISTRO=)[a-z]*") || ici_error "ROS_DISTRO is not set"
elif [ "${ROS_DISTRO}" = "false" ]; then
unset ROS_DISTRO
fi

ici_forward_mount TARGET_REPO_PATH ro
Expand Down
3 changes: 2 additions & 1 deletion industrial_ci/src/ros.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ function _set_ros_defaults {
_ros2_defaults "jammy"
;;
"false")
unset ROS_DISTRO
export BUILDER=${BUILDER:-colcon}
export ROS_PYTHON_VERSION=${ROS_PYTHON_VERSION:-3}
;;
*)
ici_error "ROS_DISTRO '$ROS_DISTRO' is not supported"
Expand Down
6 changes: 3 additions & 3 deletions industrial_ci/src/workspace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ function ici_init_apt {
ici_apt_install "${debs_default[@]}"
fi

if [ -n "$ROS_DISTRO" ]; then
if [ -n "$ROS_DISTRO" ] && [ "$ROS_DISTRO" != false ]; then
local current_repository_path
current_repository_path="$(apt-cache policy "ros-$ROS_DISTRO-ros-core" 2> /dev/null | grep -Eo "[^ ]+://[^ ]+")" || true
ici_set_ros_repository_path "$current_repository_path"
Expand Down Expand Up @@ -322,7 +322,7 @@ function ici_setup_rosdep {

if [ "$ROS_DISTRO" = "indigo" ] || [ "$ROS_DISTRO" = "jade" ]; then
ici_apt_install "ros-$ROS_DISTRO-roslib"
else
elif [ "$ROS_DISTRO" != false ]; then
ici_apt_install "ros-$ROS_DISTRO-ros-environment"
fi

Expand All @@ -334,7 +334,7 @@ function ici_setup_rosdep {
fi

update_opts=()
if [ -z "${ROSDISTRO_INDEX_URL:-}" ]; then
if [ -z "${ROSDISTRO_INDEX_URL:-}" ] && [ "$ROS_DISTRO" != false ]; then
update_opts+=(--rosdistro "$ROS_DISTRO")
fi
if [ "$ROS_VERSION_EOL" = true ]; then
Expand Down