summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2018-02-27 10:55:17 +0100
committerTristan Van Berkom <tristan.van.berkom@gmail.com>2018-02-27 11:43:14 +0000
commit8c1979ddc245920eb3bf9c38e6776e4fa0f68947 (patch)
tree604c6759be276cde56002dc1bf4f87087e7cd2d7
parentcdcdc32cc1d091ad6b791e681bd37b0a018cc047 (diff)
downloadbuildstream-8c1979ddc245920eb3bf9c38e6776e4fa0f68947.tar.gz
_artifactcache/artifactcache.py: Add push() to abstract base class
-rw-r--r--buildstream/_artifactcache/artifactcache.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/buildstream/_artifactcache/artifactcache.py b/buildstream/_artifactcache/artifactcache.py
index 4ee07b570..0a20969e9 100644
--- a/buildstream/_artifactcache/artifactcache.py
+++ b/buildstream/_artifactcache/artifactcache.py
@@ -241,3 +241,20 @@ class ArtifactCache():
#
def push_needed(self, element):
return False
+
+ # push():
+ #
+ # Push committed artifact to remote repository.
+ #
+ # Args:
+ # element (Element): The Element whose artifact is to be pushed
+ #
+ # Returns:
+ # (bool): True if any remote was updated, False if no pushes were required
+ #
+ # Raises:
+ # (ArtifactError): if there was an error
+ #
+ def push(self, element):
+ raise ImplError("Cache '{kind}' does not implement push()"
+ .format(kind=type(self).__name__))