예제 #1
0
def get_web():
    from buildbot.status import html
    from buildbot.status.web import authz, auth
    import users

    users = users.get_users()

    authz_cfg = authz.Authz(auth=auth.BasicAuth(users),
                            view=True,
                            forceBuild='auth',
                            forceAllBuilds='auth',
                            pingBuilder='auth',
                            gracefulShutdown=False,
                            pauseSlave='auth',
                            stopBuild='auth',
                            stopAllBuilds='auth',
                            cancelPendingBuild='auth',
                            cancelAllPendingBuilds='auth',
                            stopChange='auth',
                            cleanShutdown=False,
                            showUsersPage='auth')

    return html.WebStatus(http_port="tcp:8010:interface=127.0.0.1",
                          authz=authz_cfg,
                          change_hook_dialects={
                              'base': True,
                              'github': {}
                          },
                          change_hook_auth=['file:changehook.passwd'])
예제 #2
0
def setup(c, config):
    c["status"] = []

    authz_cfg = authz.Authz(forceBuild=True,
                            forceAllBuilds=True,
                            stopBuild=True,
                            stopAllBuilds=True,
                            cancelPendingBuild=True,
                            stopChange=True)

    c["status"].append(html.WebStatus(http_port=config["web_port"],
                                      authz=authz_cfg,
                                      change_hook_dialects={"base": True}))

    c["status"].append(words.IRC(host="irc.freenode.net",
                                 nick="sbbot",
                                 channels=["#sugar"],
                                 categories=["upstream"],
                                 notify_events={"successToFailure": 1,
                                                "failureToSuccess": 1}))

    c["status"].append(MailNotifier(fromaddr="*****@*****.**",
                                    mode=["problem"],
                                    lookup="sugarlabs.org",
                                    categories=["upstream"],
                                    extraRecipients=["*****@*****.**"]))

    c["status"].append(HttpStatusPush(serverUrl=str(config["status_url"])))
예제 #3
0
def get_status():
    status = []
    authz_cfg=authz.Authz(
        # change any of these to True to enable; see the manual for more
        # options
        gracefulShutdown = False,
        forceBuild = True, # use this to test your slave once it is set up
        forceAllBuilds = False,
        pingBuilder = False,
        stopBuild = False,
        stopAllBuilds = False,
        cancelPendingBuild = False,
    )
    status.append(html.WebStatus(http_port=8010, authz=authz_cfg))


    mn = MailNotifier(fromaddr="*****@*****.**", 
                      sendToInterestedUsers=False, mode='all',
                      extraRecipients=['*****@*****.**'],
                      useTls=True, relayhost="smtp.gmail.com", smtpPort=587, smtpUser="******", smtpPassword="******")
    status.append(mn)
    return status
    def _getWeb(self):
        """
        Return a web status based on configuration.
        """
        configuration = self._raw['web']
        http_port = configuration.get('port', 8000)
        htpasswd_path = configuration.get('htpasswd', 'no-such-file')
        authz_kwargs = configuration.get('authorization', {})

        htpasswd_auth = None
        try:
            htpasswd_auth = HTPasswdAuth(htpasswd_path)
        except AssertionError:
            # Don't use authentication if we can not open the file... mainly
            # useful for testing.
            print '!!!WARNING!!! Failed to find the password file.'
            print 'Starting with NO authentication.'
            htpasswd_auth = None

        authz_kwargs['auth'] = htpasswd_auth
        authz_cfg = authz.Authz(**authz_kwargs)

        return html.WebStatus(http_port=http_port, authz=authz_cfg)
