Beispiel #1
0
def create_slave(name, jobs, max_builds = None):
    if max_builds is None:
        max_builds = jobs // 2
    return buildbot.buildslave.BuildSlave(
        name, password = '******',
        notify_on_missing = set_config_option('Master Options',
                                               'default_email',
                                               '*****@*****.**'),
        properties = { 'jobs' : jobs },
        max_builds = max_builds)
Beispiel #2
0
from zorg.buildbot.PhasedBuilderUtils import set_config_option

# Get some parameters about where to upload and download results from.
# Set up defaults assuming we aren't in  production mode which
# assume that we are just using a local user.
import getpass

rsync_user = getpass.getuser()
master_name = "localhost"
master_protocol = "http"
base_download_url = "http://%s/~%s/artifacts" % (master_name, rsync_user)
package_url = "http://%s/~%s/packages" % (master_name, rsync_user)
base_rsync_path = "%s@%s:~/artifacts" % (rsync_user, master_name)
curl_flags = "-svLo"

is_production = set_config_option("Master Options", "is_production")
if is_production:
    rsync_user = set_config_option("Master Options", "rsync_user", "buildmaster")
    master_name = set_config_option("Master Options", "master_name", "localhost")
    master_protocol = set_config_option("Master Options", "master_protocol", "http")
    base_download_url = "%s://%s/artifacts" % (master_protocol, master_name)
    base_package_url = "%s://%s/packages" % (master_protocol, master_name)
    package_url = set_config_option("Master Options", "package_url", base_package_url)
    base_rsync_path = set_config_option(
        "Master Options", "base_rsync_path", "%s@%s:~/artifacts" % (rsync_user, master_name)
    )
    master_name = set_config_option("Master Options", "curl_flags", "-svLo")

# This method is used in determining the name of a given compiler archive
def _determine_compiler_kind(props):
    # we need to differentiate between configure/make style builds (clang)
Beispiel #3
0
def get_status_targets(standard_builders):
    # Get from/to email addresses.
    from_email = set_config_option('Master Options', 'from_email')
    default_email = set_config_option('Master Options', 'default_email')

    # Check whether we are in testing mode, if so, just add minimal and verbose
    # status clients.
    if True:
        return [
            buildbot.status.html.WebStatus(
                http_port = 8013, allowForce = True),

            InformativeMailNotifier(fromaddr = from_email,
                                    extraRecipients = ['*****@*****.**'],
                                    sendToInterestedUsers = False,
                                    mode = 'change',
                                    addLogs = False,
                                    num_lines = 15)]

    # Get the path to the authors file we use for email lookup.
    llvm_authors_path = os.path.join(os.path.dirname(__file__), 
                                     set_config_option('Master Options',
                                                        'llvm_authors_path'))

    # Construct a lookup object to be used for public builders.
    public_lookup = ConfigEmailLookup(
        llvm_authors_path, default_address = '*****@*****.**')

    return [
        buildbot.status.html.WebStatus(
            http_port = 8013, allowForce = True),
        buildbot.status.words.IRC('irc.oftc.net', 'llvmlab',
                  port=6668,
                  channels=['llvm'],
                  allowForce=False,
                  password='******',
                  notify_events=['successToFailure', 'failureToSuccess'],
                  categories=['build', 'test']),

        # Experimental failing build notifier.
        #
        # These emails only go to the catch-all list.
        InformativeMailNotifier(
            fromaddr = from_email,
            extraRecipients = ['*****@*****.**'],
            sendToInterestedUsers = False,
            mode = 'failing',
            categories = ['experimental'],
            addLogs = False,
            num_lines = 15),

        # Regular problem build notifier.
        #
        # These emails go to the interested (internal users), and the catch-all
        # list.
        InformativeMailNotifier(
            fromaddr = from_email,
            lookup = internal_lookup,
            extraRecipients = ['*****@*****.**'],
            sendToInterestedUsers = True,
            mode = 'problem',
            categories = ['build', 'test'],
            addLogs = False,
            num_lines = 15),

        # Regular failing build notifier.
        #
        # These emails only go to the catch-all list.
        #
        # FIXME: Eventually, these should also go to the current build czars.
        # TODO: change subject to differentiate these from the problem emails
        InformativeMailNotifier(
            fromaddr = from_email,
            sendToInterestedUsers = False,
            extraRecipients = ['*****@*****.**'],
            mode = 'failing',
            categories = ['build', 'test'],
            addLogs = False,
            num_lines = 15),

        # Phase status change notifier.
        #
        # These emails only go to the catch-all list.
        buildbot.status.mail.MailNotifier(
            fromaddr = from_email,
            sendToInterestedUsers = False,
            extraRecipients = ['*****@*****.**'],
            mode = 'change',
            categories = ['status']),]