From 8cb2614cd2d72fcfb29024dd677e19cfe35c38ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Ferr=C3=A1ndiz?= <62122095+jeferal@users.noreply.github.com> Date: Mon, 6 Nov 2023 15:28:23 +0000 Subject: [PATCH] Change ROS log upload script to upload any file that contains .bag (including active files) (#564) --- .../save-logs-icons/templates/scripts/save-latest-ros-logs.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/roles/products/common/save-logs-icons/templates/scripts/save-latest-ros-logs.j2 b/ansible/roles/products/common/save-logs-icons/templates/scripts/save-latest-ros-logs.j2 index a3db517d0..588758748 100644 --- a/ansible/roles/products/common/save-logs-icons/templates/scripts/save-latest-ros-logs.j2 +++ b/ansible/roles/products/common/save-logs-icons/templates/scripts/save-latest-ros-logs.j2 @@ -52,8 +52,8 @@ function copy_logs docker exec $container_name bash -c "rosnode kill $record_node" || true docker exec $container_name bash -c "rosnode list | grep /bag_rotate | xargs -I{} rosnode kill {}" || true sleep 1 - latestbag=$(docker exec $container_name bash -c "ls -dtr $docker_ros_logs_folder/*.bag | tail -1") || true - latestbag_tmp=$(docker exec $container_name bash -c "ls -dtr $docker_user_home/*.bag | tail -1") || true + latestbag=$(docker exec $container_name bash -c "ls -dtr $docker_ros_logs_folder/*.bag* | tail -1") || true + latestbag_tmp=$(docker exec $container_name bash -c "ls -dtr $docker_user_home/*.bag* | tail -1") || true docker exec $container_name bash -c "mkdir -p $docker_logs_temp" || true docker exec $container_name bash -c "cp $docker_ros_logs_folder/stderr.log $docker_logs_temp" || true docker exec $container_name bash -c "rm $docker_ros_logs_folder/std*.log" || true