diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000000..f02258cd5d5 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,32 @@ +{ + "name": "Nav2", + "image": "ghcr.io/ros-planning/navigation2:main-dev", + "runArgs": [ + "--privileged", + "--network=host" + ], + "workspaceMount": "source=${localWorkspaceFolder},target=/opt/overlay_ws/src/navigation2,type=bind", + "workspaceFolder": "/opt/overlay_ws/src", + "features": { + // "ghcr.io/devcontainers/features/desktop-lite:1": {}, + "ghcr.io/devcontainers/features/github-cli:1": {} + }, + "customizations": { + "codespaces": { + "openFiles": [ + "doc/development/codespaces.md" + ] + }, + "vscode": { + "settings": {}, + "extensions": [ + "eamodio.gitlens", + "esbenp.prettier-vscode", + "GitHub.copilot", + "ms-iot.vscode-ros", + "streetsidesoftware.code-spell-checker", + "twxs.cmake" + ] + } + } +} diff --git a/.dockerignore b/.dockerignore index 5e31fef9d5b..19c4cc591c8 100644 --- a/.dockerignore +++ b/.dockerignore @@ -2,10 +2,11 @@ # Repo .circleci/ -.github/ +.devcontainer/ +.dockerignore .git/ .github/ -.dockerignore .gitignore -**Dockerfile **.Dockerfile +**Dockerfile +doc/ diff --git a/.github/workflows/update_ci_image.yaml b/.github/workflows/update_ci_image.yaml index 09537ff2145..a1d328c2ce4 100644 --- a/.github/workflows/update_ci_image.yaml +++ b/.github/workflows/update_ci_image.yaml @@ -36,7 +36,7 @@ jobs: trigger: ${{ steps.check.outputs.trigger }} no_cache: ${{ steps.check.outputs.no_cache }} container: - image: ghcr.io/ros-planning/navigation2:main + image: ghcr.io/ros-planning/navigation2:${{ github.ref_name }} steps: - name: "Check apt updates" id: check @@ -91,7 +91,7 @@ jobs: trigger=true fi echo "::set-output name=trigger::${trigger}" - - name: Build and push + - name: Build and push ${{ github.ref_name }} if: steps.config.outputs.trigger == 'true' id: docker_build uses: docker/build-push-action@v4 @@ -99,12 +99,33 @@ jobs: pull: true push: true no-cache: ${{ steps.config.outputs.no_cache }} - cache-from: type=registry,ref=ghcr.io/ros-planning/navigation2:main + cache-from: type=registry,ref=ghcr.io/ros-planning/navigation2:${{ github.ref_name }} cache-to: type=inline target: builder tags: | - ghcr.io/ros-planning/navigation2:main - ghcr.io/ros-planning/navigation2:main-${{ steps.config.outputs.timestamp }} + ghcr.io/ros-planning/navigation2:${{ github.ref_name }} + ghcr.io/ros-planning/navigation2:${{ github.ref_name }}-${{ steps.config.outputs.timestamp }} + - name: Image digest + if: steps.config.outputs.trigger == 'true' + run: echo ${{ steps.docker_build.outputs.digest }} + - name: Build and push ${{ github.ref_name }}-dev + if: steps.config.outputs.trigger == 'true' + id: docker_build + uses: docker/build-push-action@v4 + with: + pull: true + push: true + cache-from: | + type=registry,ref=ghcr.io/ros-planning/navigation2:${{ github.ref_name }} + type=registry,ref=ghcr.io/ros-planning/navigation2:${{ github.ref_name }}-dev + cache-to: type=inline + build-args: | + RUN_TESTS=True + FAIL_ON_TEST_FAILURE='' + target: tester + tags: | + ghcr.io/ros-planning/navigation2:${{ github.ref_name }}-dev + ghcr.io/ros-planning/navigation2:${{ github.ref_name }}-dev-${{ steps.config.outputs.timestamp }} - name: Image digest if: steps.config.outputs.trigger == 'true' run: echo ${{ steps.docker_build.outputs.digest }} diff --git a/doc/development/codespaces.md b/doc/development/codespaces.md new file mode 100644 index 00000000000..841db7532db --- /dev/null +++ b/doc/development/codespaces.md @@ -0,0 +1,23 @@ +# Codespaces + +TODO: welcome and introduction + +# Overview + +TODO: document devcontainer +TODO: reference extensions +TODO: use of dockercompose and services + +# Terminal + +TODO: link to vscode terminal + +# Graphics and Simulations + +TODO: vnc options +TODO: foxglove example +TODO: gazebo example with gzweb + +# References + +TODO: links to more info \ No newline at end of file