Example #1
0
def postback_atlas(check_changed_status=False):
    """ Send information about a Jenkins job (and resulting data) back to Atlas.
    check_changed_status: bool. If we want to only return data if the status of
                                the build has changed from the previous run.

    This should only be called from within a Jenkins Post-Build Action.

    """
    print "DEBUG: atlas_postback.postback_atlas"
    # Get job_name and build_number.
    job_name, build_number = postback.get_job_and_id()

    # Get build info: job_name, build_number, build_status, build_parameters.
    response = postback.get_build_info(job_name, build_number,
                                       check_changed_status)

    # If there is data we want to send back.
    if response:
        # Get build data from build actions (in jenkins workspace).
        response.update({'build_data': postback.get_build_data()})

        # Send response to Atlas.
        postback.postback(response)
    else:
        print('Build status has not changed. No postback performed.')
Example #2
0
def postback_atlas(check_changed_status=False):
    """ Send information about a Jenkins job (and resulting data) back to Atlas.
    check_changed_status: bool. If we want to only return data if the status of
                                the build has changed from the previous run.

    This should only be called from within a Jenkins Post-Build Action.

    """
    print "DEBUG: atlas_postback.postback_atlas"
    # Get job_name and build_number.
    job_name, build_number = postback.get_job_and_id()

    # Get build info: job_name, build_number, build_status, build_parameters.
    response = postback.get_build_info(job_name,
                                       build_number,
                                       check_changed_status)

    # If there is data we want to send back.
    if response:
        # Get build data from build actions (in jenkins workspace).
        response.update({'build_data': postback.get_build_data()})

        # Send response to Atlas.
        postback.postback(response)
    else:
        print('Build status has not changed. No postback performed.')
Example #3
0
def _get_build_messages():
    """Return the build messages/warnings/errors.
    """
    data = postback.get_build_data()
    return (data.get('build_messages'),
            data.get('build_warnings'),
            data.get('build_error'))
Example #4
0
def _get_build_messages():
    """Return the build messages/warnings/errors.
    """
    data = postback.get_build_data()
    return (data.get('build_messages'), data.get('build_warnings'),
            data.get('build_error'))