diff options
author | Tom Pollard <tom.pollard@codethink.co.uk> | 2019-01-30 16:18:17 +0000 |
---|---|---|
committer | Tom Pollard <tom.pollard@codethink.co.uk> | 2019-02-05 11:22:01 +0000 |
commit | cd8e5e272fef36358f1e36885d7db69ee5f97dc2 (patch) | |
tree | c612a1a7f47b82399c3ddabdbf2b10694f80aa0a /buildstream/_stream.py | |
parent | 3ab096510186842afb90c16a1c1bb7e58035265f (diff) | |
download | buildstream-cd8e5e272fef36358f1e36885d7db69ee5f97dc2.tar.gz |
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.
Diffstat (limited to 'buildstream/_stream.py')
-rw-r--r-- | buildstream/_stream.py | 14 |
1 files changed, 12 insertions, 2 deletions
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) |