Exemplo n.º 1
0
def build_information_link(deployment):
    host = deployment_util.get_host(deployment)
    if not host:
        host = deployment_util.get_host(deployment, path='/')

    path = f'/pipeline/#{deployment_util.get_application_name(deployment)}'

    return deployment_util.combine_host_and_paths(host, path)
Exemplo n.º 2
0
def call_slack_channel_with_application_endpoint_url(deployment):

    host = deployment_util.get_host(deployment)
    if not host:
        host = deployment_util.get_host(deployment, path='/')

    message = (
        f':information_source: About <{build_information_link(deployment)}|{deployment_util.get_friendly_name(deployment)}> '
        f'in *{deployment_util.get_cluster(deployment)}*')

    slack_util.call_slack_channels(deployment, message, 'Public information')
Exemplo n.º 3
0
def add_monitor_url(deployment):

    monitor_url = ''

    monitor_route = '/_monitor'

    if deployment_util.get_application_path(deployment).endswith('/'):
        monitor_route = '_monitor'

    monitor_url = deployment_util.combine_host_and_paths(
        deployment_util.get_host(deployment),
        deployment_util.get_application_path(deployment), monitor_route)

    deployment['monitorUrl'] = monitor_url
Exemplo n.º 4
0
def add_about_url(deployment):

    about_url = ''
    monitor_url = deployment_util.get_monitor_url(deployment)

    if not monitor_url.endswith('/_monitor'):
        return about_url

    about_route = '/_about'

    if deployment_util.get_application_path(deployment).endswith('/'):
        about_route = '_about'

    about_url = deployment_util.combine_host_and_paths(
        deployment_util.get_host(deployment),
        deployment_util.get_application_path(deployment), about_route)

    deployment['aboutUrl'] = about_url
Exemplo n.º 5
0
def add_application_url(deployment):
    application_url = deployment_util.combine_host_and_paths(
        deployment_util.get_host(deployment),
        deployment_util.get_application_path(deployment))
    deployment['applicationUrl'] = application_url