def ci_build():
    link_or_generate_ssh_keys()
    call("ssh-add")
    link_ci_terraform_file()

    # Take different action for PRs from forks
    if not os.environ['TRAVIS_REPO_SLUG'].startswith('CiscoCloud/'):
        logging.warning("Because we can't unlock deploy keys for forks of the main project, we are going to make some prelim checks, then get back to you!")
        logging.critical("Fork checks have not been implemented.")
        exit(0)

    # Filter out commits that are documentation changes.
    commit_range_cmd = 'git diff --name-only {}'.format(os.environ['TRAVIS_COMMIT_RANGE'])

    commit_range_str = str(check_output(split(commit_range_cmd)))

    commit_range = []
    for commit in commit_range_str.split():
        if commit.startswith('docs'):
            logging.info("Modified file in docs directory: %s", commit)
        elif commit.endswith('md'):
            logging.info("Modified file has markdown extension: %s", commit)
        elif commit.endswith('rst'):
            logging.info("Modified file has reST extension: %s", commit)
        else:
            logging.info("Modified file not marked as docfile: %s", commit)
            commit_range.append(commit)

    if len(commit_range) < 1:
        logging.info("All of the changes I found were in documentation files. Skipping build")
        exit(0)

    # Filter out commits that are pushes to non-master branches
    ci_branch = os.environ['TRAVIS_BRANCH']
    ci_is_pr = os.environ['TRAVIS_PULL_REQUEST']
    if ci_branch is not 'master' and ci_is_pr is False:
        logging.info("We don't want to build on pushes to branches that aren't master.")
        exit(0)

    if 'OS_IP' in os.environ:
        ssh_cmd = '''
ssh -i {keypath} -p {ssh_port}
-o BatchMode=yes -o StrictHostKeyChecking=no
travis@{ssh_ip} /bin/sh -c '
eval $(ssh-agent);
ssh-add;
cd ./mantl/{commit};
python2 ./testing/build-cluster.py'
        '''
        ssh_cmd = ssh_cmd.format(commit=os.environ['CI_HEAD_COMMIT'],
                keypath='/local/ci',
                ssh_port=os.environ['OS_PRT'],
                ssh_ip=os.environ['OS_IP'])
        ssh_cmd = " ".join(ssh_cmd.splitlines())

        exit(call(split(ssh_cmd)))

    else:
        logging.info("Starting cloud provider test")
        exit(call(split("python2 testing/build-cluster.py")))
inputs,errors are both list of integers.
dataset/ETHPy150Open CiscoCloud/mantl/docker.py/ci_build--crossover with--dataset/ETHPy150Open NervanaSystems/neon/tests/recurrent_ref.py/Recurrent.lossFun