Skip to content
Snippets Groups Projects

Add artifact log command

Merged richardmaw-codethink requested to merge richardmaw/artifact-log into master
Files
12
@@ -547,6 +547,27 @@ class ArtifactCache():
@@ -547,6 +547,27 @@ class ArtifactCache():
return self.cas.extract(ref, path)
return self.cas.extract(ref, path)
 
# get_virtual_directory():
 
#
 
# Get the contents of the artifact as a buildstream.storage.Directory.
 
#
 
# The returned Directory may become invalid if remove or prune are called.
 
#
 
# Assumes artifact has previously been fetched or committed.
 
#
 
# Args:
 
# element (Element): The Element to get the Directory of
 
# key (str): The cache key to use
 
#
 
# Raises:
 
# ArtifactError: If the artifact did not exist.
 
#
 
# Returns: virtual Directory
 
#
 
def get_virtual_directory(self, element, key):
 
ref = self.get_artifact_fullname(element, key)
 
return self.cas.get_virtual_directory(ref)
 
# commit():
# commit():
#
#
# Commit built artifact to cache.
# Commit built artifact to cache.
Loading