Skip to content

Commit

Permalink
Use eclipse-velocitas/cli latest release, fixup lfs (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
doosuu authored Jan 16, 2023
1 parent 17d7fc7 commit faa28b1
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 21 deletions.
12 changes: 5 additions & 7 deletions Dockerfiles/Cpp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,6 @@ RUN apt-get --fix-missing update && apt-get upgrade -y && \
update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-14 100 && \
update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-14 100

# Install CLI
ARG TARGETARCH
COPY ./bin/velocitas-cli-$TARGETARCH /usr/bin/velocitas

# Install devcontainer features
ADD https://raw.githubusercontent.com/devcontainers/features/7fa90110d762797cc0b1c2fe8fcc028c9b813d56/src/common-utils/install.sh /container/scripts/install-common.sh
RUN UID="4000" bash /container/scripts/install-common.sh
Expand All @@ -96,13 +92,15 @@ RUN VERSION="latest" bash /container/scripts/install-dind.sh

COPY ./common/ /scripts/

ARG TARGETARCH
WORKDIR /scripts
RUN ./install-python.sh && \
./install-dapr-cli.sh && \
./install-k3d-prerequisites.sh \
./install-k3d-tooling.sh

./install-k3d-prerequisites.sh && \
./install-velocitas-cli.sh ${TARGETARCH}
USER 4000
RUN ./install-k3d-tooling.sh

ADD --chown=4000 https://raw.githubusercontent.com/eclipse-velocitas/vehicle-app-cpp-sdk/main/requirements.txt /container/requirements.txt
# Install Python requirements as vscode user and clean up
RUN pip3 install -r /container/requirements.txt && sudo rm /container/requirements.txt
Expand Down
13 changes: 6 additions & 7 deletions Dockerfiles/Python/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,20 @@ RUN apt-get update && apt-get upgrade -y && \
libstdc++6 zlib1g locales sudo ncdu man-db strace gnupg2 \
build-essential python3-dev

# Install CLI
ARG TARGETARCH
COPY ./bin/velocitas-cli-$TARGETARCH /usr/bin/velocitas

# Install devcontainer features
ADD https://raw.githubusercontent.com/devcontainers/features/7fa90110d762797cc0b1c2fe8fcc028c9b813d56/src/common-utils/install.sh /tmp/scripts/install-common.sh
RUN UID="4000" bash /tmp/scripts/install-common.sh
ADD https://raw.githubusercontent.com/devcontainers/features/7fa90110d762797cc0b1c2fe8fcc028c9b813d56/src/docker-in-docker/install.sh /tmp/scripts/install-dind.sh
RUN VERSION="latest" bash /tmp/scripts/install-dind.sh

COPY ./common/ /scripts/

ARG TARGETARCH
WORKDIR /scripts
RUN ./install-python.sh
RUN ./install-dapr-cli.sh
RUN ./install-k3d-prerequisites.sh
RUN ./install-python.sh && \
./install-dapr-cli.sh && \
./install-k3d-prerequisites.sh && \
./install-velocitas-cli.sh ${TARGETARCH}
USER 4000
RUN ./install-k3d-tooling.sh

Expand Down
3 changes: 0 additions & 3 deletions bin/velocitas-cli-amd64

This file was deleted.

3 changes: 0 additions & 3 deletions bin/velocitas-cli-arm64

This file was deleted.

2 changes: 1 addition & 1 deletion common/install-dapr-cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# SPDX-License-Identifier: Apache-2.0

echo "#######################################################"
echo "### Install dapr-cli ###"
echo "### Install dapr-cli ###"
echo "#######################################################"

DEFAULT_DAPR_CLI_VERSION=$(cat AppManifest.json | jq .[].dependencies.dapr.cli.version | tr -d '"')
Expand Down
30 changes: 30 additions & 0 deletions common/install-velocitas-cli.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash
# Copyright (c) 2022 Robert Bosch GmbH
#
# This program and the accompanying materials are made available under the
# terms of the Apache License, Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# SPDX-License-Identifier: Apache-2.0

echo "#######################################################"
echo "### Install Velocitas CLI ###"
echo "#######################################################"

CLI_ASSET_NAME=velocitas-linux-$(echo $1 | sed 's/amd64/x64/g')
CLI_INSTALL_PATH=/usr/bin/velocitas

CLI_DOWNLOAD_URL="https://github.com/eclipse-velocitas/cli/releases/latest/download/${CLI_ASSET_NAME}"

curl -L ${CLI_DOWNLOAD_URL} -o "${CLI_INSTALL_PATH}"
chmod +x "${CLI_INSTALL_PATH}"

CLI_VERSION=$( "${CLI_INSTALL_PATH}" --version )

echo "Installed CLI version: ${CLI_VERSION}"

0 comments on commit faa28b1

Please sign in to comment.