Exemple #1
0
    def __init__(self, console):
        Job.__init__(self)
        self.console = console
        self.storage_dir = '/data/tmp/storage'

        if os.path.exists(self.storage_dir):
            shutil.rmtree(self.storage_dir)

        os.makedirs(self.storage_dir)

        self.mount_repo_dir = '/data/repo'
        self.mount_data_dir = self.mount_repo_dir + '/.infrabox'
Exemple #2
0
    def __init__(self, console):
        Job.__init__(self)
        self.console = console
        self.storage_dir = '/tmp/storage'

        if os.path.exists(self.storage_dir):
            shutil.rmtree(self.storage_dir)

        os.makedirs(self.storage_dir)

        self.mount_repo_dir = os.environ.get('INFRABOX_JOB_REPO_MOUNT_PATH', '/repo')
        self.mount_data_dir = self.mount_repo_dir + '/.infrabox'
Exemple #3
0
    def __init__(self, console, job_type):
        Job.__init__(self)
        self.console = console
        self.data_dir = '/data/infrabox'
        self.job_type = job_type
        self.storage_dir = '/tmp/storage'

        if os.path.exists(self.data_dir):
            shutil.rmtree(self.data_dir)

        if os.path.exists(self.storage_dir):
            shutil.rmtree(self.storage_dir)

        os.makedirs(self.storage_dir)

        #
        # /tmp/infrabox is mounted to the same path on the host
        # So we can use it to transfer data between the job and
        # the job.py container.
        #

        # <data_dir>/cache is mounted in the job to /infrabox/cache
        self.infrabox_cache_dir = os.path.join(self.data_dir, 'cache')
        makedirs(self.infrabox_cache_dir)

        # <data_dir>/inputs is mounted in the job to /infrabox/inputs
        self.infrabox_inputs_dir = os.path.join(self.data_dir, 'inputs')
        makedirs(self.infrabox_inputs_dir)

        # <data_dir>/output is mounted in the job to /infrabox/output
        self.infrabox_output_dir = os.path.join(self.data_dir, 'output')
        makedirs(self.infrabox_output_dir)

        # <data_dir>/upload is mounted in the job to /infrabox/upload
        self.infrabox_upload_dir = os.path.join(self.data_dir, 'upload')
        makedirs(self.infrabox_upload_dir)

        # <data_dir>/upload/testresult is mounted in the job to /infrabox/upload/testresult
        self.infrabox_testresult_dir = os.path.join(self.infrabox_upload_dir, 'testresult')
        makedirs(self.infrabox_testresult_dir)

        # <data_dir>/upload/markdown is mounted in the job to /infrabox/upload/markdown
        self.infrabox_markdown_dir = os.path.join(self.infrabox_upload_dir, 'markdown')
        makedirs(self.infrabox_markdown_dir)

        # <data_dir>/upload/markup is mounted in the job to /infrabox/upload/markup
        self.infrabox_markup_dir = os.path.join(self.infrabox_upload_dir, 'markup')
        makedirs(self.infrabox_markup_dir)

        # <data_dir>/upload/badge is mounted in the job to /infrabox/upload/badge
        self.infrabox_badge_dir = os.path.join(self.infrabox_upload_dir, 'badge')
        makedirs(self.infrabox_badge_dir)