From cd8e5e272fef36358f1e36885d7db69ee5f97dc2 Mon Sep 17 00:00:00 2001 From: Tom Pollard Date: Wed, 30 Jan 2019 16:18:17 +0000 Subject: Add --remote, -r option to bst build, inline with pull & push Providing a remote will limit build's pull/push remote actions to the given remote specifically, ignoring those defined via user or project configuration. --- buildstream/_stream.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'buildstream/_stream.py') diff --git a/buildstream/_stream.py b/buildstream/_stream.py index af736c96a..588780558 100644 --- a/buildstream/_stream.py +++ b/buildstream/_stream.py @@ -197,26 +197,36 @@ class Stream(): # ignore_junction_targets (bool): Whether junction targets should be filtered out # build_all (bool): Whether to build all elements, or only those # which are required to build the target. + # remote (str): The URL of a specific remote server to push to, or None + # + # If `remote` specified as None, then regular configuration will be used + # to determine where to push artifacts to. # def build(self, targets, *, track_targets=None, track_except=None, track_cross_junctions=False, ignore_junction_targets=False, - build_all=False): + build_all=False, + remote=None): if build_all: selection = PipelineSelection.ALL else: selection = PipelineSelection.PLAN + use_config = True + if remote: + use_config = False + elements, track_elements = \ self._load(targets, track_targets, selection=selection, track_selection=PipelineSelection.ALL, track_except_targets=track_except, track_cross_junctions=track_cross_junctions, ignore_junction_targets=ignore_junction_targets, - use_artifact_config=True, + use_artifact_config=use_config, + artifact_remote_url=remote, fetch_subprojects=True, dynamic_plan=True) -- cgit v1.2.1