Skip to content

Commit

Permalink
Initial commit of repo
Browse files Browse the repository at this point in the history
  • Loading branch information
amarburg committed Aug 19, 2024
0 parents commit 7ccff39
Show file tree
Hide file tree
Showing 14 changed files with 408 additions and 0 deletions.
Empty file added .dockerignore
Empty file.
62 changes: 62 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Bug Report
description: Report a bug.
title: "[BUG]: <Please write a descriptive title after the '[BUG]: ' prefix>"
labels: [bug, needs triage]

body:
- type: markdown
attributes:
value: >
Thank you for taking the time to file a bug report! Before creating a new
issue, please make sure to take a few minutes to check the issue tracker
for existing issues about the bug.
- type: textarea
attributes:
label: "Issue Description"
description: >
Please provide a clear and concise description of what the bug is.
validations:
required: true

- type: textarea
attributes:
label: "Steps to Reproduce"
description: >
Please provide the steps that should be taken to reproduce the bug.
validations:
required: true

- type: textarea
attributes:
label: "Expected Behavior"
description: >
Please describe or show an example of the expected behavior.
validations:
required: true

- type: textarea
attributes:
label: "Error Message"
description: >
Please include the full error message, if any.
placeholder: >
<< Full traceback starting from `Traceback: ...` >>
render: bash

- type: textarea
attributes:
label: "Runtime Environment"
description: >
Please provide a description of the environment in which the error
occurred.
placeholder: >
Raspberry Pi 4 running Ubuntu 22.04 natively.
validations:
required: true

- type: textarea
attributes:
label: "Additional Context"
description: >
Please provide any additional context needed to understand the bug.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
46 changes: 46 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Documentation Improvement
description: Report an issue related to the project documentation.
title: "[DOC]: <Please write a descriptive title after the '[DOC]: ' prefix>"
labels: [documentation, needs triage]

body:
- type: markdown
attributes:
value: >
Thank you for taking the time to report a documentation issue! Before creating
a new issue, please make sure to take a few minutes to check the issue
tracker for existing issues similar to that being reported.
- type: dropdown
attributes:
label: Documentation Change Type
description: Please indicate what type of documentation issue you are reporting.
options:
- Adding new documentation to the project
- Changing existing project documentation
- Removing existing project documentation
validations:
required: true

- type: textarea
attributes:
label: Documentation Location
description: >
Please provide the location of the documentation that should be modified.
- type: textarea
attributes:
label: Documentation Problem
description: >
Please provide a description of how the documentation needs to be improved.
validations:
required: true

- type: textarea
attributes:
label: Suggested Change
description: >
Please provide a description of the proposed change and why the proposed change
improves the upon the existing documentation.
validations:
required: true
57 changes: 57 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Feature Request
description: Suggest a new idea for the project.
title: "[FEATURE]: <Please write a descriptive title after the '[FEATURE]: ' prefix>"
labels: [enhancement, needs triage]

body:
- type: markdown
attributes:
value: >
Thank you for taking the time to request a new feature! Before creating
a new issue, please make sure to take a few minutes to check the issue
tracker for existing issues similar to the proposed feature.
- type: dropdown
attributes:
label: Feature Type
description: Please indicate what type of feature request you would like to propose.
options:
- Adding new functionality to the project
- Changing existing functionality in the project
- Removing existing functionality in the project
validations:
required: true

- type: textarea
attributes:
label: "Problem Description"
description: >
Please provide a clear and concise description of what problem
the feature would solve.
validations:
required: true

- type: textarea
attributes:
label: "Feature Description"
description: >
Please provide a description of the proposed feature, using pseudocode
if relevant.
validations:
required: true

- type: textarea
attributes:
label: "Alternative Solutions"
description: >
Please provide a description of any alternative solutions or features
that would satisfy the feature request.
validations:
required: true

- type: textarea
attributes:
label: "Additional Context"
description: >
Please provide any additional context (e.g., relevant GitHub issues,
code examples, or references) needed to understand the feature request.
15 changes: 15 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## Changes Made

