Skip to content

Commit

Permalink
Update Dockerfile/CI tool versions (#424)
Browse files Browse the repository at this point in the history
* Update nvm version in Dockerfile

* (Dockerfile) convert node_version to arg

* (Dockerfile) small syntax change

* (actions) make node_version configurable
  • Loading branch information
MatthijsBurgh authored Apr 9, 2021
1 parent b51f21b commit 2e125d0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ jobs:
fail-fast: false
matrix:
ros_distro: [kinetic, melodic] # Temp remove noetic waitng for release of tf2_web_republisher
node_version: [14]
steps:
- uses: actions/checkout@v2
- name: Docker pull
run: docker pull ros:${{ matrix.ros_distro }}-ros-core
- name: Docker build
run: docker build --build-arg ROS_DISTRO="${{ matrix.ros_distro }}" -t roslibjsdocker .
run: docker build --build-arg ROS_DISTRO="${{ matrix.ros_distro }}" --build-arg NODE_VERSION="${{ matrix.node_version }}" -t roslibjsdocker .
- name: Tests
run: docker run -v $(pwd):/root/roslibjs --rm roslibjsdocker bash -i -c 'bash /root/roslibjs/test/build.bash'
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ FROM ros:$ROS_DISTRO-ros-core
RUN apt update && apt-get install -y xvfb firefox git wget ros-$ROS_DISTRO-rosbridge-server ros-$ROS_DISTRO-tf2-web-republisher ros-$ROS_DISTRO-common-tutorials ros-$ROS_DISTRO-rospy-tutorials ros-$ROS_DISTRO-actionlib-tutorials

# Install nvm, Node.js and node-gyp
ENV NODE_VERSION=v10.15.0
RUN wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash \
ARG NODE_VERSION=14
RUN wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash \
&& . $HOME/.nvm/nvm.sh \
&& nvm install $NODE_VERSION && nvm alias default $NODE_VERSION \
&& npm install -g node-gyp

RUN echo "source /opt/ros/$ROS_DISTRO/setup.bash" >> $HOME/.bashrc
ENV PATH /bin/versions/node/$NODE_VERSION/bin:$PATH
ENV PATH=/bin/versions/node/$NODE_VERSION/bin:$PATH

0 comments on commit 2e125d0

Please sign in to comment.