Skip to content

Commit

Permalink
Merge pull request #20 from lucimobility/main
Browse files Browse the repository at this point in the history
New 2.0.0 release
  • Loading branch information
Alex Ernst authored Aug 25, 2023
2 parents cfcd59c + 79e3fc6 commit 709d9a0
Show file tree
Hide file tree
Showing 28 changed files with 474 additions and 346 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/deploy-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Create and Deploy Docker

on:
workflow_dispatch:
inputs:
DEV:
type: boolean
description: "If the DEV image should be build"
required: true
default: false
RELEASE:
type: boolean
description: "If the public RELEASE image should be build"
required: true
default: false


env:
REPO: ${{github.event.repository.name}}
JF_URL: ${{secrets.JF_URL}}
JF_ACCESS_TOKEN: ${{secrets.ARTIFACTORY_TOKEN}}

jobs:
Build-and-deploy-dev:
runs-on: ubuntu-latest
steps:
- uses: jfrog/setup-jfrog-cli@v3

- name: Checkout SDK Branch
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
path: ${{env.REPO}}

- name: Build and deploy dev
if: ${{ github.event.inputs.DEV == 'true'}}
run: |
cd ${{env.REPO}}
./build-and-deploy-dockers.sh -d
shell: bash

Build-and-deploy-release:
runs-on: ubuntu-latest
steps:
- uses: jfrog/setup-jfrog-cli@v3
- name: Checkout SDK Branch
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
path: ${{env.REPO}}

- name: Build and deploy release
if: ${{ github.event.inputs.RELEASE == 'true' }}
run: |
cd ${{env.REPO}}
./build-and-deploy-dockers.sh -r
shell: bash
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ env:
jobs:
documentation:
runs-on: ubuntu-latest
container: luci.jfrog.io/ros2-sdk-docker-local/sdk-docs-deployment:beta
container: luci.jfrog.io/ros2-sdk-docker-local/sdk-docs-deployment:latest
steps:
- name: Checkout SDK Branch
uses: actions/checkout@v3
with:
ref: "main"
ref: ${{ github.ref }}
path: ${{env.SDK_REPO}}

- name: Clone and build docs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:
jobs:
documentation:
runs-on: ubuntu-latest
container: luci.jfrog.io/ros2-sdk-docker-local/sdk-docs-deployment:beta
container: luci.jfrog.io/ros2-sdk-docker-local/sdk-docs-deployment:latest
steps:

- name: Checkout SDK Branch
Expand Down
37 changes: 0 additions & 37 deletions CMakeLists.txt

This file was deleted.

67 changes: 0 additions & 67 deletions Dockerfile

This file was deleted.

24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@

This is the public repo for the LUCI ROS2 SDK.

All documentation for examples, packages, and use lives at https://lucimobility.github.io/luci-ros2-sdk-docs/
All documentation for examples, packages, and use lives at https://lucimobility.github.io/luci-sdk-docs/

## Docker Images
This repo supports multiple docker images in order to build and deploy them please see their respective folders README.md instructions.

## Documents

[Getting Started](docs/1_Getting-Started/1_getting-started.md)

Expand All @@ -20,3 +24,21 @@ All documentation for examples, packages, and use lives at https://lucimobility.


[Contributing](docs/CONTRIBUTING.md)


## Releasing new version (FOR LUCI TEAM) ##
When an update has occurred to one of the SDK packages and a new version of the SDK is ready to be released there are a couple steps to follow. It is important to note that most of the process is automated for convenience and the process should be just a couple of button clicks.

### Steps ###
1. Update release version
- This should be its own separate PR and should only update the `versions.json` file. Make sure that you have already officially released the SDK package with the version you are changing it to or this build will fail.
- LUCI follows [semver](https://semver.org/) style versioning so MAJOR.MINOR.PATCH versions are expected.
- It is okay to not put out versions until multiple changes have happened to the code.
2. Once the version increment is merged you simply need to create an official release in github.
- This should trigger an action to auto run called `Create Release Documentation` which you can monitor in the github actions panel. This should generate a new release tab on the documentation site.
3. Then to release the dev and public docker images go to github actions panel and run the `Create and Deploy Docker` action making sure to select both images. This should grab the released code, build the docker images for public use and push them to jrog artifactory.

If everything went smoothly congratulations the new docker images with packages and docs will be released and publicly distributable.


<b>NOTE: Once a PR is merged into the `main` branch the docs site in the `next` version will update with it that evening.</b>
30 changes: 30 additions & 0 deletions build-and-deploy-dockers.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash

while getopts 'dr' flag;
do
case "${flag}" in
d) development=true;;
r) release=true;;
esac
done