예제 #5
0
def get_status_targets(standard_builders, standard_categories=None):

    from buildbot.status import html
    from buildbot.status.web import auth, authz
    authz_cfg = authz.Authz(
        # change any of these to True to enable; see the manual for more
        # options
        gracefulShutdown=False,
        forceBuild=True,  # use this to test your slave once it is set up
        forceAllBuilds=False,
        pingBuilder=True,
        stopBuild=True,
        stopAllBuilds=False,
        cancelPendingBuild=True,
    )

    default_email = config.options.get('Master Options', 'default_email')

    return [
        buildbot.status.html.WebStatus(http_port=8011, authz=authz_cfg),

        # All the standard builders send e-mail and IRC notifications.
        buildbot.status.mail.MailNotifier(
            fromaddr="*****@*****.**",
            extraRecipients=[default_email],
            lookup=ConfigEmailLookup(
                os.path.join(os.path.dirname(__file__), "llvmauthors.cfg"),
                default_email),
            mode="problem",
            builders=standard_builders),
        buildbot.status.words.IRC(
            host="irc.oftc.net",
            nick="llvmbb",
            channels=["#llvm"],
            allowForce=True,
            categories=standard_categories,
            notify_events=['successToFailure', 'failureToSuccess']),
        # Use different nick's in the different channels to support ignoring
        # one bot or the other.
        # (Note: /ignore applies to all channels on the network)
        buildbot.status.words.IRC(
            host="irc.oftc.net",
            nick="llvmbb-llvm-build",
            channels=["#llvm-build"],
            allowForce=True,
            categories=standard_categories,
            notify_events=['successToFailure', 'failureToSuccess']),

        # In addition to that the following notifiers are defined for special
        # cases.
        InformativeMailNotifier(fromaddr="*****@*****.**",
                                sendToInterestedUsers=False,
                                extraRecipients=["*****@*****.**"],
                                subject="Build %(builder)s Failure",
                                mode="failing",
                                builders=["polly-amd64-linux"],
                                addLogs=False,
                                num_lines=15),
        InformativeMailNotifier(fromaddr="*****@*****.**",
                                sendToInterestedUsers=False,
                                extraRecipients=["*****@*****.**"],
                                subject="Build %(builder)s Failure",
                                mode="failing",
                                builders=[
                                    "clang-aarch64-linux-build-cache",
                                    "clang-armv7-linux-build-cache"
                                ],
                                addLogs=False,
                                num_lines=15),
        InformativeMailNotifier(fromaddr="*****@*****.**",
                                sendToInterestedUsers=False,
                                extraRecipients=["*****@*****.**"],
                                subject="Build %(builder)s Failure",
                                mode="failing",
                                builders=["clang-x86_64-debian-fast"],
                                addLogs=False,
                                num_lines=15),
        InformativeMailNotifier(
            fromaddr="*****@*****.**",
            sendToInterestedUsers=False,
            extraRecipients=["*****@*****.**"],
            subject="Build %(builder)s Failure",
            mode="failing",
            builders=["clang-atom-d525-fedora-rel", "clang-x64-ninja-win7"],
            addLogs=False,
            num_lines=15),
        InformativeMailNotifier(
            fromaddr="*****@*****.**",
            sendToInterestedUsers=False,
            extraRecipients=["*****@*****.**"],
            subject="Build %(builder)s Failure",
            mode="failing",
            builders=["llvm-hexagon-elf", "clang-hexagon-elf"],
            addLogs=False,
            num_lines=15),
        InformativeMailNotifier(fromaddr="*****@*****.**",
                                sendToInterestedUsers=False,
                                extraRecipients=["*****@*****.**"],
                                subject="Build %(builder)s Failure",
                                mode="failing",
                                builders=[
                                    "clang-s390x-linux",
                                    "clang-s390x-linux-multistage",
                                    "clang-s390x-linux-lnt"
                                ],
                                addLogs=False,
                                num_lines=15),
        InformativeMailNotifier(fromaddr="*****@*****.**",
                                sendToInterestedUsers=False,
                                extraRecipients=[
                                    "*****@*****.**",
                                    "*****@*****.**"
                                ],
                                subject="Build %(builder)s Failure",
                                mode="failing",
                                builders=["clang-x86_64-linux-abi-test"],
                                addLogs=False,
                                num_lines=15),
        InformativeMailNotifier(fromaddr="*****@*****.**",
                                sendToInterestedUsers=False,
                                extraRecipients=["*****@*****.**"],
                                subject="Build %(builder)s Failure",
                                mode="failing",
                                builders=["llvm-avr-linux"],
                                addLogs=False,
                                num_lines=15),
        InformativeMailNotifier(
            fromaddr="*****@*****.**",
            sendToInterestedUsers=False,
            extraRecipients=["*****@*****.**"],
            subject="Build %(builder)s Failure",
            mode="failing",
            builders=[
                "clang-lld-x86_64-2stage", "lld-x86_64-win7",
                "lld-x86_64-freebsd", "lld-x86_64-darwin13",
                "clang-x86_64-linux-abi-test",
                "llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast",
                "clang-with-lto-ubuntu", "clang-with-thin-lto-ubuntu",
                "llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast",
                "llvm-clang-x86_64-expensive-checks-win"
            ],
            addLogs=False),
        InformativeMailNotifier(
            fromaddr="*****@*****.**",
            sendToInterestedUsers=False,
            extraRecipients=[
                "*****@*****.**", "*****@*****.**"
            ],
            subject="Build %(builder)s Failure",
            mode="failing",
            builders=[
                "polly-arm-linux",
                "aosp-O3-polly-before-vectorizer-unprofitable"
            ],
            addLogs=False,
            num_lines=15),
        InformativeMailNotifier(fromaddr="*****@*****.**",
                                sendToInterestedUsers=True,
                                extraRecipients=["*****@*****.**"],
                                subject="Build %(builder)s Failure",
                                mode="problem",
                                builders=["reverse-iteration"],
                                addLogs=False,
                                num_lines=15),
        InformativeMailNotifier(fromaddr="*****@*****.**",
                                sendToInterestedUsers=False,
                                extraRecipients=["*****@*****.**"],
                                subject="Build %(builder)s Failure",
                                mode="failing",
                                builders=["clang-cuda-build"],
                                addLogs=False,
                                num_lines=15),
        InformativeMailNotifier(
            fromaddr="*****@*****.**",
            sendToInterestedUsers=False,
            extraRecipients=["*****@*****.**", "*****@*****.**"],
            subject="Build %(builder)s Failure",
            mode="failing",
            builders=["netbsd-amd64"],
            addLogs=False,
            num_lines=15),
        InformativeMailNotifier(fromaddr="*****@*****.**",
                                sendToInterestedUsers=False,
                                extraRecipients=["*****@*****.**"],
                                subject="Build %(builder)s Failure",
                                mode="failing",
                                builders=["llvm-riscv-linux"],
                                addLogs=False,
                                num_lines=15),
        InformativeMailNotifier(fromaddr="*****@*****.**",
                                sendToInterestedUsers=False,
                                extraRecipients=["*****@*****.**"],
                                subject="Build %(builder)s Failure",
                                mode="failing",
                                builders=["lldb-x64-windows-ninja"],
                                addLogs=False,
                                num_lines=15),
        InformativeMailNotifier(fromaddr="*****@*****.**",
                                sendToInterestedUsers=False,
                                extraRecipients=["*****@*****.**"],
                                subject="Build %(builder)s Failure",
                                mode="failing",
                                builders=["fuchsia-x86_64-linux"],
                                addLogs=False),
        InformativeMailNotifier(fromaddr="*****@*****.**",
                                sendToInterestedUsers=True,
                                extraRecipients=["*****@*****.**"],
                                subject="Build %(builder)s Failure",
                                mode="failing",
                                builders=["lldb-x86_64-fedora"],
                                addLogs=False),
        InformativeMailNotifier(fromaddr="*****@*****.**",
                                sendToInterestedUsers=True,
                                extraRecipients=["*****@*****.**"],
                                subject="Build %(builder)s Failure",
                                mode="failing",
                                builders=["lldb-x86_64-debian"],
                                addLogs=False),
        InformativeMailNotifier(
            fromaddr="*****@*****.**",
            sendToInterestedUsers=True,
            extraRecipients=["*****@*****.**"],
            subject="Build %(builder)s Failure",
            mode="failing",
            builders=["lldb-arm-ubuntu", "lldb-aarch64-ubuntu"],
            addLogs=False),
        InformativeMailNotifier(
            fromaddr="*****@*****.**",
            sendToInterestedUsers=True,
            extraRecipients=["*****@*****.**"],
            subject="Build %(builder)s Failure",
            mode="failing",
            builders=["llvm-clang-x86_64-win-fast", "lld-x86_64-ubuntu-fast"],
            addLogs=False),
    ]
예제 #6
0
    def __init__(self, klass, *args, **kw):
        self.klass = klass
        self.args = args
        self.kw = kw

    def __call__(self, project=None):
        return self.klass(*self.args,
                          categories=project and [project.name] or None,
                          **self.kw)


default_authz = authz.Authz(
    gracefulShutdown=True,
    forceBuild=True,
    forceAllBuilds=True,
    pingBuilder=True,
    stopBuild=True,
    stopAllBuilds=True,
    cancelPendingBuild=True,
)


def WebStatus(authz=default_authz, order_console_by_time=True, *args, **kw):
    """Generates a StatusFactory for FilteredWebStatus"""
    return StatusFactory(FilteredWebStatus,
                         *args,
                         authz=authz,
                         order_console_by_time=order_console_by_time,
                         **kw)

예제 #7
0
from buildbot.status import html, mail
from buildbot.status.web import authz

####### STATUS TARGETS

# 'status' is a list of Status Targets. The results of each build will be
# pushed to these targets. buildbot/status/*.py has a variety to choose from,
# including web pages, email senders, and IRC bots.

status = []

authz_cfg=authz.Authz(
    # change any of these to True to enable; see the manual for more options
    gracefulShutdown = False,
    forceBuild = True, # use this to test your slave once it is set up
    forceAllBuilds = False,
    pingBuilder = False,
    stopBuild = False,
    stopAllBuilds = False,
    cancelPendingBuild = False,
)
status.append(html.WebStatus(
    http_port = 8080,
    authz = authz_cfg,
    change_hook_dialects = { 'github' : True }
))


def get_smtp_password():
    path = os.path.join(os.path.dirname(__file__), "passwords/smtp")
    pw = open(path).read().strip()
    return pw
예제 #8
0
class NimBuildStatus(html.WebStatus):
    def setupUsualPages(self, numbuilds, num_events, num_events_max):
        File.contentTypes[".db"] = "application/x-sqlite3"

        html.WebStatus.setupUsualPages(self, numbuilds, num_events,
                                       num_events_max)
        self.putChild("buildstatusimage", StatusImageResource())


