Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix VS Code task for running Databroker CLI #83

Merged
merged 4 commits into from
Jul 4, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
"programs": [
{
"id": "run-vehicledatabroker-cli",
"executable": "./runtime_local/src/run-vehicledatabroker-cli.sh"
"executable": "python3",
"args": [
"./runtime_local/src/run-vehicledatabroker-cli.py"
]
BjoernAtBosch marked this conversation as resolved.
Show resolved Hide resolved
},
{
"id": "run-service",
Expand Down Expand Up @@ -79,6 +82,12 @@
"description": "Docker image for vehicle databroker",
"default": "ghcr.io/eclipse-kuksa/kuksa-databroker:0.4.4"
},
{
"name": "vehicleDatabrokerCliImage",
"type": "string",
"description": "Docker image for vehicle databroker CLI",
"default": "ghcr.io/eclipse-kuksa/kuksa-databroker-cli:0.4.4"
},
{
"name": "seatServiceImage",
"type": "string",
Expand Down
36 changes: 36 additions & 0 deletions runtime_local/src/run-vehicledatabroker-cli.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Copyright (c) 2024 Contributors to the Eclipse Foundation
#
# 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

import subprocess

from local_lib import get_container_runtime_executable
from velocitas_lib import require_env


def run_databroker_cli():
databroker_cli_image = require_env("vehicleDatabrokerCliImage")
program_args = [
get_container_runtime_executable(),
"run",
"-it",
"--rm",
"--network",
"host",
databroker_cli_image,
]
subprocess.check_call(program_args)


if __name__ == "__main__":
run_databroker_cli()
51 changes: 0 additions & 51 deletions runtime_local/src/run-vehicledatabroker-cli.sh

This file was deleted.

Loading