Skip to content

Commit

Permalink
Touchup Dockerfile and create a workflow building it (#323)
Browse files Browse the repository at this point in the history
  • Loading branch information
christophfroehlich committed Jun 29, 2023
1 parent 815e05e commit dbb7c65
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 8 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/humble-docker-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Build Humble Dockerfile
# description: builds the dockerfile contained within the repo

on:
pull_request:
branches:
- humble
push:
branches:
- humble
schedule:
# Run every morning to detect broken dependencies
- cron: '40 1 * * *'


jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build the Docker image
run: docker build . --file Dockerfile/Dockerfile --tag ros2_control_demos_humble
5 changes: 0 additions & 5 deletions .github/workflows/rolling-binary-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@ on:
# Run every morning to detect flakiness and broken dependencies
- cron: '03 1 * * *'

#TODO(christophfroehlich): remove once it is released
# otherwise ros-gz won't build
env:
GZ_VERSION: fortress

jobs:
binary:
uses: ./.github/workflows/reusable-industrial-ci-with-cache.yml
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/rolling-docker-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Build Rolling Dockerfile
# description: builds the dockerfile contained within the repo

on:
pull_request:
branches:
- master
push:
branches:
- master
schedule:
# Run every morning to detect broken dependencies
- cron: '50 1 * * *'


jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build the Docker image
run: docker build . --file Dockerfile/Dockerfile --tag ros2_control_demos_rolling
16 changes: 13 additions & 3 deletions Dockerfile/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,23 @@ FROM ros:${ROS_DISTRO}-ros-base
ENV DEBIAN_FRONTEND noninteractive

RUN apt-get update \
&& apt-get upgrade -y
&& apt-get upgrade -y \
&& \
: "remove cache" && \
apt-get autoremove -y -qq && \
rm -rf /var/lib/apt/lists/*

COPY . /home/ros2_ws/src/ros2_control_demos

RUN cd /home/ros2_ws/src \
&& rosdep update \
&& rosdep install --from-paths ./ -i -y --rosdistro ${ROS_DISTRO} --skip-keys rviz2
&& rosdep update --rosdistro ${ROS_DISTRO} \
&& apt-get update \
&& rosdep install --from-paths ./ -i -y --rosdistro ${ROS_DISTRO} \
--skip-keys ros-${ROS_DISTRO}-joint-state-publisher-gui --skip-keys ros-${ROS_DISTRO}-rviz2\
&& \
: "remove cache" && \
apt-get autoremove -y -qq && \
rm -rf /var/lib/apt/lists/*

RUN cd /home/ros2_ws/ \
&& . /opt/ros/${ROS_DISTRO}/setup.sh \
Expand Down

0 comments on commit dbb7c65

Please sign in to comment.