authz_cfg = authz.Authz(
    # change any of these to True to enable; see the manual for more
    # options
    auth=auth.BasicAuth(user_credentials),
    gracefulShutdown=False,
    forceBuild='auth',
    forceAllBuilds='auth',
    pingBuilder=False,
    stopBuild='auth',
    stopAllBuilds='auth',
    cancelPendingBuild='auth',
)
c['status'].append(NimBuildStatus(http_port=8010, authz=authz_cfg))

# PROJECT IDENTITY

# the 'title' string will appear at the top of this buildbot
# installation's html.WebStatus home page (linked to the
# 'titleURL') and is embedded in the title of the waterfall HTML page.

c['title'] = "Nim Compiler"
c['titleURL'] = "http://nimrod-lang.org"
예제 #9
0
# using simplejson instead of json since Twisted wants ascii instead of unicode
import simplejson as json

status = []

# Load users from external file, see users.json.sample
users = []
for user in json.load(open("users.json")):
    users.append((user['username'], user['password']))

authz_cfg = authz.Authz(
    # change any of these to True to enable; see the manual for more
    # options
    auth=auth.BasicAuth(users),
    gracefulShutdown=False,
    forceBuild='auth',  # use this to test your slave once it is set up
    forceAllBuilds='auth',
    pingBuilder='auth',
    stopBuild='auth',
    stopAllBuilds='auth',
    cancelPendingBuild='auth',
)


class WebStatus(html.WebStatus):
    def setupUsualPages(self, numbuilds, num_events, num_events_max):
        html.WebStatus.setupUsualPages(self, numbuilds, num_events,
                                       num_events_max)
        self.putChild("buildstatusimage", BuildStatusImageResource())


