コード例 #1
0
ファイル: test_ubuntu.py プロジェクト: Jeff-Lewis/bob
def ubuntu_builder():
    project_name = 'test'
    working_dir = '/test'
    output_dir = '/out'
    tmp_dir = '/tmp'
    builder = UbuntuBuilder(project_name, working_dir, output_dir, tmp_dir)
    builder.run_command = mock.Mock()
    return UbuntuBuilder(project_name, working_dir, output_dir, tmp_dir)
コード例 #2
0
def ubuntu_builder():
    project_name = 'test'
    working_dir = '/test'
    output_dir = '/out'
    tmp_dir = '/tmp'
    builder = UbuntuBuilder(project_name, working_dir, output_dir, tmp_dir)
    builder.run_command = mock.Mock()
    return UbuntuBuilder(project_name, working_dir, output_dir, tmp_dir)
コード例 #3
0
ファイル: __init__.py プロジェクト: Jeff-Lewis/bob
def build(github_organization, github_repo, commit_hash_or_tag,
          source=None, logger=None
          ):
    from bob import settings

    working_dir = os.path.expanduser(settings['bobb.work_dir'])
    output_dir = os.path.expanduser(settings['bobb.out_dir'])

    builder = UbuntuBuilder(
        github_repo, working_dir, output_dir, log_stream=logger
    )

    if not source:
        builder.prepare_workspace(
            github_organization, github_repo, commit_hash_or_tag
        )

    builder.parse_options()
    try:
        builder.prepare_system()
        builder.build()
        package_name = builder.package(commit_hash_or_tag)
        builder.upload(package_name)
        builder.notify_success(commit_hash_or_tag)
    except Exception as ex:
        builder.notify_failure(commit_hash_or_tag, ex)
    finally:
        builder.log('***finished***')
コード例 #4
0
ファイル: __init__.py プロジェクト: soitun/bob
def build(github_organization,
          github_repo,
          commit_hash_or_tag,
          source=None,
          logger=None):
    from bob import settings

    working_dir = os.path.expanduser(settings['bobb.work_dir'])
    output_dir = os.path.expanduser(settings['bobb.out_dir'])

    builder = UbuntuBuilder(github_repo,
                            working_dir,
                            output_dir,
                            log_stream=logger)

    if not source:
        builder.prepare_workspace(github_organization, github_repo,
                                  commit_hash_or_tag)

    builder.parse_options()
    try:
        builder.prepare_system()
        builder.build()
        package_name = builder.package(commit_hash_or_tag)
        builder.upload(package_name)
        builder.notify_success(commit_hash_or_tag)
    except Exception as ex:
        builder.notify_failure(commit_hash_or_tag, ex)
    finally:
        builder.log('***finished***')