Beispiel #1
0
def _generate_packages(configurations):
    for package_configuration in configurations.values():
        builder.build_package(package_configuration)
        correct_output_package = os.path.join(
            package_configuration.output_folder,
            _get_correct_package_name(package_configuration))
        assert os.path.isfile(correct_output_package)
Beispiel #2
0
def test_output_script():
    with temporary_directory() as output_dir:
        ubuntu_argparsed_arguments_output_script = test_console.UBUNTU_ARGPARSED_ARGUMENTS.copy()
        ubuntu_argparsed_arguments_output_script["output_script"] = True
        ubuntu_argparsed_arguments_output_script["output_folder"] = output_dir
        _configuration = configuration.Configuration(ubuntu_argparsed_arguments_output_script)
        builder.build_package(_configuration)
        copied_script_path = _get_copied_script_path(_configuration)
        assert os.path.isfile(copied_script_path)
Beispiel #3
0
def _call_builder(builder_parameters):
    _configuration = configuration.Configuration(builder_parameters)
    builder.build_package(_configuration)
Beispiel #4
0
def main(args=sys.argv[1:]):
    console_arguments = console_parser.parse_arguments(args)
    configurations = _get_build_configurations(console_arguments)
    for _configuration in configurations:
        builder.build_package(configurations[_configuration])
Beispiel #5
0
from vdist.configuration import Configuration
from vdist.source import directory

app = 'thebideo-comments'
version = '1.' + os.environ['BUILD_NUMBER']
python_ver = '3.6.6'

root_dir, tmp = os.path.split(os.getcwd())
ln_dir = root_dir + '/' + app
os.symlink(os.getcwd(), ln_dir, True)

builder_parameters = {
    "app": app,
    "version": version,
    "source": directory(path=ln_dir),
    "profile": 'centos7',
    "python_version": python_ver,
    "requirements_path": '/requirements.txt',
    "output_folder": './vdist',
    "runtime_deps": ["compat-openssl10"],
    "after_install": './package/post-install.sh',
    "after_upgrade": './package/post-upgrade.sh',
    "after_remove": './package/post-remove.sh'
}

configuration = Configuration(builder_parameters)

builder.build_package(configuration)

os.unlink(ln_dir)