status.append(
예제 #10
0
def get_status_targets(standard_builders, standard_categories=None):

    from buildbot.status import html
    from buildbot.status.web import auth, authz
    authz_cfg=authz.Authz(
                      # change any of these to True to enable; see the manual for more
                      # options
                      gracefulShutdown   = False,
                      forceBuild         = True, # use this to test your slave once it is set up
                      forceAllBuilds     = False,
                      pingBuilder        = True,
                      stopBuild          = True,
                      stopAllBuilds      = False,
                      cancelPendingBuild = True,
                      )

    default_email = config.options.get('Master Options', 'default_email')

    return [
        buildbot.status.html.WebStatus(
            http_port = 8011, authz=authz_cfg),

        # All the standard builders send e-mail and IRC notifications.
        buildbot.status.mail.MailNotifier(
            fromaddr = "*****@*****.**",
            extraRecipients = [default_email],
            lookup = ConfigEmailLookup(os.path.join(os.path.dirname(__file__),
                                                    "llvmauthors.cfg"),
                                       default_email),
            mode = "problem",
            builders = standard_builders),
        buildbot.status.words.IRC(
            host = "irc.oftc.net", nick = "llvmbb",
            channels = ["#llvm"],
            allowForce = True,
            categories = standard_categories,
            notify_events = ['successToFailure', 'failureToSuccess']),
        # Use different nick's in the different channels to support ignoring
        # one bot or the other.
        # (Note: /ignore applies to all channels on the network)
        buildbot.status.words.IRC(
            host = "irc.oftc.net", nick = "llvmbb-llvm-build",
            channels = ["#llvm-build"],
            allowForce = True,
            categories = standard_categories,
            notify_events = ['successToFailure', 'failureToSuccess']),

        # In addition to that the following notifiers are defined for special
        # cases.
        InformativeMailNotifier(
            fromaddr = "*****@*****.**",
            sendToInterestedUsers= False,
            extraRecipients = ["*****@*****.**"],
            subject="Build %(builder)s Failure",
            mode = "failing",
            builders = ["polly-amd64-linux", "polly-intel32-linux",
                        "polly-perf-O3", "polly-perf-O3-polly",
                        "polly-perf-O3-polly-codegen-isl",
                        "polly-perf-O3-polly-scev",
                        "polly-perf-O3-polly-scev-codegen-isl",
                        "polly-perf-O3-polly-detect"],
            addLogs=False,
            num_lines = 15),
        InformativeMailNotifier(
            fromaddr = "*****@*****.**",
            sendToInterestedUsers= False,
            extraRecipients = ["*****@*****.**", "*****@*****.**",
                               "*****@*****.**", "*****@*****.**",
                               "*****@*****.**", "*****@*****.**"],
            subject="Build %(builder)s Failure",
            mode = "failing",
            builders = ["clang-x86_64-darwin10-gdb", "clang-x86_64-ubuntu-gdb-75"],
            addLogs=False,
            num_lines = 15),
        InformativeMailNotifier(
            fromaddr = "*****@*****.**",
            sendToInterestedUsers= False,
            extraRecipients = ["*****@*****.**"],
            subject="Build %(builder)s Failure",
            mode = "failing",
            builders = ["clang-x86_64-debian-fast"],
            addLogs=False,
            num_lines = 15),
        InformativeMailNotifier(
            fromaddr = "*****@*****.**",
            sendToInterestedUsers= False,
            extraRecipients = ["*****@*****.**"],
            subject="Build %(builder)s Failure",
            mode = "failing",
            builders = ["clang-atom-d525-fedora", "clang-atom-d525-fedora-rel",
                        "clang-x64-ninja-win7"],
            addLogs=False,
            num_lines = 15),
        InformativeMailNotifier(
            fromaddr = "*****@*****.**",
            sendToInterestedUsers= False,
            extraRecipients = ["*****@*****.**"],
            subject="Build %(builder)s Failure",
            mode = "failing",
            builders = ["llvm-hexagon-elf","clang-hexagon-elf"],
            addLogs=False,
            num_lines = 15),
        InformativeMailNotifier(
            fromaddr = "*****@*****.**",
            sendToInterestedUsers= False,
            extraRecipients = ["*****@*****.**"],
            subject="Build %(builder)s Failure",
            mode = "failing",
            builders = ["clang-s390x-linux", "clang-s390x-linux-multistage",
                        "clang-s390x-linux-lnt"],
            addLogs=False,
            num_lines = 15),
        InformativeMailNotifier(
            fromaddr = "*****@*****.**",
            sendToInterestedUsers= False,
            extraRecipients = ["*****@*****.**","*****@*****.**"],
            subject="Build %(builder)s Failure",
            mode = "failing",
            builders = ["llgo-x86_64-linux"],
            addLogs=False,
            num_lines = 15),
        InformativeMailNotifier(
            fromaddr = "*****@*****.**",
            sendToInterestedUsers= False,
            extraRecipients = ["*****@*****.**",
                               "*****@*****.**"],
            subject="Build %(builder)s Failure",
            mode = "failing",
            builders = ["lldb-x86_64-ubuntu-14.04-cmake",
                        "lldb-x86_64-ubuntu-14.04-buildserver",
                        "lldb-windows7-android",
                        "lldb-x86_64-darwin-13.4",
                        "lldb-x86_64-ubuntu-14.04-android"],
            addLogs=False,
            num_lines = 15),
        InformativeMailNotifier(
            fromaddr = "*****@*****.**",
            sendToInterestedUsers= False,
            extraRecipients = ["*****@*****.**",
                               "*****@*****.**"],
            subject="Build %(builder)s Failure",
            mode = "failing",
            builders = ["clang-x86_64-linux-abi-test"],
            addLogs=False,
            num_lines = 15),
        InformativeMailNotifier(
            fromaddr = "*****@*****.**",
            sendToInterestedUsers= False,
            extraRecipients = ["*****@*****.**"],
            subject="Build %(builder)s Failure",
            mode = "failing",
            builders = ["llvm-mips-linux", "clang-cmake-mips",
                        "clang-cmake-mipsel"],
            addLogs=False,
            num_lines = 15),
        InformativeMailNotifier(
            fromaddr = "*****@*****.**",
            sendToInterestedUsers = False,
            extraRecipients = ["*****@*****.**"],
            subject="Build %(builder)s Failure",
            mode = "failing",
            builders = ["llvm-avr-linux"],
            addLogs=False,
            num_lines = 15),
        InformativeMailNotifier(
            fromaddr = "*****@*****.**",
            sendToInterestedUsers= False,
            extraRecipients = ["*****@*****.**"],
            subject="Build %(builder)s Failure",
            mode = "failing",
            builders = ["clang-lld-x86_64-2stage", "lld-x86_64-win7",
                        "lld-x86_64-freebsd", "sanitizer_x86_64-freebsd",
                        "clang-x86_64-linux-abi-test", "lld-x86_64-darwin13",
                        "llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast",
                        "clang-with-lto-ubuntu", "clang-with-thin-lto-ubuntu",
                        "llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast",
                        "llvm-clang-x86_64-expensive-checks-win"],
            addLogs=False),
        InformativeMailNotifier(
            fromaddr = "*****@*****.**",
            sendToInterestedUsers= False,
            extraRecipients = ["*****@*****.**"],
            subject="Build %(builder)s Failure",
            mode = "failing",
            builders = ["polly-arm-linux",
                        "aosp-O3-polly-before-vectorizer-unprofitable"],
            addLogs=False,
            num_lines = 15),
        InformativeMailNotifier(
            fromaddr = "*****@*****.**",
            sendToInterestedUsers= True,
            extraRecipients = ["*****@*****.**"],
            subject="Build %(builder)s Failure",
            mode = "problem",
            builders = ["reverse-iteration"],
            addLogs=False,
            num_lines = 15),
        InformativeMailNotifier(
            fromaddr = "*****@*****.**",
            sendToInterestedUsers= False,
            extraRecipients = ["*****@*****.**"],
            subject="Build %(builder)s Failure",
            mode = "failing",
            builders = ["clang-cuda-build"],
            addLogs=False,
            num_lines = 15),
        InformativeMailNotifier(
            fromaddr = "*****@*****.**",
            sendToInterestedUsers= False,
            extraRecipients = ["*****@*****.**"],
            subject="Build %(builder)s Failure",
            mode = "failing",
            builders = ["lldb-amd64-ninja-netbsd7",
                        "lldb-amd64-ninja-netbsd8"],
            addLogs=False,
            num_lines = 15),
        InformativeMailNotifier(
            fromaddr = "*****@*****.**",
            sendToInterestedUsers = False,
            extraRecipients = ["*****@*****.**"],
            subject="Build %(builder)s Failure",
            mode = "failing",
            builders = ["llvm-riscv-linux"],
            addLogs=False,
            num_lines = 15),
        ]
예제 #11
0
from buildbot.changes.filter import ChangeFilter
from buildbot.steps.source.git import Git
from buildbot.steps.shell import ShellCommand
from buildbot.schedulers.timed import Nightly
from buildbot.status.mail import MailNotifier
from buildbot.status.web import authz
from buildbot.status.results import SUCCESS, WARNINGS, FAILURE

c = BuildmasterConfig = {}

c['title'] = "riscv-buildbot.dabbelt.com"
c['titleURL'] = "http://riscv-buildbot.dabbelt.com"
c['buildbotURL'] = "http://riscv-buildbot.dabbelt.com"

authz_cfg=authz.Authz(
  forceBuild = True
)

c['protocols'] = {'pb': {'port': 9989}}

# buildbot requires a flatened format for all its configuration
# entries, with some strings that serve as links between the various
# sections.  This builds up that format.
c['status'] = []
c['change_source'] = []
c['slaves'] = []
c['builders'] = []
c['schedulers'] = []

# slaves don't have any links at all, so they're pretty
# stright-forward -- we just output the whole list of slaves.
예제 #12
0
def get_status_targets(standard_builders, standard_categories=None):

    from buildbot.status import html
    from buildbot.status.web import auth, authz
    authz_cfg = authz.Authz(
        # change any of these to True to enable; see the manual for more
        # options
        gracefulShutdown=False,
        forceBuild=True,  # use this to test your slave once it is set up
        forceAllBuilds=False,
        pingBuilder=True,
        stopBuild=True,
        stopAllBuilds=False,
        cancelPendingBuild=True,
    )

    default_email = config.options.get('Master Options', 'default_email')

    return [
        buildbot.status.html.WebStatus(http_port=8011, authz=authz_cfg),

        # All the standard builders send e-mail and IRC notifications.
        buildbot.status.mail.MailNotifier(
            fromaddr="*****@*****.**",
            extraRecipients=[default_email],
            lookup=ConfigEmailLookup(
                os.path.join(os.path.dirname(__file__), "llvmauthors.cfg"),
                default_email),
            mode="problem",
            builders=standard_builders),
        buildbot.status.words.IRC(
            host="irc.oftc.net",
            nick="llvmbb",
            channels=["#llvm"],
            allowForce=True,
            categories=standard_categories,
            notify_events=['successToFailure', 'failureToSuccess']),

        # In addition to that the following notifiers are defined for special
        # cases.
        InformativeMailNotifier(fromaddr="*****@*****.**",
                                sendToInterestedUsers=False,
                                extraRecipients=["*****@*****.**"],
                                subject="Build %(builder)s Failure",
                                mode="failing",
                                builders=[
                                    "polly-amd64-linux", "polly-intel32-linux",
                                    "polly-perf-O3", "polly-perf-O3-polly",
                                    "polly-perf-O3-polly-codegen-isl",
                                    "polly-perf-O3-polly-scev",
                                    "polly-perf-O3-polly-scev-codegen-isl",
                                    "polly-perf-O3-polly-detect"
                                ],
                                addLogs=False,
                                num_lines=15),
        InformativeMailNotifier(fromaddr="*****@*****.**",
                                sendToInterestedUsers=False,
                                extraRecipients=[
                                    "*****@*****.**", "*****@*****.**",
                                    "*****@*****.**",
                                    "*****@*****.**",
                                    "*****@*****.**",
                                    "*****@*****.**"
                                ],
                                subject="Build %(builder)s Failure",
                                mode="failing",
                                builders=[
                                    "clang-x86_64-darwin10-gdb",
                                    "clang-x86_64-ubuntu-gdb-75"
                                ],
                                addLogs=False,
                                num_lines=15),
        InformativeMailNotifier(fromaddr="*****@*****.**",
                                sendToInterestedUsers=False,
                                extraRecipients=["*****@*****.**"],
                                subject="Build %(builder)s Failure",
                                mode="failing",
                                builders=["clang-x86_64-debian-fast"],
                                addLogs=False,
                                num_lines=15),
        InformativeMailNotifier(fromaddr="*****@*****.**",
                                sendToInterestedUsers=False,
                                extraRecipients=["*****@*****.**"],
                                subject="Build %(builder)s Failure",
                                mode="failing",
                                builders=[
                                    "clang-atom-d525-fedora",
                                    "clang-atom-d525-fedora-rel",
                                    "clang-x64-ninja-win7"
                                ],
                                addLogs=False,
                                num_lines=15),
        InformativeMailNotifier(
            fromaddr="*****@*****.**",
            sendToInterestedUsers=False,
            extraRecipients=["*****@*****.**"],
            subject="Build %(builder)s Failure",
            mode="failing",
            builders=["llvm-hexagon-elf", "clang-hexagon-elf"],
            addLogs=False,
            num_lines=15),
        InformativeMailNotifier(fromaddr="*****@*****.**",
                                sendToInterestedUsers=False,
                                extraRecipients=["*****@*****.**"],
                                subject="Build %(builder)s Failure",
                                mode="failing",
                                builders=["llvm-s390x-linux1"],
                                addLogs=False,
                                num_lines=15),
        InformativeMailNotifier(
            fromaddr="*****@*****.**",
            sendToInterestedUsers=False,
            extraRecipients=["*****@*****.**", "*****@*****.**"],
            subject="Build %(builder)s Failure",
            mode="failing",
            builders=["llgo-x86_64-linux"],
            addLogs=False,
            num_lines=15),
        InformativeMailNotifier(
            fromaddr="*****@*****.**",
            sendToInterestedUsers=False,
            extraRecipients=[
                "*****@*****.**",
                "*****@*****.**"
            ],
            subject="Build %(builder)s Failure",
            mode="failing",
            builders=[
                "lldb-x86_64-ubuntu-14.04-cmake",
                "lldb-x86_64-ubuntu-14.04-buildserver",
                "lldb-windows7-android", "lldb-x86_64-darwin-13.4",
                "lldb-x86_64-ubuntu-14.04-android"
            ],
            addLogs=False,
            num_lines=15),
        InformativeMailNotifier(fromaddr="*****@*****.**",
                                sendToInterestedUsers=False,
                                extraRecipients=[
                                    "*****@*****.**",
                                    "*****@*****.**"
                                ],
                                subject="Build %(builder)s Failure",
                                mode="failing",
                                builders=["clang-x86_64-linux-abi-test"],
                                addLogs=False,
                                num_lines=15),
        InformativeMailNotifier(fromaddr="*****@*****.**",
                                sendToInterestedUsers=False,
                                extraRecipients=["*****@*****.**"],
                                subject="Build %(builder)s Failure",
                                mode="failing",
                                builders=[
                                    "llvm-mips-linux", "clang-cmake-mips",
                                    "clang-cmake-mipsel"
                                ],
                                addLogs=False,
                                num_lines=15),
    ]
예제 #13
0
                      "extra_arguments": p_extra_arguments
                  }))

