Ejemplo n.º 1
0
def get_jira_username():
    global jira_username
    if jira_username != None:
        return jira_username
    jira_username = get_config("jira.username")
    if jira_username is None:
        configuration.handle_missing_config('Please set your jira username:'******'jira.username', '<username>')
    else:
        return jira_username
Ejemplo n.º 2
0
def get_jira_password():
    global jira_password
    if jira_password != None:
        return jira_password
    jira_password = get_config("jira.password")
    if jira_password is None:
        configuration.handle_missing_config('Please set your jira password:'******' jira.password', '<password>')
    else:
        return jira_password
Ejemplo n.º 3
0
def get_hipchat_token():
    global hipchat_token
    if hipchat_token != None:
        return hipchat_token
    hipchat_token = get_config("hipchat.token")
    if hipchat_token is None:
        handle_missing_config("Please set your Hipchat private API token (you can grab it from here https://evme.hipchat.com/account/api):", 'hipchat.token')
    else:
        return hipchat_token
Ejemplo n.º 4
0
def get_jenkins_token():
    global jenkins_token
    if jenkins_token:
        return jenkins_token
    jenkins_token = get_config_or_default("jenkins.token")
    if jenkins_token:
        return jenkins_token
    else:
        handle_missing_config("Please set your Jenkins private API token (you can grab it from here {}/user/{}/configure):".format(get_default_server(), get_jenkins_user()),
                                            'jenkins.token')
Ejemplo n.º 5
0
def get_jenkins_user():
    global jenkins_user
    if jenkins_user:
        return jenkins_user

    jenkins_user = get_config_or_default("jenkins.user")
    if jenkins_user:
        return jenkins_user
    else:
        handle_missing_config("Please set your Jenkins user name:", "jenkins.user", '<username@domain>')
Ejemplo n.º 6
0
def get_hipchat_token():
    global hipchat_token
    if hipchat_token != None:
        return hipchat_token
    hipchat_token = get_config("hipchat.token")
    if hipchat_token is None:
        handle_missing_config(
            "Please set your Hipchat private API token (you can grab it from here https://evme.hipchat.com/account/api):",
            'hipchat.token')
    else:
        return hipchat_token
Ejemplo n.º 7
0
def get_jenkins_token():
    global jenkins_token
    if jenkins_token:
        return jenkins_token
    jenkins_token = get_config_or_default("jenkins.token")
    if jenkins_token:
        return jenkins_token
    else:
        handle_missing_config(
            "Please set your Jenkins private API token (you can grab it from here {}/user/{}/configure):"
            .format(get_default_server(), get_jenkins_user()), 'jenkins.token')
Ejemplo n.º 8
0
def get_jenkins_user():
    global jenkins_user
    if jenkins_user:
        return jenkins_user

    jenkins_user = get_config_or_default("jenkins.user")
    if jenkins_user:
        return jenkins_user
    else:
        handle_missing_config("Please set your Jenkins user name:",
                              "jenkins.user", '<username@domain>')
Ejemplo n.º 9
0
def get_gitlab_token():
    global gitlab_token, gitlab_server
    if gitlab_token:
        return gitlab_token

    gitlab_token = get_config("gitlab.token")
    if not gitlab_token:
        handle_missing_config("Please set your gitlab private token:",
                                            'gitlab.token')
    else:
        return gitlab_token