Docker-Based Stretch Installation Testing
Last updated
Was this helpful?
This directory contains utility scripts and configurations for building and testing the Stretch Robot Installation script (stretch_new_robot_install.sh) in an isolated Docker container.
A GitHub Actions workflow is also configured to run these tests automatically on push or pull requests to the main branch.
You can run the build and verification steps locally on any system with Docker installed.
The build.sh script handles building the Docker image. It accepts a specific robot Fleet ID to mock the calibration and configuration files.
To build the default image (stretch-install:stretch-se4-0000):
./.github/docker/build.shTo build for a specific model (e.g., stretch-se4-0001):
./.github/docker/build.sh -f stretch-se4-0001To build with a custom image name:
./.github/docker/build.sh -f stretch-se4-0001 -n custom-stretch-testThe test.sh script runs a suite of 12 verification checks (e.g., checking configuration files, installed packages, ROS Humble installation, directory structures, and log status) against the built image.
To test the default image:
To test a custom-named image:
common.sh)Both scripts source common.sh for shared configurations:
Color Definitions & Log Handlers: Provides unified log output styling ([INFO], [PASS], [FAIL], etc.).
Docker Check: Detects if your user is in the docker group and automatically prepends sudo to docker commands if root permissions are required.
The workflow file at test-installation.yaml runs these same scripts automatically in GitHub Actions for every pull request and push to master.
It uses a matrix strategy to test multiple models (e.g., stretch-se4-0000) concurrently, if desired:
Checks out the repository.
Sets up Docker Buildx.
Invokes build.sh to compile the Docker image.
Invokes test.sh to run the verification tests.
Last updated
Was this helpful?
Was this helpful?
./.github/docker/test.sh -i stretch-install:stretch-se4-0000./.github/docker/test.sh -i custom-stretch-test:stretch-se4-0001