####### STATUS TARGETS

# 'status' is a list of Status Targets. The results of each build will be
# pushed to these targets. buildbot/status/*.py has a variety to choose from,
# including web pages, email senders, and IRC bots.

from buildbot.status import html
from buildbot.status.web import authz, auth
from irc import ExtendedIRC
from nightly import ShutdownIdleSlaves

authz_cfg = authz.Authz(auth=auth.BasicAuth([("%%WEB-USERNAME%%",
                                              "%%WEB-PASSWORD%%")]),
                        default_action='auth')
status_web = html.WebStatus(authz=authz_cfg, http_port=8010)
status_irc = ExtendedIRC(
    host="irc.dairc.net",
    port=6697,
    useSSL=True,
    useRevisions=True,
    nick="eA-BuildBot",
    password="******",
    channels=["#Athena"],
    notify_events={
        #'started': 1,
        #'finished': 1,
        #'success': 1,
        'failure': 1,
예제 #14
0
__all__ = ["www_status", "irc_status"]

from buildbot.status import html, words
from buildbot.status.web import authz, auth
from config import users

authz_cfg = authz.Authz(
    auth=auth.BasicAuth(users),
    gracefulShutdown=False,
    forceBuild='auth',
    forceAllBuilds='auth',
    pingBuilder='auth',
    stopBuild='auth',
    stopAllBuilds='auth',
    cancelPendingBuild='auth')

www_status = html.WebStatus(http_port=8010, authz=authz_cfg,
                            change_hook_dialects={'github': True})

irc_status = words.IRC(host="irc.freenode.net", nick="p3dbuildbot",
                       channels=["#panda3d-devel"], notify_events={
                           'exception': True,
                           'failureToSuccess': True,
                           'successToFailure': True})

# Fix the stupid github hook... I submitted a patch to buildbot for this.
# This should be fixed in buildbot 0.8.11.
from buildbot.status.web.hooks import github
import change_hook
github.getChanges = change_hook.getChanges
github.process_change = change_hook.process_change
예제 #15
0
c['status'] = []

from buildbot.status import html
from buildbot.status.web import authz, auth

authz_cfg=authz.Authz(
	#change to true to enable function
	auth=auth.BasicAuth([("pyflakes", "pyflakes")]),
	gracefulShutdown = False, 
	forceBuild = 'auth', #use this to test slave
	pingBuild = False,
	stopBuild = False, 
	stopAllBuilds = False, 
	cancelPendingBuild = False
)
c['status'].append(html.WebStatus(http_port=8010, authz_cfg))

from buildbot.scheduler import Try_Userpass
c['schedulers'].append(Try_Userpass(
									name = 'try'
									builderNames=['runtests'],
									port=5555,
									userpass=[('sampleuser', 'samplepass')]))







예제 #16
0
파일: master.py 프로젝트: astagi/r2d2
    BuilderConfig(name="weekly",
                  slavenames=[config.SLAVE_NAME],
                  factory=factory_weekly))

####### STATUS TARGETS

c['status'] = []

from buildbot.status import html
from buildbot.status.web import authz, auth

authz_cfg = authz.Authz(
    auth=auth.BasicAuth([(config.AUTH_USER, config.AUTH_PSW)]),
    gracefulShutdown=False,
    forceBuild='auth',
    forceAllBuilds=False,
    pingBuilder=False,
    stopBuild=False,
    stopAllBuilds=False,
    cancelPendingBuild=False,
)
c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg))

####### MAIL NOTIFIER

from buildbot.status.mail import MailNotifier
from buildbot.status.builder import Results


def messageFormatter(mode, name, build, results, master_status):
    result = Results[results]
    text = list()
