summaryrefslogtreecommitdiff
path: root/buildstream/_pipeline.py
diff options
context:
space:
mode:
authorTristan Maat <tristan.maat@codethink.com>2017-08-02 17:59:30 +0100
committerTristan Maat <tristan.maat@codethink.co.uk>2017-09-28 11:30:50 +0100
commit620006f2c3e6271e56743edc129c4fb19eab241a (patch)
tree166c1fc53ff6883acbd345df7cd7d11f549dc794 /buildstream/_pipeline.py
parent32be8c7b78a80534d75648448221cac5eccd993b (diff)
downloadbuildstream-620006f2c3e6271e56743edc129c4fb19eab241a.tar.gz
Add platform factories
Diffstat (limited to 'buildstream/_pipeline.py')
-rw-r--r--buildstream/_pipeline.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/buildstream/_pipeline.py b/buildstream/_pipeline.py
index 03646ff81..3a72de7ed 100644
--- a/buildstream/_pipeline.py
+++ b/buildstream/_pipeline.py
@@ -31,7 +31,6 @@ from pluginbase import PluginBase
from .exceptions import _BstError, _ArtifactError
from ._message import Message, MessageType
-from ._artifactcache import ArtifactCache
from ._elementfactory import ElementFactory
from ._loader import Loader
from ._sourcefactory import SourceFactory
@@ -39,6 +38,7 @@ from . import Consistency, ImplError, LoadError
from . import Scope
from . import _site
from . import _yaml, utils
+from ._platform import Platform
from ._scheduler import SchedStatus, TrackQueue, FetchQueue, BuildQueue, PullQueue, PushQueue
@@ -146,8 +146,8 @@ class Pipeline():
# Resolve project variant now that we've decided on one
project._resolve(loader.project_variant)
-
- self.artifacts = ArtifactCache(self.context, self.project)
+ self.platform = Platform.get_platform(context, project)
+ self.artifacts = self.platform.artifactcache
# Create the factories after resolving the project
pluginbase = PluginBase(package='buildstream.plugins')
@@ -178,7 +178,7 @@ class Pipeline():
if self.artifacts.can_fetch():
try:
if remote_ticker:
- remote_ticker(self.artifacts.artifact_pull)
+ remote_ticker(context.artifact_pull)
self.artifacts.fetch_remote_refs()
except _ArtifactError:
self.message(self.target, MessageType.WARN, "Failed to fetch remote refs")
@@ -686,8 +686,6 @@ class Pipeline():
if not self.artifacts.can_push():
raise PipelineError("Not configured for pushing artifacts")
- if not self.can_push_remote_artifact_cache():
- raise PipelineError("Unable to push to the configured remote artifact cache")
plan = elements
self.assert_consistent(plan)