Exemple #1
0
def load_info(stack_name, stack_version):
    try:
        return download_control(stack_name, stack_version)
    except:
        traceback.print_exc()
        raise BuildFailure(
            "Problem fetching yaml info for %s %s.\nThis yaml info is usually created when a release is uploaded. If it is missing, either the stack version is wrong, or the release did not occur correctly."
            % (stack_name, stack_version))
def load_info(stack_name, stack_version):
    try:
        return download_control(stack_name, stack_version)
    except:
        traceback.print_exc()
        raise BuildFailure(
            "Problem fetching yaml info for %s %s.\nThis yaml info is usually created when a release is uploaded. If it is missing, either the stack version is wrong, or the release did not occur correctly."
            % (stack_name, stack_version)
        )
Exemple #3
0
        failure_message = "Failure Message:\n"+"="*80+'\n'+str(e)
    except Exception, e:
        failure_message = "Internal failure release system. Please notify [email protected]:\n%s\n\n%s"%(e, traceback.format_exc(e))
    finally:
        # if we created our own staging dir, we are responsible for cleaning it up
        if options.staging_dir is None:
            shutil.rmtree(staging_dir)


    if failure_message or warning_message:
        debug("FAILURE: %s"%failure_message)
        debug("WARNING: %s"%warning_message)

        if not options.interactive:
            failure_message = "%s\n%s\n%s"%(failure_message, warning_message, os.environ.get('BUILD_URL', ''))
            if options.smtp and stack_name != 'metapackages' and distro is not None:
                stack_version = distro.stacks[stack_name].version
                control = download_control(stack_name, stack_version)
                if  'contact' in control and distro_name != 'diamondback':
                    to_addr = control['contact']
                    subject = 'debian build [%s-%s-%s-%s] failed'%(distro_name, stack_name, os_platform, arch)
                    # DISABLE SENDING OF EMAIL from script. This can be done better by jenkins.
                    # send_email(options.smtp, EMAIL_FROM_ADDR, to_addr, subject, failure_message)
        sys.exit(1)



if __name__ == '__main__':
    single_deb_main()

Exemple #4
0
        failure_message = "Failure Message:\n" + "=" * 80 + '\n' + str(e)
    except Exception, e:
        failure_message = "Internal failure release system. Please notify [email protected]:\n%s\n\n%s" % (
            e, traceback.format_exc(e))
    finally:
        # if we created our own staging dir, we are responsible for cleaning it up
        if options.staging_dir is None:
            shutil.rmtree(staging_dir)

    if failure_message or warning_message:
        debug("FAILURE: %s" % failure_message)
        debug("WARNING: %s" % warning_message)

        if not options.interactive:
            failure_message = "%s\n%s\n%s" % (failure_message, warning_message,
                                              os.environ.get('BUILD_URL', ''))
            if options.smtp and stack_name != 'metapackages' and distro is not None:
                stack_version = distro.stacks[stack_name].version
                control = download_control(stack_name, stack_version)
                if 'contact' in control and distro_name != 'diamondback':
                    to_addr = control['contact']
                    subject = 'debian build [%s-%s-%s-%s] failed' % (
                        distro_name, stack_name, os_platform, arch)
                    # DISABLE SENDING OF EMAIL from script. This can be done better by jenkins.
                    # send_email(options.smtp, EMAIL_FROM_ADDR, to_addr, subject, failure_message)
        sys.exit(1)


if __name__ == '__main__':
    single_deb_main()