예제 #17
0
def get_status_targets(standard_builders, standard_categories=None):

    from buildbot.status import html
    from buildbot.status.web import auth, authz
    authz_cfg = authz.Authz(
        # change any of these to True to enable; see the manual for more
        # options
        gracefulShutdown=False,
        forceBuild=True,  # use this to test your slave once it is set up
        forceAllBuilds=False,
        pingBuilder=True,
        stopBuild=True,
        stopAllBuilds=False,
        cancelPendingBuild=True,
    )

    default_email = config.options.get('Master Options', 'default_email')
    github_token = config.options.get('GitHub Status', 'token')

    return [
        buildbot.status.html.WebStatus(order_console_by_time=True,
                                       http_port=8011,
                                       authz=authz_cfg),
        GitHubStatus(token=github_token,
                     repoOwner='llvm',
                     repoName='llvm-project',
                     builders_to_report=[
                         "llvm-clang-x86_64-expensive-checks-ubuntu",
                         "llvm-clang-x86_64-win-fast",
                         "clang-x86_64-debian-fast",
                         "llvm-clang-x86_64-expensive-checks-debian",
                     ]),

        # All the standard builders send e-mail and IRC notifications.
        buildbot.status.mail.MailNotifier(
            fromaddr="*****@*****.**",
            extraRecipients=[default_email],
            lookup=ConfigEmailLookup(
                os.path.join(os.path.dirname(__file__), "llvmauthors.cfg"),
                default_email),
            mode="problem",
            builders=standard_builders),
        buildbot.status.words.IRC(
            host="irc.oftc.net",
            nick="llvmbb-llvm-build",
            channels=["#llvm-build"],
            allowForce=True,
            categories=standard_categories,
            notify_events=['successToFailure', 'failureToSuccess']),

        # In addition to that the following notifiers are defined for special
        # cases.
        InformativeMailNotifier(fromaddr="*****@*****.**",
                                sendToInterestedUsers=False,
                                extraRecipients=["*****@*****.**"],
                                subject="Build %(builder)s Failure",
                                mode="failing",
                                builders=[
                                    "clang-aarch64-linux-build-cache",
                                    "clang-armv7-linux-build-cache"
                                ],
                                addLogs=False,
                                num_lines=15),
        InformativeMailNotifier(fromaddr="*****@*****.**",
                                sendToInterestedUsers=False,
                                extraRecipients=["*****@*****.**"],
                                subject="Build %(builder)s Failure",
                                mode="failing",
                                builders=["clang-x86_64-debian-fast"],
                                addLogs=False,
                                num_lines=15),
        InformativeMailNotifier(fromaddr="*****@*****.**",
                                sendToInterestedUsers=False,
                                extraRecipients=["*****@*****.**"],
                                subject="Build %(builder)s Failure",
                                mode="failing",
                                builders=["clang-x64-ninja-win7"],
                                addLogs=False,
                                num_lines=15),
        InformativeMailNotifier(
            fromaddr="*****@*****.**",
            sendToInterestedUsers=False,
            extraRecipients=["*****@*****.**"],
            subject="Build %(builder)s Failure",
            mode="failing",
            builders=["clang-hexagon-elf"],
            addLogs=False,
            num_lines=15),
        InformativeMailNotifier(fromaddr="*****@*****.**",
                                sendToInterestedUsers=False,
                                extraRecipients=["*****@*****.**"],
                                subject="Build %(builder)s Failure",
                                mode="failing",
                                builders=[
                                    "clang-s390x-linux",
                                    "clang-s390x-linux-multistage",
                                    "clang-s390x-linux-lnt"
                                ],
                                addLogs=False,
                                num_lines=15),
        InformativeMailNotifier(fromaddr="*****@*****.**",
                                sendToInterestedUsers=False,
                                extraRecipients=[
                                    "*****@*****.**",
                                    "*****@*****.**"
                                ],
                                subject="Build %(builder)s Failure",
                                mode="failing",
                                builders=["clang-x86_64-linux-abi-test"],
                                addLogs=False,
                                num_lines=15),
        InformativeMailNotifier(fromaddr="*****@*****.**",
                                sendToInterestedUsers=False,
                                extraRecipients=["*****@*****.**"],
                                subject="Build %(builder)s Failure",
                                mode="failing",
                                builders=["llvm-avr-linux"],
                                addLogs=False,
                                num_lines=15),
        InformativeMailNotifier(
            fromaddr="*****@*****.**",
            sendToInterestedUsers=False,
            extraRecipients=["*****@*****.**"],
            subject="Build %(builder)s Failure",
            mode="failing",
            builders=[
                "lld-x86_64-win", "lld-x86_64-freebsd", "lld-x86_64-darwin",
                "clang-x86_64-linux-abi-test", "clang-with-lto-ubuntu",
                "clang-with-thin-lto-ubuntu",
                "llvm-clang-x86_64-expensive-checks-win",
                "llvm-clang-x86_64-expensive-checks-ubuntu"
            ],
            addLogs=False),
        InformativeMailNotifier(
            fromaddr="*****@*****.**",
            sendToInterestedUsers=False,
            extraRecipients=[
                "*****@*****.**", "*****@*****.**"
            ],
            subject="Build %(builder)s Failure",
            mode="failing",
            builders=[
                "polly-arm-linux",
                "aosp-O3-polly-before-vectorizer-unprofitable"
            ],
            addLogs=False,
            num_lines=15),
        InformativeMailNotifier(fromaddr="*****@*****.**",
                                sendToInterestedUsers=True,
                                extraRecipients=["*****@*****.**"],
                                subject="Build %(builder)s Failure",
                                mode="problem",
                                builders=["reverse-iteration"],
                                addLogs=False,
                                num_lines=15),
        InformativeMailNotifier(
            fromaddr="*****@*****.**",
            sendToInterestedUsers=False,
            extraRecipients=["*****@*****.**"],
            subject="Build %(builder)s Failure",
            mode="failing",
            builders=["clang-cuda-k80", "clang-cuda-p4", "clang-cuda-t4"],
            addLogs=False,
            num_lines=15),
        InformativeMailNotifier(fromaddr="*****@*****.**",
                                sendToInterestedUsers=False,
                                extraRecipients=["*****@*****.**"],
                                subject="Build %(builder)s Failure",
                                mode="failing",
                                builders=["llvm-riscv-linux"],
                                addLogs=False,
                                num_lines=15),
        InformativeMailNotifier(fromaddr="*****@*****.**",
                                sendToInterestedUsers=False,
                                extraRecipients=[
                                    "*****@*****.**",
                                    "*****@*****.**",
                                    "*****@*****.**",
                                    "*****@*****.**"
                                ],
                                subject="Build %(builder)s Failure",
                                mode="failing",
                                builders=["lldb-x64-windows-ninja"],
                                addLogs=False,
                                num_lines=15),
        InformativeMailNotifier(
            fromaddr="*****@*****.**",
            sendToInterestedUsers=False,
            extraRecipients=["*****@*****.**", "*****@*****.**"],
            subject="Build %(builder)s Failure",
            mode="failing",
            builders=["mlir-windows"],
            addLogs=False,
            num_lines=15),
        InformativeMailNotifier(fromaddr="*****@*****.**",
                                sendToInterestedUsers=False,
                                extraRecipients=["*****@*****.**"],
                                subject="Build %(builder)s Failure",
                                mode="failing",
                                builders=["fuchsia-x86_64-linux"],
                                addLogs=False),
        InformativeMailNotifier(fromaddr="*****@*****.**",
                                sendToInterestedUsers=True,
                                extraRecipients=["*****@*****.**"],
                                subject="Build %(builder)s Failure",
                                mode="failing",
                                builders=["lldb-x86_64-fedora"],
                                addLogs=False),
        InformativeMailNotifier(fromaddr="*****@*****.**",
                                sendToInterestedUsers=True,
                                extraRecipients=["*****@*****.**"],
                                subject="Build %(builder)s Failure",
                                mode="failing",
                                builders=[
                                    "fedora-llvm-x86_64", "x86_64-fedora-clang"
                                ],
                                addLogs=False),
        InformativeMailNotifier(fromaddr="*****@*****.**",
                                sendToInterestedUsers=True,
                                extraRecipients=["*****@*****.**"],
                                subject="Build %(builder)s Failure",
                                mode="failing",
                                builders=["lldb-x86_64-debian"],
                                addLogs=False),
        InformativeMailNotifier(
            fromaddr="*****@*****.**",
            sendToInterestedUsers=True,
            extraRecipients=["*****@*****.**"],
            subject="Build %(builder)s Failure",
            mode="failing",
            builders=["lldb-arm-ubuntu", "lldb-aarch64-ubuntu"],
            addLogs=False),
        InformativeMailNotifier(
            fromaddr="*****@*****.**",
            sendToInterestedUsers=True,
            extraRecipients=["*****@*****.**"],
            subject="Build %(builder)s Failure",
            mode="failing",
            builders=[
                "llvm-clang-x86_64-win-fast", "lld-x86_64-ubuntu-fast",
                "llvm-clang-x86_64-expensive-checks-ubuntu",
                "llvm-clang-win-x-armv7l", "llvm-clang-win-x-aarch64"
            ],
            addLogs=False),
        InformativeMailNotifier(fromaddr="*****@*****.**",
                                sendToInterestedUsers=False,
                                extraRecipients=["*****@*****.**"],
                                subject="Build %(builder)s Failure",
                                mode="failing",
                                builders=["clang-ve-ninja"],
                                addLogs=False),
        InformativeMailNotifier(
            fromaddr="*****@*****.**",
            sendToInterestedUsers=True,
            extraRecipients=["*****@*****.**", "*****@*****.**"],
            subject="Build %(builder)s Failure",
            mode="failing",
            builders=[
                "libc-x86_64-debian", "libc-x86_64_debian-dbg",
                "libc-x86_64-debian-dbg-asan"
            ],
            addLogs=False),
        InformativeMailNotifier(fromaddr="*****@*****.**",
                                sendToInterestedUsers=True,
                                extraRecipients=["*****@*****.**"],
                                subject="Sphinx build %(builder)s Failure",
                                mode="failing",
                                builders=["publish-sphinx-docs"],
                                addLogs=False),
        InformativeMailNotifier(
            fromaddr="*****@*****.**",
            sendToInterestedUsers=True,
            extraRecipients=["*****@*****.**"],
            subject="ML Compiler Opt Failure: %(builder)s",
            mode="failing",
            builders=[
                "ml-opt-dev-x86-64", "ml-opt-rel-x86-64",
                "ml-opt-devrel-x86-64"
            ],
            addLogs=False),
        InformativeMailNotifier(fromaddr="*****@*****.**",
                                sendToInterestedUsers=False,
                                extraRecipients=[
                                    "*****@*****.**",
                                    "*****@*****.**"
                                ],
                                subject="Build %(builder)s Failure",
                                mode="failing",
                                builders=[
                                    "flang-aarch64-ubuntu",
                                    "flang-aarch64-ubuntu-clang",
                                    "flang-aarch64-ubuntu-gcc10"
                                ],
                                addLogs=False,
                                num_lines=15),
    ]