# Get current path of this file
parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )

if [ "$development" = true ]; then
echo "Development building..."
cd $parent_path/development
# Build development image
docker build -t luci.jfrog.io/ros2-sdk-docker-local/luci-sdk-development-image:latest .
# Push development image to jfrog
jf docker push luci.jfrog.io/ros2-sdk-docker-local/luci-sdk-development-image:latest
fi

if [ "$release" = true ]; then
echo "Release building..."
cd $parent_path/release
# Build release image
docker build -t luci.jfrog.io/ros2-sdk-docker-local/luci-ros2-sdk:latest .
# Push release image to jfrog
jf docker push luci.jfrog.io/ros2-sdk-docker-local/luci-ros2-sdk:latest
fi
17 changes: 17 additions & 0 deletions deployment-scripts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
This folder is used by Github actions to auto build the SDK documentation that is hosted at https://lucimobility.github.io/luci-sdk-docs/

# Building

This docker container is by github actions to build the docs site. Building should only be needed if updating tools needed for docs generation.

## Building manually

In order to build this docker file please run the following commands
1. git clone this repository
2. `cd deployment-scripts`
3. `docker build -t luci.jfrog.io/ros2-sdk-docker-local/sdk-docs-deployment:latest .`

# Using (FOR LUCI EMPLOYEES)

In order for this image to be used in the github actions it needs to be uploaded to the artifactory in jfrog.
`docker push luci.jfrog.io/ros2-sdk-docker-local/sdk-docs-deployment:latest`
2 changes: 1 addition & 1 deletion deployment-scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ if [[ $BUILD_TYPE == "production" ]];
then
git tag -a $REF_NAME -m "Docs Release for $REF_NAME";
fi
git push && git push origin $REF_NAME
git push && git push origin main
76 changes: 76 additions & 0 deletions development/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Docker image for developers adding / releasing packages
FROM ubuntu:22.04

# Set env variables used duing install of gRPC
ENV DEBIAN_FRONTEND=noninteractive \
MY_INSTALL_DIR=/usr

WORKDIR /root

# General install stuff
RUN apt update \
&& apt install -y \
cmake \
vim \
gdb \
build-essential \
autoconf \
libtool \
pkg-config \
libspdlog-dev \
curl \
gnupg \
lsb-release \
git \
automake \
make \
g++ \
unzip \
dpkg-sig \
&& apt-get clean

# Locales
RUN apt install locales \
&& locale-gen en_US en_US.UTF-8 \
&& update-locale LC_ALL=en_US.UTF-8 LAND=en_US.UTF-8 \
&& export LANG=en_US.UTF-8


# Add ROS repo
RUN apt update \
&& apt upgrade -y \
&& 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 $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | tee /etc/apt/sources.list.d/ros2.list > /dev/null

# Install (static) gRPC with protobuf, we can use versions newer then the ones used by LUCI because ite regenerated at compile time
RUN git clone -b v1.56.2 https://github.com/grpc/grpc grpc \
&& cd grpc \
&& git submodule update --init \
&& mkdir -p cmake/build \
&& cd cmake/build \
&& cmake -DgRPC_INSTALL=ON \
-DCMAKE_BUILD_TYPE=Release \
-DgRPC_BUILD_TESTS=OFF \
-DgRPC_PROTOBUF_PROVIDER=module \
-DCMAKE_INSTALL_PREFIX=$MY_INSTALL_DIR \
../.. \
&& make -j$(nproc) \
&& make install

# Install ROS2 Humble for LTS
RUN apt update \
&& apt install -y ros-dev-tools \
ros-humble-desktop \
python3-bloom \
python3-rosdep \
fakeroot \
debhelper \
dh-python \
&& apt-get clean


# Install Foxglove support
RUN apt install ros-humble-foxglove-bridge

# Add ROS2 sources to terminal by default
RUN echo source "/opt/ros/humble/setup.bash" >> /root/.bashrc
Loading

0 comments on commit 709d9a0

Please sign in to comment.