Skip to content

Commit 27c2d1e

Browse files
ruffslSteveMacenski
authored andcommitted
Patch CI actions and Dockerfiles (#3468)
* Unset default value for FAIL_ON_TEST_FAILURE as unsetting it via --build-arg seems unreliable docker/compose#3608 * Use build arg default for failing on test failers * Update from deprecated set-output commands https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
1 parent c551426 commit 27c2d1e

File tree

4 files changed

+13
-14
lines changed

4 files changed

+13
-14
lines changed

.github/workflows/update_ci_image.yaml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ jobs:
2626
id: check
2727
if: github.event_name == 'push'
2828
run: |
29-
echo "::set-output name=trigger::true"
30-
echo "::set-output name=no_cache::false"
29+
echo "trigger=true" >> $GITHUB_OUTPUT
30+
echo "no_cache=false" >> $GITHUB_OUTPUT
3131
check_ci_image:
3232
name: Check CI Image
3333
if: github.event_name == 'schedule'
@@ -52,9 +52,9 @@ jobs:
5252
cat upgrade.log
5353
cat upgrade.log \
5454
| grep "^0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.$" \
55-
&& echo "::set-output name=trigger::false" \
56-
|| echo "::set-output name=trigger::true"
57-
echo "::set-output name=no_cache::true"
55+
&& echo "trigger=false" >> $GITHUB_OUTPUT \
56+
|| echo "trigger=true" >> $GITHUB_OUTPUT
57+
echo "no_cache=true" >> $GITHUB_OUTPUT
5858
rebuild_ci_image:
5959
name: Rebuild CI Image
6060
if: always()
@@ -75,23 +75,23 @@ jobs:
7575
id: config
7676
run: |
7777
timestamp=$(date --utc +%Y%m%d%H%M%S)
78-
echo "::set-output name=timestamp::${timestamp}"
78+
echo "timestamp=${timestamp}" >> $GITHUB_OUTPUT
7979
8080
no_cache=false
8181
if [ "${{needs.check_ci_files.outputs.no_cache}}" == 'true' ] || \
8282
[ "${{needs.check_ci_image.outputs.no_cache}}" == 'true' ]
8383
then
8484
no_cache=true
8585
fi
86-
echo "::set-output name=no_cache::${no_cache}"
86+
echo "no_cache=${no_cache}" >> $GITHUB_OUTPUT
8787
8888
trigger=false
8989
if [ "${{needs.check_ci_files.outputs.trigger}}" == 'true' ] || \
9090
[ "${{needs.check_ci_image.outputs.trigger}}" == 'true' ]
9191
then
9292
trigger=true
9393
fi
94-
echo "::set-output name=trigger::${trigger}"
94+
echo "trigger=${trigger}" >> $GITHUB_OUTPUT
9595
- name: Build and push ${{ github.ref_name }}
9696
if: steps.config.outputs.trigger == 'true'
9797
id: docker_build
@@ -122,7 +122,6 @@ jobs:
122122
cache-to: type=inline
123123
build-args: |
124124
RUN_TESTS=True
125-
FAIL_ON_TEST_FAILURE=''
126125
target: tester
127126
tags: |
128127
ghcr.io/ros-planning/navigation2:${{ github.ref_name }}-dev

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ RUN sed --in-place \
125125

126126
# test overlay build
127127
ARG RUN_TESTS
128-
ARG FAIL_ON_TEST_FAILURE=True
128+
ARG FAIL_ON_TEST_FAILURE
129129
RUN if [ -n "$RUN_TESTS" ]; then \
130130
. install/setup.sh && \
131131
colcon test && \

tools/distro.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ RUN sed --in-place \
9292

9393
# test overlay build
9494
ARG RUN_TESTS
95-
ARG FAIL_ON_TEST_FAILURE=True
95+
ARG FAIL_ON_TEST_FAILURE
9696
RUN if [ -n "$RUN_TESTS" ]; then \
9797
. install/setup.sh && \
9898
colcon test && \

tools/source.Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ FROM ros2_builder AS ros2_tester
117117

118118
# test overlay build
119119
ARG RUN_TESTS
120-
ARG FAIL_ON_TEST_FAILURE=True
120+
ARG FAIL_ON_TEST_FAILURE
121121
RUN if [ -n "$RUN_TESTS" ]; then \
122122
. install/setup.sh && \
123123
colcon test && \
@@ -165,7 +165,7 @@ FROM underlay_builder AS underlay_tester
165165

166166
# test overlay build
167167
ARG RUN_TESTS
168-
ARG FAIL_ON_TEST_FAILURE=True
168+
ARG FAIL_ON_TEST_FAILURE
169169
RUN if [ -n "$RUN_TESTS" ]; then \
170170
. install/setup.sh && \
171171
colcon test && \
@@ -216,7 +216,7 @@ FROM overlay_builder AS overlay_tester
216216

217217
# test overlay build
218218
ARG RUN_TESTS
219-
ARG FAIL_ON_TEST_FAILURE=True
219+
ARG FAIL_ON_TEST_FAILURE
220220
RUN if [ -n "$RUN_TESTS" ]; then \
221221
. install/setup.sh && \
222222
colcon test && \

0 commit comments

Comments
 (0)