예제 #18
0
 'protocols': {
     'pb': {
         'port': cybertron['devastator_slave_port']
     }
 },
 'builders':
 all_builders,
 'schedulers':
 all_schedulers,
 'status': [
     html.WebStatus(cybertron['devastator_master_port'],
                    authz=authz.Authz(view=True,
                                      forceBuild=True,
                                      forceAllBuilds=True,
                                      pingBuilder=True,
                                      stopBuild=True,
                                      stopAllBuilds=True,
                                      cancelPendingBuild=True,
                                      cancelAllPendingBuilds=True,
                                      stopChange=True,
                                      showUsersPage=True))
 ],
 'codebaseGenerator':
 lambda chdict: chdict['repository'],
 'change_source':
 change_sources,
 'mergeRequests':
 False,
 'debugPassword':
 '******',
 'changeHorizon':
 cybertron['horizon'],
예제 #19
0
    def __init__(self,
                 name,
                 homepage,
                 secretsfile="~/myconfig.json",
                 *args,
                 **kwargs):
        dict.__init__(self, *args, **kwargs)

        # Find the directory containing this .py file
        thisfile = __file__
        thisfile = thisfile.replace(".pyc", ".py")
        try:
            thisfile = os.readlink(thisfile)
        except:
            pass
        dir = os.path.join(os.path.dirname(thisfile))

        masterjson = json.load(open(os.path.join(dir, "master.json")))

        # Lots of unrelated stuff is grouped here simply because buildbot needs it all.
        # See e.g. https://github.com/buildbot/buildbot/blob/master/master/buildbot/scripts/sample.cfg
        # for a simple hard-coded linear example of what buildbot needs set.
        # FIXME: find a more readable way to organize this

        # Since we need to process tags, disable merging for the moment
        # Later we can make this smarter and disable merging just changes
        # which are at tags, or enable merging just on builders that are
        # way too slow and don't mind missing a tag
        self['mergeRequests'] = False

        # PORT NUMBERS
        # It's hard to keep port numbers straight for multiple projects,
        # so let's assign each project a slot number,
        # and use 8010 + slotnum for the http port,
        # 9010 + slotnum for the slave port, etc.
        # FIXME: get slot from masterjson
        slot = 0
        self.__http_port = 8010 + slot
        self['slavePortnum'] = 9010 + slot

        # SECRETS
        # Avoid checking secrets into git by keeping them in a json file.
        try:
            s = json.load(open(os.path.expanduser(secretsfile)))
            self.__auth = auth.BasicAuth([
                (s["webuser"].encode('ascii', 'ignore'),
                 s["webpass"].encode('ascii', 'ignore'))
            ])
            # For the moment, all slaves have same password
            self.slavepass = s["slavepass"].encode('ascii', 'ignore')
        except:
            exit(
                "%s must be a json file containing webuser, webpass, and slavepass; ascii only, no commas in quotes"
                % secretsfile)

        # STATUS TARGETS
        self['status'] = []
        authz_cfg = authz.Authz(
            # change any of these to True to enable; see the manual for more
            # options
            auth=self.__auth,
            gracefulShutdown=False,
            forceBuild='auth',
            forceAllBuilds=True,
            pingBuilder=True,
            stopBuild=True,
            stopAllBuilds=True,
            cancelPendingBuild=True,
        )
        # Need order_console_by_time for git or hg or any vcs that doesn't have numbered changesets
        self['status'].append(
            html.WebStatus(http_port=self.__http_port,
                           authz=authz_cfg,
                           order_console_by_time=True))

        self['status'].append(
            MailNotifier(fromaddr="*****@*****.**",
                         mode=('problem'),
                         sendToInterestedUsers=True,
                         extraRecipients=['*****@*****.**']))

        # DB URL
        self['db'] = {
            # This specifies what database buildbot uses to store its state.
            # This default is ok for all but the largest installations.
            'db_url': "sqlite:///state.sqlite",
        }

        # PROJECT IDENTITY
        # the 'title' string will appear at the top of this buildbot
        # installation's html.WebStatus home page (linked to the
        # 'titleURL') and is embedded in the title of the waterfall HTML page.

        # FIXME: get name and homepage from masterjson
        self['title'] = name
        self['titleURL'] = homepage

        # the 'buildbotURL' string should point to the location where the buildbot's
        # internal web server (usually the html.WebStatus page) is visible. This
        # typically uses the port number set in the Waterfall 'status' entry, but
        # with an externally-visible host name which the buildbot cannot figure out
        # without some help.

        self['buildbotURL'] = "http://" + socket.gethostname(
        ) + ":%d/" % self.__http_port

        # SLAVES
        self._os2slaves = {}
        self['slaves'] = []
        slaveconfigs = masterjson["slaves"]
        for slaveconfig in slaveconfigs:
            sname = slaveconfig["name"].encode('ascii', 'ignore')
            sos = slaveconfig["os"].encode('ascii', 'ignore')
            # Restrict to a single build at a time because our buildshims
            # typically assume they have total control of machine, and use sudo apt-get, etc. with abandon.
            s = BuildSlave(sname, self.slavepass, max_builds=1)
            self['slaves'].append(s)
            if sos not in self._os2slaves:
                self._os2slaves[sos] = []
            self._os2slaves[sos].append(sname)

        # These will be built up over the course of one or more calls to addSimpleProject
        self['change_source'] = []
        self['builders'] = []
        self['schedulers'] = []

        # Righty-o, wire 'em all up
        for project in masterjson["projects"]:
            self.addSimpleProject(
                project["name"].encode('ascii', 'ignore'),
                project["category"].encode('ascii', 'ignore'),
                project["repourl"].encode('ascii',
                                          'ignore'), project["builders"])
