예제 #1
0
  def __init__(self, name, pollers, smtp_host, from_addr, reply_to,
               email_footer, cbuildbot_configs, etc_builder=None,
               properties=None):
    """Initialize the class.

    Arguments:
      name: See TryBase.__init__().
      pollers: A list of job repo git pit pollers.
      smtp_host: The smtp host for sending out error emails.
      from_addr: The email address to display as being sent from.
      reply_to: The email address to put in the 'Reply-To' email header field.
      email_footer: The footer to append to any emails sent out.
      cbuildbot_configs: (list) A list of supported 'cbuildbot' configs. Any
          'bot' request outside of this list will go to an 'etc' builder, if
          available.
      etc_builder: If not None, the name of the 'etc' builder.
      properties: See TryBase.__init__()
    """
    TryBase.__init__(self, name, [], properties or {})
    self.pollers = pollers
    self.smtp_host = smtp_host
    self.from_addr = from_addr
    self.reply_to = reply_to
    self.email_footer = email_footer
    self.cbuildbot_configs = set(cbuildbot_configs)
    self.etc_builder = etc_builder
예제 #2
0
    def __init__(self,
                 name,
                 pollers,
                 smtp_host,
                 from_addr,
                 reply_to,
                 email_footer,
                 cbuildbot_configs,
                 properties=None):
        """Initialize the class.

    Arguments:
      name: See TryBase.__init__().
      pollers: A list of job repo git pit pollers.
      smtp_host: The smtp host for sending out error emails.
      from_addr: The email address to display as being sent from.
      reply_to: The email address to put in the 'Reply-To' email header field.
      email_footer: The footer to append to any emails sent out.
      cbuildbot_configs: (CbuildbotConfigs) A configuration set instance. Any
          'bot' request outside of this list will go to an 'etc' builder, if
          available.
      properties: See TryBase.__init__()
    """
        TryBase.__init__(self, name, [], properties or {})
        self.pollers = pollers
        self.smtp_host = smtp_host
        self.from_addr = from_addr
        self.reply_to = reply_to
        self.email_footer = email_footer
        self.cbb = cbuildbot_configs
예제 #3
0
    def __init__(self,
                 name,
                 pollers,
                 smtp_host,
                 from_addr,
                 reply_to,
                 email_footer,
                 properties=None):
        """Initialize the class.

    Arguments:
      name: See TryBase.__init__().
      pollers: A list of job repo git pit pollers.
      smtp_host: The smtp host for sending out error emails.
      from_addr: The email address to display as being sent from.
      reply_to: The email address to put in the 'Reply-To' email header field.
      email_footer: The footer to append to any emails sent out.
      properties: See TryBase.__init__()
    """
        TryBase.__init__(self, name, [], properties or {})
        self.pollers = pollers
        self.smtp_host = smtp_host
        self.from_addr = from_addr
        self.reply_to = reply_to
        self.email_footer = email_footer
예제 #4
0
 def __init__(self, name, pools, properties,
              last_good_urls, code_review_sites):
   TryBase.__init__(self, name, pools.ListBuilderNames(), properties or {})
   self.pools = pools
   pools.SetParent(self)
   self.last_good_urls = last_good_urls
   self.code_review_sites = code_review_sites
   self._last_lkgr = None
   self.valid_builders = []
예제 #5
0
 def __init__(self, name, pools, properties, last_good_urls,
              code_review_sites):
     TryBase.__init__(self, name, pools.ListBuilderNames(), properties
                      or {})
     self.pools = pools
     pools.SetParent(self)
     self.last_good_urls = last_good_urls
     self.code_review_sites = code_review_sites
     self._last_lkgr = {}
     self.valid_builders = []
예제 #6
0
  def stopService(self):
    def rm_temp_dir(result):
      for poller in self.pollers:
        if os.path.isdir(poller.workdir):
          shutil.rmtree(poller.workdir)

    d = TryBase.stopService(self)
    d.addCallback(rm_temp_dir)
    d.addErrback(log.err)
    return d
예제 #7
0
    def stopService(self):
        def rm_temp_dir(result):
            for poller in self.pollers:
                if os.path.isdir(poller.workdir):
                    shutil.rmtree(poller.workdir)

        d = TryBase.stopService(self)
        d.addCallback(rm_temp_dir)
        d.addErrback(log.err)
        return d
예제 #8
0
  def __init__(self, name, pollers, smtp_host, from_addr, reply_to,
               email_footer, properties=None):
    """Initialize the class.

    Arguments:
      name: See TryBase.__init__().
      pollers: A list of job repo git pit pollers.
      smtp_host: The smtp host for sending out error emails.
      from_addr: The email address to display as being sent from.
      reply_to: The email address to put in the 'Reply-To' email header field.
      email_footer: The footer to append to any emails sent out.
      properties: See TryBase.__init__()
    """
    TryBase.__init__(self, name, [], properties or {})
    self.pollers = pollers
    self.smtp_host = smtp_host
    self.from_addr = from_addr
    self.reply_to = reply_to
    self.email_footer = email_footer
  def __init__(self, name, builders, url, properties=None):
    """
    Args:
      name: The name of this scheduler, for buildbot indexing.
      builders: The names of the builders it can schedule jobs for.
      url: The url to poll for new jobs.
      properties: Key-value pairs to be added to every job description.
    """
    TryBase.__init__(self, name, builders, properties or {})

    # The password to use for authentication.
    self._password = get_pw.Password('.jobqueue_password').MaybeGetPassword()

    # The poller instance that will be sending us jobs.
    self._poller = JsonPoller(url, self._password,
                              interval=_DEFAULT_POLLING_INTERVAL)

    # The url to which the scheduler posts that it started the job.
    self._url = url.rstrip('/') + '/accept/%s'
예제 #10
0
 def setServiceParent(self, parent):
   TryBase.setServiceParent(self, parent)
   self.valid_builders = self.master.botmaster.builders.keys()
예제 #11
0
 def startService(self):
   TryBase.startService(self)
   self.startConsumingChanges()
예제 #12
0
 def startService(self):
     TryBase.startService(self)
     self.startConsumingChanges()
예제 #13
0
 def setServiceParent(self, parent):
     TryBase.setServiceParent(self, parent)
     self.valid_builders = self.master.botmaster.builders.keys()
 def setServiceParent(self, parent):
   TryBase.setServiceParent(self, parent)
   self._poller.setServiceParent(self)