-
Notifications
You must be signed in to change notification settings - Fork 87
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
feat: Add ROS 2 Jazzy Jalisco #168
Conversation
WalkthroughThe recent updates introduce new workflows and configurations for the Jazzy project. The changes include setting up GitHub Actions workflows for deploying and testing Jazzy, creating a Dockerfile for a ROS2 desktop environment with VNC access, and an entrypoint script to automate various setup tasks. These modifications aim to streamline the development, testing, and deployment processes for the Jazzy project. Changes
Sequence Diagram(s) (Beta)sequenceDiagram
participant Developer
participant GitHub Actions
participant Docker
participant ROS Environment
Developer->>GitHub Actions: Push code
GitHub Actions-->>GitHub Actions: Trigger deploy-jazzy.yml workflow
GitHub Actions-->>GitHub Actions: Trigger test-jazzy.yml workflow
GitHub Actions->>Docker: Build Docker image using Dockerfile
Docker->>ROS Environment: Set up ROS Jazzy with VNC access
Docker->>Developer: Provide VNC access and tools
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 6
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (4)
- .github/workflows/deploy-jazzy.yml (1 hunks)
- .github/workflows/test-jazzy.yml (1 hunks)
- jazzy/Dockerfile (1 hunks)
- jazzy/entrypoint.sh (1 hunks)
Files not reviewed due to errors (1)
- jazzy/entrypoint.sh (no review received)
Files skipped from review due to trivial changes (2)
- .github/workflows/deploy-jazzy.yml
- .github/workflows/test-jazzy.yml
Additional context used
Hadolint
jazzy/Dockerfile
[warning] 43-43: Pin versions in apt get install. Instead of
apt-get install <package>
useapt-get install <package>=<version>
[info] 43-43: Avoid additional packages by specifying
--no-install-recommends
[warning] 51-51: Pin versions in apt get install. Instead of
apt-get install <package>
useapt-get install <package>=<version>
[info] 51-51: Avoid additional packages by specifying
--no-install-recommends
[info] 63-63: Multiple consecutive
RUN
instructions. Consider consolidation.
[info] 64-64: Multiple consecutive
RUN
instructions. Consider consolidation.
[info] 67-67: Multiple consecutive
RUN
instructions. Consider consolidation.
[info] 70-70: Multiple consecutive
RUN
instructions. Consider consolidation.
[info] 71-71: Multiple consecutive
RUN
instructions. Consider consolidation.
[info] 74-74: Avoid additional packages by specifying
--no-install-recommends
[warning] 74-74: Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check
[warning] 74-74: Pin versions in apt get install. Instead of
apt-get install <package>
useapt-get install <package>=<version>
[warning] 88-88: Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check
[warning] 88-88: Pin versions in apt get install. Instead of
apt-get install <package>
useapt-get install <package>=<version>
[info] 88-88: Avoid additional packages by specifying
--no-install-recommends
[info] 88-88: Avoid use of wget without progress bar. Use
wget --progress=dot:giga <url>
. Or consider using-q
or-nv
(shorthands for--quiet
or--no-verbose
).
[warning] 103-103: Either use Wget or Curl but not both
[info] 103-103: Avoid additional packages by specifying
--no-install-recommends
[warning] 103-103: Pin versions in apt get install. Instead of
apt-get install <package>
useapt-get install <package>=<version>
[warning] 103-103: Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check
[info] 129-129: Multiple consecutive
RUN
instructions. Consider consolidation.
Shellcheck
jazzy/entrypoint.sh
[info] 347-347: Want to escape a single quote? echo 'This is how it'''s done'.
[info] 349-349: Want to escape a single quote? echo 'This is how it'''s done'.
RUN wget -q https://packages.mozilla.org/apt/repo-signing-key.gpg \ | ||
-O /etc/apt/keyrings/packages.mozilla.org.asc && \ | ||
echo "deb [signed-by=/etc/apt/keyrings/packages.mozilla.org.asc] https://packages.mozilla.org/apt mozilla main" \ | ||
| tee -a /etc/apt/sources.list.d/mozilla-apt.list && \ | ||
echo 'Package: *Pin: origin packages.mozilla.orgPin-Priority: 900' \ | ||
| tee /etc/apt/preferences.d/mozilla-apt && \ | ||
apt-get update -q && \ | ||
apt-get install -y \ | ||
firefox && \ | ||
apt-get autoclean && \ | ||
apt-get autoremove && \ | ||
rm -rf /var/lib/apt/lists/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure the use of pipefail
when using pipes in RUN
commands to handle potential errors properly.
+ SHELL ["/bin/bash", "-o", "pipefail"]
- wget -q https://packages.mozilla.org/apt/repo-signing-key.gpg -O /etc/apt/keyrings/packages.mozilla.org.asc
+ wget --progress=dot:giga https://packages.mozilla.org/apt/repo-signing-key.gpg -O /etc/apt/keyrings/packages.mozilla.org.asc
Also, pin the Firefox version to ensure reproducibility and consider using --no-install-recommends
.
Committable suggestion was skipped due to low confidence.
Tools
Hadolint
[info] 74-74: Avoid additional packages by specifying
--no-install-recommends
[warning] 74-74: Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check
[warning] 74-74: Pin versions in apt get install. Instead of
apt-get install <package>
useapt-get install <package>=<version>
RUN apt-get update -q && \ | ||
DEBIAN_FRONTEND=noninteractive apt-get install -y \ | ||
ubuntu-mate-desktop && \ | ||
apt-get autoclean && \ | ||
apt-get autoremove && \ | ||
rm -rf /var/lib/apt/lists/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pin package versions to ensure reproducibility and avoid potential future compatibility issues.
- apt-get install -y ubuntu-mate-desktop
+ apt-get install -y ubuntu-mate-desktop=<specific_version>
Also, consider using --no-install-recommends
to minimize the installation of unnecessary packages.
Committable suggestion was skipped due to low confidence.
Tools
Hadolint
[warning] 43-43: Pin versions in apt get install. Instead of
apt-get install <package>
useapt-get install <package>=<version>
[info] 43-43: Avoid additional packages by specifying
--no-install-recommends
RUN apt-get update && \ | ||
DEBIAN_FRONTEND=noninteractive apt-get install -y \ | ||
tigervnc-standalone-server tigervnc-common \ | ||
supervisor wget curl gosu git sudo python3-full python3-pip tini \ | ||
build-essential vim sudo lsb-release locales \ | ||
bash-completion tzdata terminator && \ | ||
apt-get autoclean && \ | ||
apt-get autoremove && \ | ||
rm -rf /var/lib/apt/lists/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pin package versions to ensure reproducibility.
- apt-get install -y tigervnc-standalone-server tigervnc-common supervisor wget curl gosu git sudo python3-full python3-pip tini build-essential vim sudo lsb-release locales bash-completion tzdata terminator
+ apt-get install -y tigervnc-standalone-server=<version> tigervnc-common=<version> supervisor=<version> wget=<version> curl=<version> gosu=<version> git=<version> sudo=<version> python3-full=<version> python3-pip=<version> tini=<version> build-essential=<version> vim=<version> sudo=<version> lsb-release=<version> locales=<version> bash-completion=<version> tzdata=<version> terminator=<version>
Also, consider using --no-install-recommends
to minimize the installation of unnecessary packages.
Committable suggestion was skipped due to low confidence.
Tools
Hadolint
[warning] 51-51: Pin versions in apt get install. Instead of
apt-get install <package>
useapt-get install <package>=<version>
[info] 51-51: Avoid additional packages by specifying
--no-install-recommends
RUN wget https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg \ | ||
-O /usr/share/keyrings/vscodium-archive-keyring.asc && \ | ||
echo 'deb [ signed-by=/usr/share/keyrings/vscodium-archive-keyring.asc ] https://paulcarroty.gitlab.io/vscodium-deb-rpm-repo/debs vscodium main' \ | ||
| tee /etc/apt/sources.list.d/vscodium.list && \ | ||
apt-get update -q && \ | ||
apt-get install -y codium && \ | ||
apt-get autoclean && \ | ||
apt-get autoremove && \ | ||
rm -rf /var/lib/apt/lists/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure the use of pipefail
when using pipes in RUN
commands to handle potential errors properly.
+ SHELL ["/bin/bash", "-o", "pipefail"]
- wget https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg -O /usr/share/keyrings/vscodium-archive-keyring.asc
+ wget --progress=dot:giga https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg -O /usr/share/keyrings/vscodium-archive-keyring.asc
Also, pin the VSCodium version to ensure reproducibility and consider using --no-install-recommends
.
Committable suggestion was skipped due to low confidence.
Tools
Hadolint
[warning] 88-88: Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check
[warning] 88-88: Pin versions in apt get install. Instead of
apt-get install <package>
useapt-get install <package>=<version>
[info] 88-88: Avoid additional packages by specifying
--no-install-recommends
[info] 88-88: Avoid use of wget without progress bar. Use
wget --progress=dot:giga <url>
. Or consider using-q
or-nv
(shorthands for--quiet
or--no-verbose
).
RUN apt-get update -q && \ | ||
apt-get install -y curl gnupg2 lsb-release && \ | ||
curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg && \ | ||
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/ros2.list > /dev/null && \ | ||
apt-get update -q && \ | ||
apt-get install -y ros-${ROS_DISTRO}-${INSTALL_PACKAGE} \ | ||
python3-argcomplete \ | ||
python3-colcon-common-extensions \ | ||
python3-rosdep python3-vcstool && \ | ||
rosdep init && \ | ||
rm -rf /var/lib/apt/lists/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consolidate RUN
commands and ensure the use of pipefail
when using pipes to handle potential errors properly.
+ SHELL ["/bin/bash", "-o", "pipefail"]
- RUN apt-get update -q && \
- apt-get install -y curl gnupg2 lsb-release && \
- curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg && \
- echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/ros2.list > /dev/null && \
- apt-get update -q && \
- apt-get install -y ros-${ROS_DISTRO}-${INSTALL_PACKAGE} \
- python3-argcomplete \
- python3-colcon-common-extensions \
- python3-rosdep python3-vcstool && \
- rosdep init && \
- rm -rf /var/lib/apt/lists/*
+ RUN apt-get update -q && \
+ apt-get install -y curl gnupg2 lsb-release && \
+ curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg && \
+ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/ros2.list > /dev/null && \
+ apt-get update -q && \
+ apt-get install -y ros-${ROS_DISTRO}-${INSTALL_PACKAGE} \
+ python3-argcomplete \
+ python3-colcon-common-extensions \
+ python3-rosdep python3-vcstool && \
+ rosdep init && \
+ rm -rf /var/lib/apt/lists/*
Also, pin the versions of the installed packages to ensure reproducibility and consider using --no-install-recommends
.
Committable suggestion was skipped due to low confidence.
Tools
Hadolint
[warning] 103-103: Either use Wget or Curl but not both
[info] 103-103: Avoid additional packages by specifying
--no-install-recommends
[warning] 103-103: Pin versions in apt get install. Instead of
apt-get install <package>
useapt-get install <package>=<version>
[warning] 103-103: Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check
RUN pip install --no-cache-dir --break-system-packages git+https://github.com/novnc/[email protected] | ||
RUN ln -s /usr/lib/novnc/vnc.html /usr/lib/novnc/index.html | ||
|
||
# Set remote resize function enabled by default | ||
RUN sed -i "s/UI.initSetting('resize', 'off');/UI.initSetting('resize', 'remote');/g" /usr/lib/novnc/app/ui.js | ||
|
||
# Disable auto update and crash report | ||
RUN sed -i 's/Prompt=.*/Prompt=never/' /etc/update-manager/release-upgrades | ||
RUN sed -i 's/enabled=1/enabled=0/g' /etc/default/apport |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consolidate multiple RUN
instructions to reduce the number of layers in the Docker image.
- RUN git clone https://github.com/AtsushiSaito/noVNC.git -b add_clipboard_support /usr/lib/novnc
- RUN pip install --no-cache-dir --break-system-packages git+https://github.com/novnc/[email protected]
- RUN ln -s /usr/lib/novnc/vnc.html /usr/lib/novnc/index.html
- RUN sed -i "s/UI.initSetting('resize', 'off');/UI.initSetting('resize', 'remote');/g" /usr/lib/novnc/app/ui.js
- RUN sed -i 's/Prompt=.*/Prompt=never/' /etc/update-manager/release-upgrades
- RUN sed -i 's/enabled=1/enabled=0/g' /etc/default/apport
+ RUN git clone https://github.com/AtsushiSaito/noVNC.git -b add_clipboard_support /usr/lib/novnc && \
+ pip install --no-cache-dir --break-system-packages git+https://github.com/novnc/[email protected] && \
+ ln -s /usr/lib/novnc/vnc.html /usr/lib/novnc/index.html && \
+ sed -i "s/UI.initSetting('resize', 'off');/UI.initSetting('resize', 'remote');/g" /usr/lib/novnc/app/ui.js && \
+ sed -i 's/Prompt=.*/Prompt=never/' /etc/update-manager/release-upgrades && \
+ sed -i 's/enabled=1/enabled=0/g' /etc/default/apport
Committable suggestion was skipped due to low confidence.
Tools
Hadolint
[info] 63-63: Multiple consecutive
RUN
instructions. Consider consolidation.
[info] 64-64: Multiple consecutive
RUN
instructions. Consider consolidation.
[info] 67-67: Multiple consecutive
RUN
instructions. Consider consolidation.
[info] 70-70: Multiple consecutive
RUN
instructions. Consider consolidation.
[info] 71-71: Multiple consecutive
RUN
instructions. Consider consolidation.
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
Summary by CodeRabbit
New Features
Chores