Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch CI actions and Dockerfiles #3468

Merged
merged 3 commits into from
Mar 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions .github/workflows/update_ci_image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ jobs:
id: check
if: github.event_name == 'push'
run: |
echo "::set-output name=trigger::true"
echo "::set-output name=no_cache::false"
echo "trigger=true" >> $GITHUB_OUTPUT
echo "no_cache=false" >> $GITHUB_OUTPUT
check_ci_image:
name: Check CI Image
if: github.event_name == 'schedule'
Expand All @@ -52,9 +52,9 @@ jobs:
cat upgrade.log
cat upgrade.log \
| grep "^0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.$" \
&& echo "::set-output name=trigger::false" \
|| echo "::set-output name=trigger::true"
echo "::set-output name=no_cache::true"
&& echo "trigger=false" >> $GITHUB_OUTPUT \
|| echo "trigger=true" >> $GITHUB_OUTPUT
echo "no_cache=true" >> $GITHUB_OUTPUT
rebuild_ci_image:
name: Rebuild CI Image
if: always()
Expand All @@ -75,23 +75,23 @@ jobs:
id: config
run: |
timestamp=$(date --utc +%Y%m%d%H%M%S)
echo "::set-output name=timestamp::${timestamp}"
echo "timestamp=${timestamp}" >> $GITHUB_OUTPUT

no_cache=false
if [ "${{needs.check_ci_files.outputs.no_cache}}" == 'true' ] || \
[ "${{needs.check_ci_image.outputs.no_cache}}" == 'true' ]
then
no_cache=true
fi
echo "::set-output name=no_cache::${no_cache}"
echo "no_cache=${no_cache}" >> $GITHUB_OUTPUT

trigger=false
if [ "${{needs.check_ci_files.outputs.trigger}}" == 'true' ] || \
[ "${{needs.check_ci_image.outputs.trigger}}" == 'true' ]
then
trigger=true
fi
echo "::set-output name=trigger::${trigger}"
echo "trigger=${trigger}" >> $GITHUB_OUTPUT
- name: Build and push ${{ github.ref_name }}
if: steps.config.outputs.trigger == 'true'
id: docker_build
Expand Down Expand Up @@ -122,7 +122,6 @@ jobs:
cache-to: type=inline
build-args: |
RUN_TESTS=True
FAIL_ON_TEST_FAILURE=''
target: tester
tags: |
ghcr.io/ros-planning/navigation2:${{ github.ref_name }}-dev
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ RUN sed --in-place \

# test overlay build
ARG RUN_TESTS
ARG FAIL_ON_TEST_FAILURE=True
ARG FAIL_ON_TEST_FAILURE
RUN if [ -n "$RUN_TESTS" ]; then \
. install/setup.sh && \
colcon test && \
Expand Down
2 changes: 1 addition & 1 deletion tools/distro.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ RUN sed --in-place \

# test overlay build
ARG RUN_TESTS
ARG FAIL_ON_TEST_FAILURE=True
ARG FAIL_ON_TEST_FAILURE
RUN if [ -n "$RUN_TESTS" ]; then \
. install/setup.sh && \
colcon test && \
Expand Down
6 changes: 3 additions & 3 deletions tools/source.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ FROM ros2_builder AS ros2_tester

# test overlay build
ARG RUN_TESTS
ARG FAIL_ON_TEST_FAILURE=True
ARG FAIL_ON_TEST_FAILURE
RUN if [ -n "$RUN_TESTS" ]; then \
. install/setup.sh && \
colcon test && \
Expand Down Expand Up @@ -165,7 +165,7 @@ FROM underlay_builder AS underlay_tester

# test overlay build
ARG RUN_TESTS
ARG FAIL_ON_TEST_FAILURE=True
ARG FAIL_ON_TEST_FAILURE
RUN if [ -n "$RUN_TESTS" ]; then \
. install/setup.sh && \
colcon test && \
Expand Down Expand Up @@ -216,7 +216,7 @@ FROM overlay_builder AS overlay_tester

# test overlay build
ARG RUN_TESTS
ARG FAIL_ON_TEST_FAILURE=True
ARG FAIL_ON_TEST_FAILURE
RUN if [ -n "$RUN_TESTS" ]; then \
. install/setup.sh && \
colcon test && \
Expand Down