Exemplo n.º 1
0
def paasta_generate_pipeline(args):
    """Generate a Jenkins build pipeline.
    :param args: argparse.Namespace obj created from sys.args by paasta_cli"""
    service = args.service or guess_service_name()
    try:
        validate_service_name(service)
    except NoSuchService as service_not_found:
        print service_not_found
        sys.exit(1)

    generate_pipeline(service=service)
Exemplo n.º 2
0
def paasta_generate_pipeline(args):
    """Generate a Jenkins build pipeline.
    :param args: argparse.Namespace obj created from sys.args by paasta_cli"""
    service = args.service or guess_service_name()
    try:
        validate_service_name(service)
    except NoSuchService as service_not_found:
        print service_not_found
        sys.exit(1)

    generate_pipeline(service=service)
Exemplo n.º 3
0
def paasta_check(args):
    """Analyze the service in the PWD to determine if it is paasta ready
    :param args: argparse.Namespace obj created from sys.args by paasta_cli"""
    service = guess_service_name()
    service_path = os.path.join("/nail/etc/services", service)

    service_dir_check(service)
    deploy_check(service_path)
    deploy_has_security_check(service)
    deploy_has_performance_check(service)
    pipeline_check(service)
    git_repo_check(service)
    docker_check()
    makefile_check()
    marathon_check(service_path)
    marathon_deployments_check(service_path)
    sensu_check(service, service_path)
    smartstack_check(service, service_path)
Exemplo n.º 4
0
def paasta_check(args):
    """Analyze the service in the PWD to determine if it is paasta ready
    :param args: argparse.Namespace obj created from sys.args by paasta_cli"""
    service = guess_service_name()
    service_path = os.path.join('/nail/etc/services', service)

    service_dir_check(service)
    deploy_check(service_path)
    deploy_has_security_check(service)
    deploy_has_performance_check(service)
    pipeline_check(service)
    git_repo_check(service)
    docker_check()
    makefile_check()
    marathon_check(service_path)
    marathon_deployments_check(service_path)
    sensu_check(service, service_path)
    smartstack_check(service, service_path)
Exemplo n.º 5
0
def completer_clusters(prefix, parsed_args, **kwargs):
    service = parsed_args.service or guess_service_name()
    if service in list_services():
        return list_clusters(service)
    else:
        return list_clusters()
Exemplo n.º 6
0
def completer_clusters(prefix, parsed_args, **kwargs):
    service = parsed_args.service or guess_service_name()
    if service in list_services():
        return list_clusters(service)
    else:
        return list_clusters()