aboutsummaryrefslogtreecommitdiff
path: root/infra/cifuzz/filestore/__init__.py
diff options
context:
space:
mode:
authorjonathanmetzman <31354670+jonathanmetzman@users.noreply.github.com>2021-06-21 08:28:21 -0700
committerGitHub <noreply@github.com>2021-06-21 15:28:21 +0000
commitc779501392015fc515425a631d13239e5b20335f (patch)
tree90b7ad01213fa483df8119b01c66bf101bc2f3cb /infra/cifuzz/filestore/__init__.py
parentcd38c9661782c907a2e42dbf1e7b85f8749200f7 (diff)
downloadoss-fuzz-c779501392015fc515425a631d13239e5b20335f.tar.gz
[CIFuzz] Implement filestore based on github artifacts (#5943)
Implement filestore based on github actions' artifacts feature. This uses the github api and the github actions API. Also fix imports in github_actions_toolkit library that were broken by move to third_party directory.
Diffstat (limited to 'infra/cifuzz/filestore/__init__.py')
-rw-r--r--infra/cifuzz/filestore/__init__.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/infra/cifuzz/filestore/__init__.py b/infra/cifuzz/filestore/__init__.py
index ab0fe6e0b..0acb4b9ca 100644
--- a/infra/cifuzz/filestore/__init__.py
+++ b/infra/cifuzz/filestore/__init__.py
@@ -14,6 +14,10 @@
"""Module for a generic filestore."""
+class FilestoreError(Exception):
+ """Error using the filestore."""
+
+
# pylint: disable=unused-argument,no-self-use
class BaseFilestore:
"""Base class for a filestore."""
@@ -21,10 +25,14 @@ class BaseFilestore:
def __init__(self, config):
self.config = config
- def upload_corpus(self, name, directory):
- """Uploads the corpus located at |directory| to |name|."""
+ def upload_directory(self, name, directory):
+ """Uploads the |directory| to |name|."""
raise NotImplementedError('Child class must implement method.')
def download_corpus(self, name, dst_directory):
"""Downloads the corpus located at |name| to |dst_directory|."""
raise NotImplementedError('Child class must implement method.')
+
+ def download_latest_build(self, name, dst_directory):
+ """Downloads the latest build with |name| to |dst_directory|."""
+ raise NotImplementedError('Child class must implement method.')