def post_to_gerrit(commit, score=0, message='', user='lunatest', gerrit=None):
    """
    Post the data to gerrit. This right now is a stub, as
    I'll need to write the code to post up to gerrit.

    :param commit: Commit ID of the review.
    :param message: Message to accompany the review score.
    :param user: SSH User for posting to gerrit.
    :param gerrit: Hostname of the gerrit server.
    :param score: Score to post to gerrit (+1/-1, etc)
    :return:
    """
    # ssh -p 29418 review.example.com gerrit review --code-review +1 <commit_id>
    if score > 0:
        score = "+{}".format(score)
    else:
        url = "{}job/{}/{}/consoleText".format(os.environ.get('JENKINS_URL'),
                                               os.environ.get('JOB_NAME'),
                                               os.environ.get('BUILD_NUMBER'))
        message = ("{}\r\n\r\n"
                   "Check output here: {}").format(message, url)
        score = str(score)
    # Format the message in a way that is readable both by shell command
    #as well as Gerrit (need to double quote, once for shell, once for gerrit).
    message = "'\"{}\"'".format(message)

    subprocess.check_output(["ssh",
                             "-p", str(os.environ.get("GERRIT_PORT", "29418")),
                             "{}@{}".format(user, gerrit),
                             "gerrit", "review", "--code-review " + score,
                             "-m", message, commit])
Post the data to gerrit. This right now is a stub, as
    I'll need to write the code to post up to gerrit.

    :param commit: Commit ID of the review.
    :param message: Message to accompany the review score.
    :param user: SSH User for posting to gerrit.
    :param gerrit: Hostname of the gerrit server.
    :param score: Score to post to gerrit (+1/-1, etc)
    :return: