From 01fc64796c6972aba05d4d26b76e46ee4b0f2e78 Mon Sep 17 00:00:00 2001 From: Yutaka Kondo Date: Tue, 28 May 2024 22:57:43 +0900 Subject: [PATCH] refactor(docker,ci): rename `autoware-openadk` to `autoware` and `adkit` to `openadkit` (#4785) * rename adkit to openadkit Signed-off-by: Yutaka Kondo * rename autoware-openadkit to autoware Signed-off-by: Yutaka Kondo * fix hcl path Signed-off-by: Yutaka Kondo --------- Signed-off-by: Yutaka Kondo --- .devcontainer/base/devcontainer.json | 2 +- .devcontainer/cuda/devcontainer.json | 2 +- .github/actions/docker-build-and-push/action.yaml | 6 +++--- .github/workflows/build-main-self-hosted.yaml | 2 +- .github/workflows/build-main.yaml | 2 +- .../docker-build-and-push-main-self-hosted.yaml | 6 +++--- .github/workflows/docker-build-and-push-main.yaml | 6 +++--- .github/workflows/update-docker-manifest.yaml | 4 ++-- ansible/playbooks/{openadk.yaml => openadkit.yaml} | 0 docker/{autoware-openadk => }/Dockerfile | 14 +++++++------- docker/build.sh | 10 +++++----- docker/{autoware-openadk => }/docker-bake.hcl | 6 +++--- docker/{autoware-openadk => }/etc/.bash_aliases | 0 .../{autoware-openadk => }/etc/ros_entrypoint.sh | 0 docker/run.sh | 6 +++--- 15 files changed, 33 insertions(+), 33 deletions(-) rename ansible/playbooks/{openadk.yaml => openadkit.yaml} (100%) rename docker/{autoware-openadk => }/Dockerfile (93%) rename docker/{autoware-openadk => }/docker-bake.hcl (76%) rename docker/{autoware-openadk => }/etc/.bash_aliases (100%) rename docker/{autoware-openadk => }/etc/ros_entrypoint.sh (100%) diff --git a/.devcontainer/base/devcontainer.json b/.devcontainer/base/devcontainer.json index 939cc741f5e..f3b5ffe9984 100644 --- a/.devcontainer/base/devcontainer.json +++ b/.devcontainer/base/devcontainer.json @@ -2,7 +2,7 @@ "name": "Autoware", "build": { "dockerfile": "../Dockerfile", - "args": { "BASE_IMAGE": "ghcr.io/autowarefoundation/autoware-openadk:latest-devel" } + "args": { "BASE_IMAGE": "ghcr.io/autowarefoundation/autoware:latest-devel" } }, "remoteUser": "autoware", "runArgs": [ diff --git a/.devcontainer/cuda/devcontainer.json b/.devcontainer/cuda/devcontainer.json index bc0efde100f..bb0b6ad849e 100644 --- a/.devcontainer/cuda/devcontainer.json +++ b/.devcontainer/cuda/devcontainer.json @@ -2,7 +2,7 @@ "name": "Autoware-cuda", "build": { "dockerfile": "../Dockerfile", - "args": { "BASE_IMAGE": "ghcr.io/autowarefoundation/autoware-openadk:latest-devel-cuda" } + "args": { "BASE_IMAGE": "ghcr.io/autowarefoundation/autoware:latest-devel-cuda" } }, "remoteUser": "autoware", "hostRequirements": { diff --git a/.github/actions/docker-build-and-push/action.yaml b/.github/actions/docker-build-and-push/action.yaml index 53a95eb8fe7..bca96dd7368 100644 --- a/.github/actions/docker-build-and-push/action.yaml +++ b/.github/actions/docker-build-and-push/action.yaml @@ -98,7 +98,7 @@ runs: with: push: ${{ inputs.allow-push == 'true' }} files: | - docker/${{ inputs.bake-target }}/docker-bake.hcl + docker/docker-bake.hcl ${{ steps.meta-prebuilt.outputs.bake-file }} ${{ steps.meta-devel.outputs.bake-file }} targets: | @@ -114,7 +114,7 @@ runs: with: push: true files: | - docker/${{ inputs.bake-target }}/docker-bake.hcl + docker/docker-bake.hcl ${{ steps.meta-devel.outputs.bake-file }} ${{ steps.meta-prebuilt.outputs.bake-file }} ${{ steps.meta-runtime.outputs.bake-file }} @@ -128,7 +128,7 @@ runs: with: push: false files: | - docker/${{ inputs.bake-target }}/docker-bake.hcl + docker/docker-bake.hcl ${{ steps.meta-devel.outputs.bake-file }} ${{ steps.meta-prebuilt.outputs.bake-file }} ${{ steps.meta-runtime.outputs.bake-file }} diff --git a/.github/workflows/build-main-self-hosted.yaml b/.github/workflows/build-main-self-hosted.yaml index 9c40bcfd5b2..9e85f01bd3e 100644 --- a/.github/workflows/build-main-self-hosted.yaml +++ b/.github/workflows/build-main-self-hosted.yaml @@ -50,7 +50,7 @@ jobs: - name: Build 'autoware-universe' uses: ./.github/actions/docker-build-and-push with: - bake-target: autoware-openadk + bake-target: autoware build-args: | *.platform=linux/arm64 *.args.ROS_DISTRO=${{ needs.load-env.outputs.rosdistro }} diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 1fff60ce250..1c8123f360e 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -45,7 +45,7 @@ jobs: - name: Build 'autoware-universe' uses: ./.github/actions/docker-build-and-push with: - bake-target: autoware-openadk + bake-target: autoware build-args: | *.platform=linux/amd64 *.args.ROS_DISTRO=${{ needs.load-env.outputs.rosdistro }} diff --git a/.github/workflows/docker-build-and-push-main-self-hosted.yaml b/.github/workflows/docker-build-and-push-main-self-hosted.yaml index ff5ae7a16c6..772ba389e82 100644 --- a/.github/workflows/docker-build-and-push-main-self-hosted.yaml +++ b/.github/workflows/docker-build-and-push-main-self-hosted.yaml @@ -9,7 +9,7 @@ name: docker-build-and-push-main-self-hosted on: push: tags: - - adkit-v*.*.* + - openadkit-v*.*.* branches: - main schedule: @@ -75,10 +75,10 @@ jobs: mkdir src vcs import src < autoware.repos - - name: Build 'autoware-openadk' + - name: Build 'Autoware' uses: ./.github/actions/docker-build-and-push with: - bake-target: autoware-openadk + bake-target: autoware build-args: | *.platform=linux/arm64 *.args.ROS_DISTRO=${{ needs.load-env.outputs.rosdistro }} diff --git a/.github/workflows/docker-build-and-push-main.yaml b/.github/workflows/docker-build-and-push-main.yaml index ee132df8666..118ba5413e5 100644 --- a/.github/workflows/docker-build-and-push-main.yaml +++ b/.github/workflows/docker-build-and-push-main.yaml @@ -9,7 +9,7 @@ name: docker-build-and-push-main on: push: tags: - - adkit-v*.*.* + - openadkit-v*.*.* branches: - main schedule: @@ -70,10 +70,10 @@ jobs: mkdir src vcs import src < autoware.repos - - name: Build 'autoware-openadk' + - name: Build 'Autoware' uses: ./.github/actions/docker-build-and-push with: - bake-target: autoware-openadk + bake-target: autoware build-args: | *.platform=linux/amd64 *.args.ROS_DISTRO=${{ needs.load-env.outputs.rosdistro }} diff --git a/.github/workflows/update-docker-manifest.yaml b/.github/workflows/update-docker-manifest.yaml index 7c63a54dcb5..a0539b037ed 100644 --- a/.github/workflows/update-docker-manifest.yaml +++ b/.github/workflows/update-docker-manifest.yaml @@ -12,7 +12,7 @@ jobs: - name: Check out repository uses: actions/checkout@v4 - - name: Combine multi arch images for 'autoware-openadk' + - name: Combine multi arch images for 'Autoware' uses: ./.github/actions/combine-multi-arch-images with: - package-name: autoware-openadk + package-name: autoware diff --git a/ansible/playbooks/openadk.yaml b/ansible/playbooks/openadkit.yaml similarity index 100% rename from ansible/playbooks/openadk.yaml rename to ansible/playbooks/openadkit.yaml diff --git a/docker/autoware-openadk/Dockerfile b/docker/Dockerfile similarity index 93% rename from docker/autoware-openadk/Dockerfile rename to docker/Dockerfile index 0ee7ebfa0d2..b1374e5fad6 100644 --- a/docker/autoware-openadk/Dockerfile +++ b/docker/Dockerfile @@ -20,7 +20,7 @@ WORKDIR /autoware # Set up base environment RUN --mount=type=ssh \ - ./setup-dev-env.sh -y --module base --runtime openadk \ + ./setup-dev-env.sh -y --module base --runtime openadkit \ && pip uninstall -y ansible ansible-core \ && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* "$HOME"/.cache \ && echo "source /opt/ros/${ROS_DISTRO}/setup.bash" > /etc/bash.bashrc @@ -72,7 +72,7 @@ ENV CXX="/usr/lib/ccache/g++" # cspell: ignore libcu libnv # Set up development environment RUN --mount=type=ssh \ - ./setup-dev-env.sh -y --module all ${SETUP_ARGS} --no-cuda-drivers openadk \ + ./setup-dev-env.sh -y --module all ${SETUP_ARGS} --no-cuda-drivers openadkit \ && pip uninstall -y ansible ansible-core \ && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* "$HOME"/.cache \ && find / -name 'libcu*.a' -delete \ @@ -105,12 +105,12 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] # Install development tools and artifacts RUN --mount=type=ssh \ - ./setup-dev-env.sh -y --module dev-tools openadk \ + ./setup-dev-env.sh -y --module dev-tools openadkit \ && pip uninstall -y ansible ansible-core \ && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* "$HOME"/.cache # Create entrypoint -COPY docker/autoware-openadk/etc/ros_entrypoint.sh /ros_entrypoint.sh +COPY docker/etc/ros_entrypoint.sh /ros_entrypoint.sh RUN chmod +x /ros_entrypoint.sh ENTRYPOINT ["/ros_entrypoint.sh"] CMD ["/bin/bash"] @@ -125,7 +125,7 @@ ARG SETUP_ARGS COPY --from=src-imported /rosdep-exec-depend-packages.txt /tmp/rosdep-exec-depend-packages.txt # hadolint ignore=SC2002 RUN --mount=type=ssh \ - ./setup-dev-env.sh -y --module all ${SETUP_ARGS} --no-cuda-drivers --runtime openadk \ + ./setup-dev-env.sh -y --module all ${SETUP_ARGS} --no-cuda-drivers --runtime openadkit \ && pip uninstall -y ansible ansible-core \ && apt-get update \ && cat /tmp/rosdep-exec-depend-packages.txt | xargs apt-get install -y --no-install-recommends \ @@ -143,11 +143,11 @@ RUN --mount=type=ssh \ COPY --from=prebuilt /autoware/install/ /autoware/install/ # Copy bash aliases -COPY docker/autoware-openadk/etc/.bash_aliases /root/.bash_aliases +COPY docker/etc/.bash_aliases /root/.bash_aliases RUN echo "source /autoware/install/setup.bash" > /etc/bash.bashrc # Create entrypoint -COPY docker/autoware-openadk/etc/ros_entrypoint.sh /ros_entrypoint.sh +COPY docker/etc/ros_entrypoint.sh /ros_entrypoint.sh RUN chmod +x /ros_entrypoint.sh ENTRYPOINT ["/ros_entrypoint.sh"] CMD ["bash"] diff --git a/docker/build.sh b/docker/build.sh index fe9917b7575..3d0a417c952 100755 --- a/docker/build.sh +++ b/docker/build.sh @@ -16,7 +16,7 @@ print_help() { } SCRIPT_DIR=$(readlink -f "$(dirname "$0")") -WORKSPACE_ROOT="$SCRIPT_DIR/../" +WORKSPACE_ROOT="$SCRIPT_DIR/.." # Parse arguments parse_arguments() { @@ -111,7 +111,7 @@ build_images() { echo "Targets: ${targets[*]}" set -x - docker buildx bake --load --progress=plain -f "$SCRIPT_DIR/autoware-openadk/docker-bake.hcl" \ + docker buildx bake --load --progress=plain -f "$SCRIPT_DIR/docker-bake.hcl" \ --set "*.context=$WORKSPACE_ROOT" \ --set "*.ssh=default" \ --set "*.platform=$platform" \ @@ -119,9 +119,9 @@ build_images() { --set "*.args.BASE_IMAGE=$base_image" \ --set "*.args.SETUP_ARGS=$setup_args" \ --set "*.args.LIB_DIR=$lib_dir" \ - --set "devel.tags=ghcr.io/autowarefoundation/autoware-openadk:latest-devel$image_name_suffix" \ - --set "prebuilt.tags=ghcr.io/autowarefoundation/autoware-openadk:latest-prebuilt$image_name_suffix" \ - --set "runtime.tags=ghcr.io/autowarefoundation/autoware-openadk:latest-runtime$image_name_suffix" \ + --set "devel.tags=ghcr.io/autowarefoundation/autoware:latest-devel$image_name_suffix" \ + --set "prebuilt.tags=ghcr.io/autowarefoundation/autoware:latest-prebuilt$image_name_suffix" \ + --set "runtime.tags=ghcr.io/autowarefoundation/autoware:latest-runtime$image_name_suffix" \ "${targets[@]}" set +x } diff --git a/docker/autoware-openadk/docker-bake.hcl b/docker/docker-bake.hcl similarity index 76% rename from docker/autoware-openadk/docker-bake.hcl rename to docker/docker-bake.hcl index d472a0df008..893edd69e1c 100644 --- a/docker/autoware-openadk/docker-bake.hcl +++ b/docker/docker-bake.hcl @@ -9,18 +9,18 @@ target "docker-metadata-action-runtime" {} target "prebuilt" { inherits = ["docker-metadata-action-prebuilt"] - dockerfile = "docker/autoware-openadk/Dockerfile" + dockerfile = "docker/Dockerfile" target = "prebuilt" } target "devel" { inherits = ["docker-metadata-action-devel"] - dockerfile = "docker/autoware-openadk/Dockerfile" + dockerfile = "docker/Dockerfile" target = "devel" } target "runtime" { inherits = ["docker-metadata-action-runtime"] - dockerfile = "docker/autoware-openadk/Dockerfile" + dockerfile = "docker/Dockerfile" target = "runtime" } diff --git a/docker/autoware-openadk/etc/.bash_aliases b/docker/etc/.bash_aliases similarity index 100% rename from docker/autoware-openadk/etc/.bash_aliases rename to docker/etc/.bash_aliases diff --git a/docker/autoware-openadk/etc/ros_entrypoint.sh b/docker/etc/ros_entrypoint.sh similarity index 100% rename from docker/autoware-openadk/etc/ros_entrypoint.sh rename to docker/etc/ros_entrypoint.sh diff --git a/docker/run.sh b/docker/run.sh index ebcd32ff29e..e26bd5c4a37 100755 --- a/docker/run.sh +++ b/docker/run.sh @@ -10,7 +10,7 @@ GREEN='\033[0;32m' NC='\033[0m' # No Color SCRIPT_DIR=$(readlink -f "$(dirname "$0")") -WORKSPACE_ROOT="$SCRIPT_DIR/../" +WORKSPACE_ROOT="$SCRIPT_DIR/.." source "$WORKSPACE_ROOT/amd64.env" if [ "$(uname -m)" = "aarch64" ]; then source "$WORKSPACE_ROOT/arm64.env" @@ -124,9 +124,9 @@ set_variables() { # Set image based on option if [ "$option_devel" == "true" ]; then - IMAGE="ghcr.io/autowarefoundation/autoware-openadk:latest-devel" + IMAGE="ghcr.io/autowarefoundation/autoware:latest-devel" else - IMAGE="ghcr.io/autowarefoundation/autoware-openadk:latest-runtime" + IMAGE="ghcr.io/autowarefoundation/autoware:latest-runtime" fi }