1- name : ddsrouter- docker-tests
1+ name : docker-reusable-workflow
22
33on :
4- workflow_dispatch :
4+ workflow_call :
55 inputs :
6+
67 fastcdr_branch :
78 description : ' Branch or tag of Fast CDR repository (https://github.com/eProsima/Fast-CDR)'
89 required : true
910 default : ' master'
11+ type : string
12+
1013 fastdds_branch :
1114 description : ' Branch or tag of Fast DDS repository (https://github.com/eProsima/Fast-DDS)'
1215 required : true
1316 default : ' master'
14- devutils_branch :
15- description : ' Branch or tag of dev-utils repository (https://github.com/eProsima/dev-utils)'
17+ type : string
18+
19+ dev_utils_branch :
20+ description : ' Branch or tag of eProsima/dev-utils repository (https://github.com/eProsima/dev-utils)'
1621 required : true
1722 default : ' main'
23+ type : string
24+
1825 ddspipe_branch :
1926 description : ' Branch or tag of DDS Pipe repository (https://github.com/eProsima/DDS-Pipe)'
2027 required : true
2128 default : ' main'
29+ type : string
30+
2231 ddsrouter_branch :
2332 description : ' Branch or tag of DDS Router repository (https://github.com/eProsima/DDS-Router)'
2433 required : true
2534 default : ' main'
35+ type : string
36+
37+ custom_version_build :
38+ description : >
39+ Version of Fast DDS build from eProsima-CI.
40+ required : true
41+ type : string
42+
2643 dependencies_artifact_postfix :
2744 description : ' Postfix name to add to artifact name to download dependencies. This is use to download a specific artifact version from eProsima-CI.'
2845 required : true
2946 default : ' _nightly'
30- pull_request :
31- push :
32- branches :
33- - main
34- schedule :
35- - cron : ' 0 0 * * *'
47+ type : string
3648
3749env :
3850 code_packages_names : ' ddsrouter_test'
3951 docs_packages_names : ' '
40- default_dependencies_artifact_postfix : ' _nightly'
4152
4253jobs :
4354 docker-test :
4455
4556 runs-on : ubuntu-22.04
4657
4758 env :
48- DEFAULT_FASTCDR_BRANCH : ' master'
49- DEFAULT_FASTDDS_BRANCH : ' master'
50- DEFAULT_DEVUTILS_BRANCH : ' main'
51- DEFAULT_DDSPIPE_BRANCH : ' main'
52- DEFAULT_DDSROUTER_BRANCH : ' main'
5359 DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE : " ddsrouter:ci"
5460 DDSROUTER_COMPOSE_TEST_ROS2_DOCKER_IMAGE : " vulcanexus:ci"
5561
5864 - name : Sync repository
5965 uses : eProsima/eProsima-CI/external/checkout@v0
6066 with :
61- path : ${{ github.workspace }}/src
62-
63- # Echo Env Var to debug workflow
64- - name : Echo env variables
65- run : |
66- echo "--- Input Variables ---"
67- echo "github.event.inputs.fastcdr_branch: ${{ github.event.inputs.fastcdr_branch }}"
68- echo "github.event.inputs.fastdds_branch: ${{ github.event.inputs.fastdds_branch }}"
69- echo "github.event.inputs.devutils_branch: ${{ github.event.inputs.devutils_branch }}"
70- echo "github.event.inputs.ddspipe_branch: ${{ github.event.inputs.ddspipe_branch }}"
71- echo "github.event.inputs.ddsrouter_branch: ${{ github.event.inputs.ddsrouter_branch }}"
72- echo "--- Github Environment Variables ---"
73- echo "github.head_ref: ${{ github.head_ref }}"
74- echo "--- Environment Variables ---"
75- echo "DEFAULT_FASTCDR_BRANCH: ${{ env.DEFAULT_FASTCDR_BRANCH }}"
76- echo "DEFAULT_FASTDDS_BRANCH: ${{ env.DEFAULT_FASTDDS_BRANCH }}"
77- echo "DEFAULT_DEVUTILS_BRANCH: ${{ env.DEFAULT_DEVUTILS_BRANCH }}"
78- echo "DEFAULT_DDSPIPE_BRANCH: ${{ env.DEFAULT_DDSPIPE_BRANCH }}"
79- echo "DEFAULT_DDSROUTER_BRANCH: ${{ env.DEFAULT_DDSROUTER_BRANCH }}"
67+ path : src
8068
8169 # Build Vulcanexus Docker image
8270 - name : Build custom Vulcanexus Docker image
@@ -94,14 +82,13 @@ jobs:
9482 cd ./src/.github/docker/ddsrouter
9583 docker build \
9684 --no-cache \
97- --build-arg fastcdr_branch=${{ github.event. inputs.fastcdr_branch || env.DEFAULT_FASTCDR_BRANCH }} \
98- --build-arg fastdds_branch=${{ github.event. inputs.fastdds_branch || env.DEFAULT_FASTDDS_BRANCH }} \
99- --build-arg devutils_branch =${{ github.event. inputs.devutils_branch || env.DEFAULT_DEVUTILS_BRANCH }} \
100- --build-arg ddspipe_branch=${{ github.event. inputs.ddspipe_branch || env.DEFAULT_DDSPIPE_BRANCH }} \
101- --build-arg ddsrouter_branch=${{ github.event. inputs.ddsrouter_branch || github.head_ref || env.DEFAULT_DDSROUTER_BRANCH }} \
85+ --build-arg fastcdr_branch=${{ inputs.fastcdr_branch }} \
86+ --build-arg fastdds_branch=${{ inputs.fastdds_branch }} \
87+ --build-arg dev_utils_branch =${{ inputs.dev_utils_branch }} \
88+ --build-arg ddspipe_branch=${{ inputs.ddspipe_branch }} \
89+ --build-arg ddsrouter_branch=${{ inputs.ddsrouter_branch }} \
10290 -t ${{ env.DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE }} \
10391 -f Dockerfile .
104- echo "DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE: ${{ env.DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE }}"
10592
10693 # Check Docker images exist
10794 - name : Check if Docker images exist
@@ -114,7 +101,8 @@ jobs:
114101 with :
115102 os : ubuntu-22.04
116103 cmake_build_type : " Release"
117- dependencies_artifact_postfix : ${{ github.event.inputs.dependencies_artifact_postfix || env.default_dependencies_artifact_postfix }}
104+ custom_version_build : ${{ inputs.custom_version_build }}
105+ dependencies_artifact_postfix : ${{ inputs.dependencies_artifact_postfix }}
118106 secret_token : ${{ secrets.GITHUB_TOKEN }}
119107
120108 - name : Compile docker tests
@@ -123,16 +111,16 @@ jobs:
123111 workspace : ${{ github.workspace }}
124112 colcon_build_args : --packages-up-to ddsrouter_test
125113 cmake_args : -DBUILD_COMPOSE_TESTS=ON -DCMAKE_BUILD_TYPE=Release
126- workspace_dependencies : ${{ github.workspace }}/ install
127- colcon_meta_file : ${{ github.workspace }}/ src/.github/workflows/configurations/${{ runner.os }}/colcon.meta
114+ workspace_dependencies : install
115+ colcon_meta_file : src/.github/workflows/configurations/${{ runner.os }}/colcon.meta
128116
129117 # Run ddsrouter_test compose tests
130118 - name : Run flaky tests
131119 continue-on-error : true
132120 run : |
133121 export DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE=${{ env.DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE }}
134122 export DDSROUTER_COMPOSE_TEST_ROS2_DOCKER_IMAGE=${{ env.DDSROUTER_COMPOSE_TEST_ROS2_DOCKER_IMAGE }}
135- source ${{ github.workspace }}/ install/setup.bash
123+ source install/setup.bash
136124 colcon test \
137125 --packages-select ddsrouter_test \
138126 --event-handlers console_direct+ \
@@ -145,7 +133,7 @@ jobs:
145133 run : |
146134 export DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE=${{ env.DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE }}
147135 export DDSROUTER_COMPOSE_TEST_ROS2_DOCKER_IMAGE=${{ env.DDSROUTER_COMPOSE_TEST_ROS2_DOCKER_IMAGE }}
148- source ${{ github.workspace }}/ install/setup.bash
136+ source install/setup.bash
149137 colcon test \
150138 --packages-select ddsrouter_test \
151139 --event-handlers console_direct+ \
0 commit comments