deploy: Build sparkd if any service starts with "sparkd"

Previously, we only built sparkd for the "sparkd" service (i.e., exact match)
This commit is contained in:
John Colvin committed 2025-04-16 13:48:24 +00:00
1 parent 3530a77b38
commit b602997f3a
1 file changed
+6 -3
+6 -3
View File
@@ -47,7 +47,9 @@ def _get_arg_parser():
)
# TODO: add more services (api-server, pubsub, dsqa web server, etc.)
all_services = ["sparkd"]
parser.add_argument("services", help="this selects services defined in compose.yaml", nargs="*")
parser.add_argument("services",
help="this selects services defined in compose.yaml",
nargs="*")
parser.set_defaults(
configuration="release",
services=all_services,
@@ -86,8 +88,9 @@ def deploy(args):
services: list[str] = args.services or []
if args.build:
build_all = len(services) == 0
if build_all or "sparkd" in services:
should_build = len(services) == 0 or any(
filter(lambda s: s.startswith("sparkd"), services))
if should_build:
publish_sparkd.publish(
publish_sparkd.PublishArgs(
configuration="release",