Please provide a description of all changes made in this PR and why the changes
are needed.

## Associated Issues

Please provide a list of all open issues that this PR will close or contribute
toward closing.

- Fixes # (issue)

## Testing

Please provide a clear and concise description of the testing performed.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: "weekly"
82 changes: 82 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Docker

on:
push:
branches:
- main
pull_request:
paths:
- Dockerfile
- .github/workflows/docker.yaml
workflow_dispatch:

env:
PUSH: ${{ (github.event_name != 'pull_request') && (github.repository == 'apl-ocean-engineering/foxglove-bridge-docker') }}

jobs:
docker_build:
strategy:
fail-fast: false
matrix:
ROS_DISTRO: [rolling]
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
env:
IMAGE_ROS_DISTRO: ${{ matrix.ROS_DISTRO }}
IMAGE_GITHUB_REPO: ${{ github.repository }}
steps:
-
name: Checkout repository
uses: actions/checkout@v4

-
# Add support for more platforms with QEMU (optional)
# https://github.com/docker/setup-qemu-action
name: Set up QEMU
uses: docker/setup-qemu-action@v3

-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

-
if: env.PUSH == 'true'
name: Log into registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# -
# name: Extract Docker metadata
# if: env.PUSH == 'true'
# id: meta
# uses: docker/[email protected]
# with:
# images: ghcr.io/${{ github.repository }}
# tags: |
# type=raw,value=${{ matrix.ROS_DISTRO }}-${{ matrix.stage }}

- if: github.event_name == 'push'
name: Build and push (non PR)
uses: docker/[email protected]
with:
workdir: .docker
push: ${{ env.PUSH }}
set: |
*.cache-from=type=gha,scope=foxglove
*.cache-to=type=gha,scope=foxglove
- if: github.event_name == 'pull_request'
name: Build and push (PR)
uses: docker/[email protected]
with:
workdir: .docker
targets: |
${{ matrix.stage }}
set: |
*.cache-from=type=gha,scope=foxglove
*.cache-to=
34 changes: 34 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Formatting (pre-commit)

on:
pull_request:
push:
branches:
- main
workflow_dispatch:

jobs:
pre-commit:
name: Format
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Install clang-format-14
run: sudo apt-get install clang-format-14

- name: Run pre-commit
uses: pre-commit/[email protected]
id: precommit

- name: Upload pre-commit changes
if: failure() && steps.precommit.outcome == 'failure'
uses: rhaschke/upload-git-patch-action@main
with:
name: pre-commit
42 changes: 42 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
repos:
- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
- id: black

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.291
hooks:
- id: ruff
args: ["--fix", "--exit-non-zero-on-fix"]

- repo: https://github.com/codespell-project/codespell
rev: v2.2.4
hooks:
- id: codespell
args: ["--write-changes"]

# Lint: Dockerfile
- repo: https://github.com/hadolint/hadolint
rev: v2.13.0-beta
hooks:
- id: hadolint-docker
entry: hadolint/hadolint:v2.12.1-beta hadolint

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-json
- id: check-toml
- id: check-yaml
- id: check-xml
- id: check-merge-conflict
- id: check-symlinks
- id: debug-statements
- id: destroyed-symlinks
- id: detect-private-key
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# hadolint global ignore=DL3008
# DL3008 is "apt version pinning"
ARG ROS_DISTRO=rolling
FROM ros:$ROS_DISTRO-ros-base AS foxglove-bridge

RUN apt-get -q update \
&& apt-get -q -y upgrade \
&& apt-get -q install --no-install-recommends -y \
"ros-${ROS_DISTRO}-foxglove-bridge" \
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf "/var/lib/apt/lists/*"

CMD ["ros2", "launch", "foxglove_bridge", "foxglove_bridge_launch.xml"]
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# foxglove-bridge-docker

Extremely trivial Dockerfile wrapper which installs [Foxglove ROS Bridge](https://docs.foxglove.dev/docs/connecting-to-data/ros-foxglove-bridge/) into a ROS2 image.
Loading

0 comments on commit 7ccff39

Please sign in to comment.