Skip to content

Commit

Permalink
Replace shell script by Python
Browse files Browse the repository at this point in the history
  • Loading branch information
BjoernAtBosch committed Jul 3, 2024
1 parent 58aa169 commit 0323048
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 7 deletions.
5 changes: 4 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"
]
},
{
"id": "run-service",
Expand Down
28 changes: 22 additions & 6 deletions ...me_local/src/run-vehicledatabroker-cli.sh → ...me_local/src/run-vehicledatabroker-cli.py
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/bin/bash
# Copyright (c) 2022-2024 Contributors to the Eclipse Foundation
# 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
Expand All @@ -13,8 +12,25 @@
#
# SPDX-License-Identifier: Apache-2.0

echo "#######################################################"
echo "### Running VehicleDataBroker CLI ###"
echo "#######################################################"
import subprocess

docker run -it --rm --network host $vehicleDatabrokerCliImage
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()

0 comments on commit 0323048

Please sign in to comment.