From 78aa3305b10a490ac0454837e87f1f76ca9fd2c1 Mon Sep 17 00:00:00 2001 From: HiroIshida Date: Wed, 10 Jan 2024 01:27:48 +0900 Subject: [PATCH] ci: keep launch files in container to invoke rostest from outside --- .github/workflows/docker_build.yml | 2 +- Dockerfile | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml index 16094b1..b3951a4 100644 --- a/.github/workflows/docker_build.yml +++ b/.github/workflows/docker_build.yml @@ -28,7 +28,7 @@ jobs: with: push: false tags: detic_ros:latest - build_args: INSTALL_JSK_PCL=false + build_args: REMOVE_LAUNCH_DIR=false - name: rostest run: | docker run --rm detic_ros:latest /bin/bash -i -c "source ~/.bashrc; rostest detic_ros test_node.test" diff --git a/Dockerfile b/Dockerfile index 39a2fd8..b4d2218 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,8 @@ FROM nvidia/cuda:11.2.2-runtime-ubuntu20.04 ENV DEBIAN_FRONTEND=noninteractive RUN rm /etc/apt/sources.list.d/cuda.list +# this arg is maybe set to false for testing purpose (e.g. invoke default launch files from rostest) +ARG REMOVE_LAUNCH_DIR=true RUN echo 'Etc/UTC' > /etc/timezone && \ ln -s /usr/share/zoneinfo/Etc/UTC /etc/localtime && \ @@ -98,7 +100,9 @@ RUN cd ~/detic_ws/src &&\ cd ~/detic_ws && catkin init && catkin build # to avoid conflcit when mounting -RUN rm -rf ~/detic_ws/src/detic_ros/launch +RUN if [ "$REMOVE_LAUNCH_DIR" = "true" ] ; then \ + rm -rf ~/detic_ws/src/detic_ros/launch ; \ +fi ######################################## ########### ENV VARIABLE STUFF #########