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

fix(docker): append set -o pipefail to return shell script's pipe error #5697

Closed
wants to merge 3 commits into from
Closed
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
2 changes: 2 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
ARG AUTOWARE_BASE_CUDA_IMAGE

# hadolint ignore=DL3006
FROM $BASE_IMAGE AS rosdep-depend

Check warning on line 6 in docker/Dockerfile

View workflow job for this annotation

GitHub Actions / docker-build-nightly

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG $BASE_IMAGE results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ARG ROS_DISTRO

Expand Down Expand Up @@ -31,6 +31,8 @@

COPY src/universe/external /autoware/src/universe/external
COPY src/universe/autoware.universe/common /autoware/src/universe/autoware.universe/common
COPY src/universe/autoware.universe/perception/autoware_tensorrt_common /autoware/src/universe/autoware.universe/perception/autoware_tensorrt_common
COPY src/universe/autoware.universe/sensing/autoware_cuda_utils /autoware/src/universe/autoware.universe/sensing/autoware_cuda_utils
RUN /autoware/resolve_rosdep_keys.sh /autoware/src ${ROS_DISTRO} \
> /rosdep-universe-common-depend-packages.txt \
&& cat /rosdep-universe-common-depend-packages.txt
Expand Down Expand Up @@ -125,7 +127,7 @@
&& cat /rosdep-exec-depend-packages.txt

# hadolint ignore=DL3006
FROM $AUTOWARE_BASE_IMAGE AS core-devel

Check warning on line 130 in docker/Dockerfile

View workflow job for this annotation

GitHub Actions / docker-build-nightly

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG $AUTOWARE_BASE_IMAGE results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ARG ROS_DISTRO
ENV CCACHE_DIR="/root/.ccache"
Expand Down Expand Up @@ -406,7 +408,7 @@
CMD ["/bin/bash"]

# hadolint ignore=DL3006
FROM $AUTOWARE_BASE_IMAGE AS universe-sensing-perception

Check warning on line 411 in docker/Dockerfile

View workflow job for this annotation

GitHub Actions / docker-build-nightly

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG $AUTOWARE_BASE_IMAGE results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ARG ROS_DISTRO
ARG LIB_DIR
Expand All @@ -432,7 +434,7 @@
CMD ["/bin/bash"]

# hadolint ignore=DL3006
FROM $AUTOWARE_BASE_CUDA_IMAGE AS universe-sensing-perception-cuda

Check warning on line 437 in docker/Dockerfile

View workflow job for this annotation

GitHub Actions / docker-build-nightly

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG $AUTOWARE_BASE_CUDA_IMAGE results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ARG ROS_DISTRO
ARG LIB_DIR
Expand All @@ -454,7 +456,7 @@
CMD ["/bin/bash"]

# hadolint ignore=DL3006
FROM $AUTOWARE_BASE_IMAGE AS universe-localization-mapping

Check warning on line 459 in docker/Dockerfile

View workflow job for this annotation

GitHub Actions / docker-build-nightly

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG $AUTOWARE_BASE_IMAGE results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ARG ROS_DISTRO
ARG LIB_DIR
Expand All @@ -480,7 +482,7 @@
CMD ["/bin/bash"]

# hadolint ignore=DL3006
FROM $AUTOWARE_BASE_IMAGE AS universe-planning-control

Check warning on line 485 in docker/Dockerfile

View workflow job for this annotation

GitHub Actions / docker-build-nightly

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG $AUTOWARE_BASE_IMAGE results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ARG ROS_DISTRO
ARG LIB_DIR
Expand All @@ -506,7 +508,7 @@
CMD ["/bin/bash"]

# hadolint ignore=DL3006
FROM $AUTOWARE_BASE_IMAGE AS universe-vehicle-system

Check warning on line 511 in docker/Dockerfile

View workflow job for this annotation

GitHub Actions / docker-build-nightly

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG $AUTOWARE_BASE_IMAGE results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ARG ROS_DISTRO
ARG LIB_DIR
Expand All @@ -532,7 +534,7 @@
CMD ["/bin/bash"]

# hadolint ignore=DL3006
FROM $AUTOWARE_BASE_IMAGE AS universe-visualization

Check warning on line 537 in docker/Dockerfile

View workflow job for this annotation

GitHub Actions / docker-build-nightly

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG $AUTOWARE_BASE_IMAGE results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ARG ROS_DISTRO
ARG LIB_DIR
Expand All @@ -558,7 +560,7 @@
CMD ["/bin/bash"]

# hadolint ignore=DL3006
FROM $AUTOWARE_BASE_IMAGE AS universe

Check warning on line 563 in docker/Dockerfile

View workflow job for this annotation

GitHub Actions / docker-build-nightly

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG $AUTOWARE_BASE_IMAGE results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ARG ROS_DISTRO
ARG LIB_DIR
Expand All @@ -584,7 +586,7 @@
CMD ["/bin/bash"]

# hadolint ignore=DL3006
FROM $AUTOWARE_BASE_CUDA_IMAGE AS universe-cuda

Check warning on line 589 in docker/Dockerfile

View workflow job for this annotation

GitHub Actions / docker-build-nightly

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG $AUTOWARE_BASE_CUDA_IMAGE results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ARG ROS_DISTRO
ARG LIB_DIR
Expand Down
2 changes: 1 addition & 1 deletion docker/scripts/build_and_clean.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -e
set -eo pipefail

function build_and_clean() {
local ccache_dir=$1
Expand Down
2 changes: 1 addition & 1 deletion docker/scripts/cleanup_apt.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -e
set -eo pipefail

function cleanup_apt() {
local apt_clean=$1
Expand Down
2 changes: 1 addition & 1 deletion docker/scripts/cleanup_system.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -e
set -eo pipefail

function cleanup_system() {
local lib_dir=$1
Expand Down
2 changes: 1 addition & 1 deletion docker/scripts/resolve_rosdep_keys.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -e
set -eo pipefail

function resolve_rosdep_keys() {
local src_path=$1
Expand Down
Loading