Create Builds with Robotairâ¿»
Estimated time to read: 4 minutes
This guide walks you through packaging and automating your ROS application into container images using Robotair. You’ll configure build settings, handle dependencies, and generate CI pipelines ready to push secure, signed images to your container registry.
Prerequisitesâ¿»
Before you begin, ensure:
- You have a working ROS 1 or ROS 2 application in a Git repository.
- You have access to Robotair and a container registry (e.g., Docker Hub, GitLab, or private).
1. Prepare Your Repositoryâ¿»
- Clone your project
- Create a CI configuration branch
2. Create a New Build on Robotairâ¿»
- Log into your Robotair account and navigate to the Builds section.
- Click Create New Build to launch the wizard.
3. Configure and Containerize Your Applicationâ¿»
Step 1: Set Build Parametersâ¿»
- Choose a name and ROS version (e.g., Noetic, Humble, Jazzy).
- Click Next to proceed.
Step 2: Define Build Requirementsâ¿»
- Base Image: Select OSRF default or custom base image.
- Compiler: Choose your toolchain.
- Startup Command: Define the entry point of your application.
!!! example
Examples:
- ros2 launch my_pkg start.launch.py
- ros2 run my_pkg main_node
- bash start.sh
Step 3: Add Dependenciesâ¿»
- System dependencies (APT): defined in
package.xml
. - Python packages:
Step 4: Configure Secure Git Accessâ¿»
If your repo includes private dependencies:
-
Add SSH Deploy Keys:
-
Hostname: e.g.,
github.com
orgitlab.example.com
- Secret Name: e.g.,
SSH_KEYS
Step 5: Manage ROS Package Dependenciesâ¿»
- Add a
.repos
or.rosinstall
file:
Step 6: Define Startup Commandsâ¿»
- Provide the startup commands (in sequence) to initialize your ROS app.
4. Package the Applicationâ¿»
Step 1: Set Image Configurationâ¿»
- Image Name: e.g.,
myrobot/app:latest
- Architecture:
amd64
orarm64
Step 2: Add Registry Credentialsâ¿»
- Registry URL: (e.g., DockerHub or private registry)
- Username
- Password Secret: Use a CI/CD secret like
REGISTRY_PASSWORD
Warning
Never enter passwords directly store them as CI/CD secrets to avoid plaintext exposure.
5. Generate and Review CI Filesâ¿»
- Review your build configuration.
- Click Create to generate the CI pipeline and metadata files.
6. Integrate with GitHub or GitLabâ¿»
Step 1: Download and Place CI Filesâ¿»
-
GitHub:
-
Place
main.yaml
in.github/workflows/
- Place
Rigelfile
at the root of your repo -
GitLab:
-
Rename and place
gitlab-ci.yaml
as.gitlab-ci.yml
- Place
Rigelfile
at repo root
Step 2: Add Secretsâ¿»
-
In your repo settings:
-
REGISTRY_PASSWORD
: registry access secret SSH_KEYS
: deploy key for private dependencies
Step 3: Push Your Build Configurationâ¿»
Step 4: Monitor the CI Buildâ¿»
- Once you merge to main, the CI will build and push the image automatically.
- You’ll see the container appear in your registry and ready to deploy with Robotair.