Make gsutil the default filestore on GCB. (#6771)

Also clean up https://github.com/google/oss-fuzz/pull/6744
This commit is contained in:
jonathanmetzman 2021-11-05 09:13:41 -04:00 committed by GitHub
parent 6949b6303c
commit 5814852f52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 6 deletions

View File

@ -98,9 +98,12 @@ class BaseConfig:
self.token = self.platform_conf.token
self.project_repo_owner = self.platform_conf.project_repo_owner
self.project_repo_name = self.platform_conf.project_repo_name
self.docker_in_docker = self.platform_conf.docker_in_docker
self.filestore = self.platform_conf.filestore
# This determines if builds are done using docker in docker
# rather than the normal method which is sibling containers.
self.docker_in_docker = self.platform_conf.docker_in_docker
self.dry_run = _is_dry_run() # Check if failures should not be reported.
self.sanitizer = _get_sanitizer()
self.language = _get_language()

View File

@ -15,6 +15,8 @@
import logging
import os
import environment
class BasePlatformConfig:
"""Base class for PlatformConfig subclasses."""
@ -100,12 +102,12 @@ class BasePlatformConfig:
@property
def docker_in_docker(self):
"""Returns whether or not CFL is running using DIND."""
return os.environ.get('DOCKER_IN_DOCKER', False)
"""Returns whether or not CFL is running using Docker in Docker."""
return environment.get_bool('DOCKER_IN_DOCKER', False)
@property
def filestore(self):
"""Returns the filestore used to store persistant data."""
"""Returns the filestore used to store persistent data."""
return os.environ.get('FILESTORE')
@property

View File

@ -33,3 +33,8 @@ class PlatformConfig(platform_config.BasePlatformConfig):
def workspace(self):
"""Returns the workspace."""
return os.getenv('WORKSPACE', '/builder/home')
@property
def filestore(self):
"""Returns the filestore used to store persistent data."""
return os.environ.get('FILESTORE', 'gsutil')

View File

@ -55,10 +55,10 @@ class PlatformConfig(platform_config.BasePlatformConfig):
@property
def docker_in_docker(self):
"""Returns whether or not CFL is running using DIND."""
"""Returns True if using Docker in Docker."""
return True
@property
def filestore(self):
"""Returns whether or not CFL is running using DIND."""
"""Returns the filestore used to store persistent data."""
return os.environ.get('FILESTORE', 'gsutil')