diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2018-01-11 17:24:02 +0000 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2018-01-11 17:26:51 +0000 |
commit | 51c17e1147392f15580fb2dd925055ad8863ab3e (patch) | |
tree | 22cd2ff687a19ee56ef371a777f70d39a4d3b5ae /buildstream/_context.py | |
parent | 1490802c9a2b13bce8762e73db0a1110441223e5 (diff) | |
download | buildstream-51c17e1147392f15580fb2dd925055ad8863ab3e.tar.gz |
Allow push to multiple remotes, configurable on a per-remote basis
The initial multiple cache support patch implemented a rather fragile
logic where we would push to the first cache in the list that used the
ssh:// protocol, if any. If we implement push-over-https:// in future
then this will become totally unworkable.
This patch alters the logic so that each remote has a 'push' option,
and BuildStream will push to any remote that has 'push: true' set.
Diffstat (limited to 'buildstream/_context.py')
-rw-r--r-- | buildstream/_context.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/buildstream/_context.py b/buildstream/_context.py index 78ec9f8b2..9b45b99da 100644 --- a/buildstream/_context.py +++ b/buildstream/_context.py @@ -29,7 +29,7 @@ from . import _yaml from ._exceptions import LoadError, LoadErrorReason, BstError from ._message import Message, MessageType from ._profile import Topics, profile_start, profile_end -from ._artifactcache import artifact_cache_urls_from_config_node +from ._artifactcache import artifact_cache_specs_from_config_node # Context() @@ -62,8 +62,8 @@ class Context(): # The local binary artifact cache directory self.artifactdir = None - # The URLs from which to push and pull prebuilt artifacts - self.artifact_urls = [] + # The locations from which to push and pull prebuilt artifacts + self.artifact_cache_specs = [] # The directory to store build logs self.logdir = None @@ -162,7 +162,7 @@ class Context(): setattr(self, dir, path) # Load artifact share configuration - self.artifact_urls = artifact_cache_urls_from_config_node(defaults) + self.artifact_cache_specs = artifact_cache_specs_from_config_node(defaults) # Load logging config logging = _yaml.node_get(defaults, Mapping, 'logging') |