Skip to content

Commit

Permalink
Fix VS Code task for running Databroker CLI (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
BjoernAtBosch authored Jul 4, 2024
1 parent e2e0b8a commit 3f0a025
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 52 deletions.
12 changes: 11 additions & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@
"programs": [
{
"id": "run-vehicledatabroker-cli",
"executable": "./runtime_local/src/run-vehicledatabroker-cli.sh"
"executable": "python3",
"args": [
"./runtime_local/src/run-vehicledatabroker-cli.py"
],
"interactive": true
},
{
"id": "run-service",
Expand Down Expand Up @@ -79,6 +83,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.

0 comments on commit 3f0a025

Please sign in to comment.