예제 #20
0
                       description="stopping containers",
                       descriptionDone="stopped",
                       workdir=BUILDSLAVE_BUILD_PATH + '/' +
                       PROJECT_TEST_FOLDER,
                       command=["docker-compose", "stop"]))

BUILDBOT_FACTORY_FOR_TEST.addStep(
    steps.ShellCommand(name="remove containers",
                       description="removing containers",
                       descriptionDone="removed",
                       workdir=BUILDSLAVE_BUILD_PATH + '/' +
                       PROJECT_TEST_FOLDER,
                       command=["docker-compose", "rm", "-f"]))

# ------
# status
# ------
BUILDBOT_MASTER_AUTHZ_CFG = authz.Authz(
    # change any of these to True to enable; see the manual for more
    # options
    auth=auth.BasicAuth([(BUILDBOT_MASTER_AUTH_ACCOUNT,
                          BUILDBOT_MASTER_AUTH_PASS)]),
    gracefulShutdown=False,
    forceBuild='auth',  # use this to test your slave once it is set up
    forceAllBuilds='auth',  # ..or this
    pingBuilder=False,
    stopBuild=False,
    stopAllBuilds=False,
    cancelPendingBuild=False,
)
예제 #21
0
        createGithubStatus(
            'flocker',
            token=privateData['github']['token'],
            failing_builders=failing_builders,
        ))

c['status'].append(Monitor())

authz_cfg = authz.Authz(
    auth=BasicAuth([(USER, PASSWORD)]),

    # The "auth" value lines up with the `auth` keyword argument above!
    forceBuild='auth',
    forceAllBuilds='auth',
    stopBuild='auth',

    # Leave all this stuff disabled for now, but maybe enable it with "auth"
    # later.
    gracefulShutdown=False,
    pingBuilder='auth',
    stopAllBuilds=False,
    cancelPendingBuild='auth',
    cancelAllPendingBuilds=False,
)
c['status'].append(
    WebStatus(
        http_port=80,
        authz=authz_cfg,
        public_html=sibpath(__file__, 'public_html'),
        jinja_loaders=[
            jinja2.FileSystemLoader(sibpath(__file__, 'templates'))
        ],
예제 #22
0
 def Config(self):
     return {
         'projectName':
         "Clementine",
         'projectURL':
         "http://www.clementine-player.org/",
         'buildbotURL':
         "http://buildbot.clementine-player.org/",
         'slavePortnum':
         9989,
         'slaves':
         self.slaves,
         'builders':
         self.builders,
         'change_source': [
             builders.GitPoller("Android-Remote"),
             builders.GitPoller("Clementine"),
             builders.GitPoller("Dependencies"),
             builders.GitPoller("Website"),
         ],
         'status': [
             html.WebStatus(
                 http_port="tcp:8010",
                 authz=authz.Authz(
                     forceBuild=True,
                     forceAllBuilds=True,
                     stopBuild=True,
                     stopAllBuilds=True,
                     cancelPendingBuild=True,
                     cancelAllPendingBuilds=True,
                     stopChange=True,
                 ),
             ),
             mail.MailNotifier(
                 fromaddr="*****@*****.**",
                 lookup="gmail.com",
                 mode="failing",
             ),
         ],
         'schedulers': [
             basic.SingleBranchScheduler(
                 name="automatic",
                 change_filter=filter.ChangeFilter(project="clementine",
                                                   branch="master"),
                 treeStableTimer=2 * 60,
                 builderNames=self.auto_builder_names,
             ),
             basic.SingleBranchScheduler(
                 name="dependencies",
                 change_filter=filter.ChangeFilter(project="dependencies",
                                                   branch="master"),
                 treeStableTimer=2 * 60,
                 builderNames=[
                     'Mac Dependencies',
                     'Windows Dependencies',
                 ],
             ),
             basic.SingleBranchScheduler(
                 name="website",
                 change_filter=filter.ChangeFilter(project="website",
                                                   branch="master"),
                 treeStableTimer=2 * 60,
                 builderNames=[
                     "Transifex website POT push",
                 ],
             ),
             basic.SingleBranchScheduler(
                 name="android-remote",
                 change_filter=filter.ChangeFilter(project="android-remote",
                                                   branch="master"),
                 treeStableTimer=2 * 60,
                 builderNames=[
                     "Android Remote",
                 ],
             ),
             forcesched.ForceScheduler(
                 name="force",
                 reason=forcesched.FixedParameter(name="reason",
                                                  default="force build"),
                 branch=forcesched.StringParameter(name="branch",
                                                   default="master"),
                 revision=forcesched.FixedParameter(name="revision",
                                                    default=""),
                 repository=forcesched.FixedParameter(name="repository",
                                                      default=""),
                 project=forcesched.FixedParameter(name="project",
                                                   default=""),
                 properties=[],
                 builderNames=[x['name'] for x in self.builders],
             ),
             timed.Nightly(
                 name="transifex_pull",
                 change_filter=filter.ChangeFilter(project="clementine",
                                                   branch="master"),
                 hour=10,
                 minute=0,
                 dayOfWeek=0,
                 branch="master",
                 builderNames=[
                     "Transifex PO pull",
                     "Transifex website PO pull",
                     "Transifex Android PO pull",
                 ],
             ),
         ],
     }