From e24ea3da87b1f2b6fc1316c959a052aa6d422fa1 Mon Sep 17 00:00:00 2001 From: Christophe Bedard Date: Sun, 13 Oct 2019 13:29:39 -0700 Subject: [PATCH 1/4] Make use of full source CI base image --- .gitlab-ci.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b83c222..73f00ed 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,12 +4,10 @@ variables: DOCKER_DRIVER: overlay2 PACKAGES_LIST: tracetools_analysis -before_script: - - git clone https://gitlab.com/micro-ROS/ros_tracing/ros2_tracing.git - - rosdep install --from-paths . -i . -i /root/ws --rosdistro dashing -y - - . /root/ws/install/local_setup.sh - build: + before_script: + - git clone https://gitlab.com/micro-ROS/ros_tracing/ros2_tracing.git + - . /root/ws/install/local_setup.sh script: - colcon build --symlink-install --packages-up-to $PACKAGES_LIST - . install/local_setup.sh From 741e722733d83a057c7f399556dd3e9060fa4516 Mon Sep 17 00:00:00 2001 From: Christophe Bedard Date: Sun, 13 Oct 2019 13:29:53 -0700 Subject: [PATCH 2/4] Add --all to colcon test-result --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 73f00ed..5682c48 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,7 +12,7 @@ build: - colcon build --symlink-install --packages-up-to $PACKAGES_LIST - . install/local_setup.sh - colcon test --packages-select $PACKAGES_LIST - - colcon test-result + - colcon test-result --all artifacts: paths: - install From 5fe8621fa15da3a1c96068397c6642af0edb86e6 Mon Sep 17 00:00:00 2001 From: Christophe Bedard Date: Sun, 13 Oct 2019 13:30:22 -0700 Subject: [PATCH 3/4] Put docker image name under job name --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5682c48..90ff85a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,10 +1,10 @@ -image: registry.gitlab.com/micro-ros/ros_tracing/ci_base - variables: DOCKER_DRIVER: overlay2 PACKAGES_LIST: tracetools_analysis + base_image_id: registry.gitlab.com/micro-ros/ros_tracing/ci_base build: + image: $base_image_id before_script: - git clone https://gitlab.com/micro-ROS/ros_tracing/ros2_tracing.git - . /root/ws/install/local_setup.sh From f1b3dc73029ec869f3d406f47ad04fb63512c25a Mon Sep 17 00:00:00 2001 From: Christophe Bedard Date: Sun, 13 Oct 2019 13:34:05 -0700 Subject: [PATCH 4/4] Use global_artifacts anchor --- .gitlab-ci.yml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 90ff85a..35597ae 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,6 +3,17 @@ variables: PACKAGES_LIST: tracetools_analysis base_image_id: registry.gitlab.com/micro-ros/ros_tracing/ci_base +.global_artifacts: &global_artifacts + artifacts: + paths: + - install + - build/*/test_results/*/*.xunit.xml + - build/*/pytest.xml + reports: + junit: + - build/*/test_results/*/*.xunit.xml + - build/*/pytest.xml + build: image: $base_image_id before_script: @@ -13,12 +24,4 @@ build: - . install/local_setup.sh - colcon test --packages-select $PACKAGES_LIST - colcon test-result --all - artifacts: - paths: - - install - - build/*/test_results/*/*.xunit.xml - - build/*/pytest.xml - reports: - junit: - - build/*/test_results/*/*.xunit.xml - - build/*/pytest.xml + <<: *global_artifacts