Пример #1
0
 def __init__(self, abbase=None, workdir=None, btarget=None, **kwargs):
     LoggingBuildStep.__init__(self, **kwargs)
     self.workdir = workdir
     self.abbase = abbase
     self.btarget = btarget
     self.description = ["Setting", "Destination"]
     self.addFactoryArguments(abbase=abbase, workdir=workdir, btarget=btarget)
Пример #2
0
 def __init__(self, base_url, wrenchlane, prefix, suffix, *args, **kwargs):
     self.logger = None
     self.base_url = base_url
     self.wrenchlane = wrenchlane
     self.prefix = prefix
     self.suffix = suffix
     LoggingBuildStep.__init__(self, name="BostonNasGetPackageUrlStep", haltOnFailure=True, *args, **kwargs)
Пример #3
0
    def __init__(self,
                 schedulerNames=[],
                 updateSourceStamp=True,
                 waitForFinish=False,
                 **kwargs):
        """
        Trigger the given schedulers when this step is executed.

        @param schedulerNames: A list of scheduler names that should be
                               triggered. Schedulers can be specified using
                               WithProperties, if desired.

        @param updateSourceStamp: If True (the default), I will try to give
                                  the schedulers an absolute SourceStamp for
                                  their builds, so that a HEAD build will use
                                  the same revision even if more changes have
                                  occurred since my build's update step was
                                  run. If False, I will use the original
                                  SourceStamp unmodified.

        @param waitForFinish: If False (the default), this step will finish
                              as soon as I've started the triggered
                              schedulers. If True, I will wait until all of
                              the triggered schedulers have finished their
                              builds.
        """
        assert schedulerNames, "You must specify a scheduler to trigger"
        self.schedulerNames = schedulerNames
        self.updateSourceStamp = updateSourceStamp
        self.waitForFinish = waitForFinish
        self.running = False
        LoggingBuildStep.__init__(self, **kwargs)
        self.addFactoryArguments(schedulerNames=schedulerNames,
                                 updateSourceStamp=updateSourceStamp,
                                 waitForFinish=waitForFinish)
Пример #4
0
 def __init__(self, githubuser, githubrepo, githubtoken, state, *args, **kwargs):
     self.githubuser = githubuser
     self.githubrepo = githubrepo
     self.githubtoken = githubtoken
     assert state in ["pending", "success", "error", "failure"]
     self.state = state
     LoggingBuildStep.__init__(self, *args, **kwargs)
Пример #5
0
 def __init__(self, base_url, *args, **kwargs):
     self.base_url = base_url
     LoggingBuildStep.__init__(self,
                               name="buildURL2prop",
                               haltOnFailure=True,
                               *args,
                               **kwargs)
Пример #6
0
 def __init__(self, schedulerNames=[], sourceStamp = None, sourceStamps = None,
              updateSourceStamp=None, alwaysUseLatest=False,
              waitForFinish=False, set_properties={}, 
              copy_properties=[], **kwargs):
     if not schedulerNames:
         config.error(
             "You must specify a scheduler to trigger")
     if (sourceStamp or sourceStamps) and (updateSourceStamp is not None):
         config.error(
             "You can't specify both sourceStamps and updateSourceStamp")
     if (sourceStamp or sourceStamps) and alwaysUseLatest:
         config.error(
             "You can't specify both sourceStamps and alwaysUseLatest")
     if alwaysUseLatest and (updateSourceStamp is not None):
         config.error(
             "You can't specify both alwaysUseLatest and updateSourceStamp"
         )
     self.schedulerNames = schedulerNames
     self.sourceStamps = sourceStamps or []
     if sourceStamp:
         self.sourceStamps.append(sourceStamp)
     if updateSourceStamp is not None:
         self.updateSourceStamp = updateSourceStamp
     else:
         self.updateSourceStamp = not (alwaysUseLatest or self.sourceStamps)
     self.alwaysUseLatest = alwaysUseLatest
     self.waitForFinish = waitForFinish
     self.set_properties = set_properties
     self.copy_properties = copy_properties
     self.running = False
     self.ended = False
     LoggingBuildStep.__init__(self, **kwargs)
Пример #7
0
 def __init__(self, githubuser, githubrepo, githubtoken, state, *args, **kwargs):
     self.githubuser = githubuser
     self.githubrepo = githubrepo
     self.githubtoken = githubtoken
     assert state in ["pending", "success", "error", "failure"]
     self.state = state
     LoggingBuildStep.__init__(self, *args, **kwargs)
Пример #8
0
    def __init__(self, schedulerNames=[], updateSourceStamp=True,
                 waitForFinish=False, **kwargs):
        """
        Trigger the given schedulers when this step is executed.

        @param schedulerNames: A list of scheduler names that should be
                               triggered. Schedulers can be specified using
                               WithProperties, if desired.

        @param updateSourceStamp: If True (the default), I will try to give
                                  the schedulers an absolute SourceStamp for
                                  their builds, so that a HEAD build will use
                                  the same revision even if more changes have
                                  occurred since my build's update step was
                                  run. If False, I will use the original
                                  SourceStamp unmodified.

        @param waitForFinish: If False (the default), this step will finish
                              as soon as I've started the triggered
                              schedulers. If True, I will wait until all of
                              the triggered schedulers have finished their
                              builds.
        """
        assert schedulerNames, "You must specify a scheduler to trigger"
        self.schedulerNames = schedulerNames
        self.updateSourceStamp = updateSourceStamp
        self.waitForFinish = waitForFinish
        self.running = False
        LoggingBuildStep.__init__(self, **kwargs)
        self.addFactoryArguments(schedulerNames=schedulerNames,
                                 updateSourceStamp=updateSourceStamp,
                                 waitForFinish=waitForFinish)
Пример #9
0
 def __init__(self, factory, argdict=None, **kwargs):
     self.description = "Check if BSP Exists"
     self.layerversion_intel = None
     self.buildername = None
     for k, v in argdict.iteritems():
         setattr(self, k, v)
     LoggingBuildStep.__init__(self, **kwargs)
Пример #10
0
 def __init__(self, schedulerNames=[], sourceStamp = None, sourceStamps = None,
              updateSourceStamp=None, alwaysUseLatest=False,
              waitForFinish=False, set_properties={}, 
              copy_properties=[], **kwargs):
     if not schedulerNames:
         config.error(
             "You must specify a scheduler to trigger")
     if (sourceStamp or sourceStamps) and (updateSourceStamp is not None):
         config.error(
             "You can't specify both sourceStamps and updateSourceStamp")
     if (sourceStamp or sourceStamps) and alwaysUseLatest:
         config.error(
             "You can't specify both sourceStamps and alwaysUseLatest")
     if alwaysUseLatest and (updateSourceStamp is not None):
         config.error(
             "You can't specify both alwaysUseLatest and updateSourceStamp"
         )
     self.schedulerNames = schedulerNames
     self.sourceStamps = sourceStamps or []
     if sourceStamp:
         self.sourceStamps.append(sourceStamp)
     if updateSourceStamp is not None:
         self.updateSourceStamp = updateSourceStamp
     else:
         self.updateSourceStamp = not (alwaysUseLatest or self.sourceStamps)
     self.alwaysUseLatest = alwaysUseLatest
     self.waitForFinish = waitForFinish
     properties = {}
     properties.update(set_properties)
     for i in copy_properties:
         properties[i] = Property(i)
     self.set_properties = properties
     self.running = False
     self.ended = False
     LoggingBuildStep.__init__(self, **kwargs)
Пример #11
0
    def __init__(self, master, workdir, inipath, l10nbase, redirects,
                 locale, tree,
                 **kwargs):
        """
        @type  master: string
        @param master: name of the master

        @type  workdir: string
        @param workdir: local directory (relative to the Builder's root)
                        where the mozilla and the l10n trees reside

        @type inipath: string
        @param inipath: path to the l10n.ini file, relative to the workdir

        @type l10nbase: string
        @param l10nbase: path to the localization dirs, relative to the workdir

        @type  locale: string
        @param locale: Language code of the localization to be compared.

        @type  tree: string
        @param tree: The tree identifier for this branch/product combo.
        """

        LoggingBuildStep.__init__(self, **kwargs)

        self.args = {'workdir': workdir,
                     'inipath': inipath,
                     'l10nbase': l10nbase,
                     'redirects': redirects,
                     'locale': locale,
                     'tree': tree}
        self.master = master
Пример #12
0
    def __init__(self, master, workdir, inipath, l10nbase, redirects, locale,
                 tree, **kwargs):
        """
        @type  master: string
        @param master: name of the master

        @type  workdir: string
        @param workdir: local directory (relative to the Builder's root)
                        where the mozilla and the l10n trees reside

        @type inipath: string
        @param inipath: path to the l10n.ini file, relative to the workdir

        @type l10nbase: string
        @param l10nbase: path to the localization dirs, relative to the workdir

        @type  locale: string
        @param locale: Language code of the localization to be compared.

        @type  tree: string
        @param tree: The tree identifier for this branch/product combo.
        """

        LoggingBuildStep.__init__(self, **kwargs)

        self.args = {
            'workdir': workdir,
            'inipath': inipath,
            'l10nbase': l10nbase,
            'redirects': redirects,
            'locale': locale,
            'tree': tree
        }
        self.master = master
Пример #13
0
 def __init__(self, schedulerNames=[], sourceStamp=None, updateSourceStamp=None, alwaysUseLatest=False,
              waitForFinish=False, set_properties={}, copy_properties=[], **kwargs):
     if not schedulerNames:
         raise ValueError("You must specify a scheduler to trigger")
     if sourceStamp and (updateSourceStamp is not None):
         raise ValueError("You can't specify both sourceStamp and updateSourceStamp")
     if sourceStamp and alwaysUseLatest:
         raise ValueError("You can't specify both sourceStamp and alwaysUseLatest")
     if alwaysUseLatest and (updateSourceStamp is not None):
         raise ValueError("You can't specify both alwaysUseLatest and updateSourceStamp")
     self.schedulerNames = schedulerNames
     self.sourceStamp = sourceStamp
     if updateSourceStamp is not None:
         self.updateSourceStamp = updateSourceStamp
     else:
         self.updateSourceStamp = not (alwaysUseLatest or sourceStamp)
     self.alwaysUseLatest = alwaysUseLatest
     self.waitForFinish = waitForFinish
     self.set_properties = set_properties
     self.copy_properties = copy_properties
     self.running = False
     self.ended = False
     LoggingBuildStep.__init__(self, **kwargs)
     self.addFactoryArguments(schedulerNames=schedulerNames,
                              sourceStamp=sourceStamp,
                              updateSourceStamp=updateSourceStamp,
                              alwaysUseLatest=alwaysUseLatest,
                              waitForFinish=waitForFinish,
                              set_properties=set_properties,
                              copy_properties=copy_properties)
Пример #14
0
    def __init__(self, dbname='test',workdir=None, addonsdir=None, demo=True, lang='en_US', port=8869, netport=8975,**kwargs):

        LoggingBuildStep.__init__(self, **kwargs)
        self.addFactoryArguments(dbname=dbname,workdir=workdir, demo=demo, lang=lang, netport=netport,port=port, addonsdir=addonsdir)
        self.args = {'dbname': dbname,'workdir':workdir, 'netport':netport,'port' : port, 'addonsdir' : addonsdir}
        # Compute defaults for descriptions:
        description = ["Starting server with upgradetion"]
        self.description = description
Пример #15
0
 def __init__(self, svnurl=None, baseURL=None, defaultBranch=None,
              directory=None, workdir=None, mode='update',alwaysUseLatest=True,timeout=20*60, retry=None,**kwargs):
     LoggingBuildStep.__init__(self, **kwargs)
     SVN.__init__(self, svnurl=svnurl, baseURL=baseURL, defaultBranch=defaultBranch,
              directory=directory, workdir=workdir, mode=mode, alwaysUseLatest=alwaysUseLatest, timeout=timeout, retry=retry,**kwargs)
     self.name = 'svn-update'
     self.description = ["updating", "branch %s%s"%(baseURL,defaultBranch)]
     self.descriptionDone = ["updated", "branch %s%s"%(baseURL,defaultBranch)]
Пример #16
0
 def __init__(self, dbname='test',workdir=None,port=8869,netport=8971,**kwargs):
     LoggingBuildStep.__init__(self, **kwargs)
     self.addFactoryArguments(dbname=dbname,workdir=workdir,port=port,netport=netport)
     self.args = {'dbname': dbname,'workdir':workdir,'netport':netport, 'port':port}
     self.dbname = dbname
     # Compute defaults for descriptions:
     description = ["Dropping db"]
     self.description = description
Пример #17
0
    def __init__(self, dbname='test',workdir=None, addonsdir=None, demo=True, lang='en_US',netport=8970, port=8869 ,**kwargs):

        LoggingBuildStep.__init__(self, **kwargs)
        self.addFactoryArguments(dbname=dbname,workdir=workdir, demo=demo, lang=lang, netport=netport,port=port, addonsdir=addonsdir)
        self.args = {'dbname': dbname,'workdir':workdir, 'demo':demo, 'lang':lang,'netport':netport, 'port' : port, 'addonsdir' : addonsdir}
        self.dbname = dbname
        # Compute defaults for descriptions:
        description = ["creating db"]
        self.description = description
Пример #18
0
 def __init__(self, dbname='test',workdir=None,addonsdir=None,netport=8972, port=8869 ,**kwargs):
     LoggingBuildStep.__init__(self, **kwargs)
     self.addFactoryArguments(dbname=dbname,workdir=workdir,addonsdir=addonsdir,netport=netport, port=port, logfiles={})
     self.args = {'dbname': dbname, 'modules':'', 'port' :port,'workdir':workdir,'netport':netport,'addonsdir':addonsdir,'logfiles':{}}
     self.dbname = dbname
     # Compute defaults for descriptions:
     description = ["checking quality"]
     self.description = description
     self.quality_stage = 'pass'
Пример #19
0
 def __init__(self,
              resumeBuild=True,
              resumeSlavepool=None,
              haltOnFailure=True,
              **kwargs):
     self.resumeBuild = resumeBuild if resumeBuild is not None else True
     self.resumeSlavepool = self.checkResumeSlavepoolParameter(
         resumeSlavepool)
     LoggingBuildStep.__init__(self, haltOnFailure=haltOnFailure, **kwargs)
Пример #20
0
 def __init__(self, timeout=5, **kwargs):
     """
     @type  timeout: int
     @param timeout: the number of seconds to delay
     """
     LoggingBuildStep.__init__(self, **kwargs)
     self.addFactoryArguments(timeout=timeout)
     self.timeout = timeout
     self.description = ["remote", "delay", "%s secs" % timeout]
Пример #21
0
 def __init__(self, timeout=5, **kwargs):
     """
     @type  timeout: int
     @param timeout: the number of seconds to delay
     """
     LoggingBuildStep.__init__(self, **kwargs)
     self.addFactoryArguments(timeout=timeout)
     self.timeout = timeout
     self.description = ["remote", "delay", "%s secs" % timeout]
Пример #22
0
    def __init__(self, workdir=WithProperties('%(repo_mode)s'), **kwargs):

        LoggingBuildStep.__init__(self, **kwargs)
        self.addFactoryArguments(workdir=workdir)
        self.args = {'workdir': workdir }
        # Compute defaults for descriptions:
        description = ["Performing bzr stats"]
        self.description = description
        self.build_result = SUCCESS
Пример #23
0
 def __init__(self, workdir=None, **kwargs):
     LoggingBuildStep.__init__(self, **kwargs)
     self.addFactoryArguments(workdir=workdir)
     self.args = {'workdir':workdir}
     self.workdir = workdir
     # Compute defaults for descriptions:
     description = ["Reverting Branch"]
     self.description = description
     self.summaries = {}
Пример #24
0
 def __init__(self, branch=None, workdir=None, **kwargs):
     LoggingBuildStep.__init__(self, **kwargs)
     self.addFactoryArguments(branch=branch, workdir=workdir)
     self.args = {'branch': branch,'workdir':workdir}
     # Compute defaults for descriptions:
     self.branch = branch
     description = ["Merging Branch"]
     self.description = description
     self.env_info = ''
     self.summaries = {}
Пример #25
0
    def __init__(self, schedulerNames=[], updateSourceStamp=True, alwaysUseLatest=False,
                 waitForFinish=False, set_properties={}, copy_properties=[], **kwargs):
        """
        Trigger the given schedulers when this step is executed.

        @param schedulerNames: A list of scheduler names that should be
                               triggered. Schedulers can be specified using
                               WithProperties, if desired.

        @param updateSourceStamp: If True (the default), I will try to give
                                  the schedulers an absolute SourceStamp for
                                  their builds, so that a HEAD build will use
                                  the same revision even if more changes have
                                  occurred since my build's update step was
                                  run. If False, I will use the original
                                  SourceStamp unmodified.

        @param alwaysUseLatest: If False (the default), I will give the
                                SourceStamp of the current build to the
                                schedulers (as controled by updateSourceStamp).
                                If True, I will give the schedulers  an empty
                                SourceStamp, corresponding to the latest
                                revision.

        @param waitForFinish: If False (the default), this step will finish
                              as soon as I've started the triggered
                              schedulers. If True, I will wait until all of
                              the triggered schedulers have finished their
                              builds.

        @param set_properties: A dictionary of properties to set for any
                               builds resulting from this trigger.  These
                               properties will override properties set in the
                               Triggered scheduler's constructor.

        @param copy_properties: a list of property names to copy verbatim
                                into any builds resulting from this trigger.

        """
        assert schedulerNames, "You must specify a scheduler to trigger"
        self.schedulerNames = schedulerNames
        self.updateSourceStamp = updateSourceStamp
        self.alwaysUseLatest = alwaysUseLatest
        self.waitForFinish = waitForFinish
        self.set_properties = set_properties
        self.copy_properties = copy_properties
        self.running = False
        self.ended = False
        LoggingBuildStep.__init__(self, **kwargs)
        self.addFactoryArguments(schedulerNames=schedulerNames,
                                 updateSourceStamp=updateSourceStamp,
                                 alwaysUseLatest=alwaysUseLatest,
                                 waitForFinish=waitForFinish,
                                 set_properties=set_properties,
                                 copy_properties=copy_properties)
Пример #26
0
    def __init__(self, scheduler, **kwargs):
        if not "name" in kwargs:
            kwargs['name'] = 'trigger'
        #if not "description" in kwargs:
        #    kwargs['description'] = kwargs['name']
        LoggingBuildStep.__init__(self, **kwargs)
        self.addFactoryArguments(scheduler=scheduler)

        self.scheduler = scheduler
        self.running = False
        self.ended = False
Пример #27
0
    def __init__(self, workdir=None, addonsdir=None, **kwargs):
        LoggingBuildStep.__init__(self, **kwargs)
        self.addFactoryArguments(workdir=workdir, addonsdir=addonsdir)
        self.args = {'workdir': workdir, 'addonsdir':addonsdir}

        # Compute defaults for descriptions:
        description = ["copy", '"'+workdir+'"', "in", '"'+ addonsdir +'"']
        descriptionDone = ["copy", '"'+workdir+'"' , "in", '"' + addonsdir +'"']

        self.description = description
        self.descriptionDone = descriptionDone
Пример #28
0
 def __init__(self, base_url, wrenchlane, prefix, suffix, *args, **kwargs):
     self.logger = None
     self.base_url = base_url
     self.wrenchlane = wrenchlane
     self.prefix = prefix
     self.suffix = suffix
     LoggingBuildStep.__init__(self,
                               name="BostonNasGetPackageUrlStep",
                               haltOnFailure=True,
                               *args,
                               **kwargs)
Пример #29
0
    def __init__(self, scheduler, **kwargs):
        if not "name" in kwargs:
            kwargs['name'] = 'trigger'
        #if not "description" in kwargs:
        #    kwargs['description'] = kwargs['name']
        LoggingBuildStep.__init__(self, **kwargs)
        self.addFactoryArguments(scheduler=scheduler)

        self.scheduler = scheduler
        self.running = False
        self.ended = False
Пример #30
0
 def __init__(self,workdir=None, addonsdir=None,dbname=False,port=8869, netport=8973, **kwargs):
     LoggingBuildStep.__init__(self, **kwargs)
     self.addFactoryArguments(workdir=workdir,addonsdir=addonsdir,dbname=dbname, port=port, netport=netport)
     self.args = {'addonsdir': addonsdir,
                  'workdir': workdir,
                  'dbname' : dbname,
                  'netport' : netport,
                  'port' : port,
     }
     self.name = 'install-translation'
     self.description = ["Installing Translation"]
     self.translation_lst = ''
Пример #31
0
    def __init__(
        self,
        master,
        workdir,
        basedir,
        inipath,
        l10nbase,
        locale,
        tree,
        gather_stats=False,
        initial_module=None,
        **kwargs
    ):
        """
        @type  master: string
        @param master: name of the master

        @type  workdir: string
        @param workdir: local directory (relative to the Builder's root)
                        where the mozilla and the l10n trees reside

        @type basedir: string
        @param basdir: path to all local repository clones, relative to the workdir

        @type inipath: string
        @param inipath: path to the l10n.ini file, relative to the workdir

        @type l10nbase: string
        @param l10nbase: path to the localization dirs, relative to the workdir

        @type  locale: string
        @param locale: Language code of the localization to be compared.

        @type  tree: string
        @param tree: The tree identifier for this branch/product combo.

        @type gather_stats: bool
        @param gather_stats: whether or not to gather stats about untranslated strings.
        """

        LoggingBuildStep.__init__(self, **kwargs)

        self.args = {
            "workdir": workdir,
            "basedir": basedir,
            "inipath": inipath,
            "l10nbase": l10nbase,
            "locale": locale,
            "tree": tree,
            "gather_stats": gather_stats,
            "initial_module": initial_module,
        }
        self.master = master
Пример #32
0
 def __init__(self, root, issue, patchset, email, password, workdir, timeout,
              server, **kwargs):
   LoggingBuildStep.__init__(self, **kwargs)
   self.args = {'root': root,
                'issue': issue,
                'patchset': patchset,
                'email': email,
                'password': password,
                'workdir': workdir,
                'timeout': timeout,
                'server': server,
                }
Пример #33
0
 def __init__(self, root, issue, patchset, email, password, workdir,
              timeout, server, **kwargs):
     LoggingBuildStep.__init__(self, **kwargs)
     self.args = {
         'root': root,
         'issue': issue,
         'patchset': patchset,
         'email': email,
         'password': password,
         'workdir': workdir,
         'timeout': timeout,
         'server': server,
     }
Пример #34
0
    def __init__(self, workdir=WithProperties('%(repo_mode)s'), 
                    repo_mode=WithProperties('%(repo_mode)s'), **kwargs):

        LoggingBuildStep.__init__(self, **kwargs)
        self.addFactoryArguments(workdir=workdir, repo_mode=repo_mode)
        self.args = {'workdir': workdir, 'repo_mode': repo_mode }
        # Compute defaults for descriptions:
        description = ["Performing lint check"]
        self.description = description
        self.known_res = []
        self.build_result = SUCCESS
        for kns in self.known_strs:
            self.known_res.append((re.compile(kns[0]), kns[1]))
Пример #35
0
    def __init__(self,
                 master,
                 workdir,
                 basedir,
                 inipath,
                 l10nbase,
                 locale,
                 tree,
                 gather_stats=False,
                 initial_module=None,
                 **kwargs):
        """
        @type  master: string
        @param master: name of the master

        @type  workdir: string
        @param workdir: local directory (relative to the Builder's root)
                        where the mozilla and the l10n trees reside

        @type basedir: string
        @param basdir: path to all local repository clones, relative to the workdir

        @type inipath: string
        @param inipath: path to the l10n.ini file, relative to the workdir

        @type l10nbase: string
        @param l10nbase: path to the localization dirs, relative to the workdir

        @type  locale: string
        @param locale: Language code of the localization to be compared.

        @type  tree: string
        @param tree: The tree identifier for this branch/product combo.

        @type gather_stats: bool
        @param gather_stats: whether or not to gather stats about untranslated strings.
        """

        LoggingBuildStep.__init__(self, **kwargs)

        self.args = {
            'workdir': workdir,
            'basedir': basedir,
            'inipath': inipath,
            'l10nbase': l10nbase,
            'locale': locale,
            'tree': tree,
            'gather_stats': gather_stats,
            'initial_module': initial_module
        }
        self.master = master
Пример #36
0
    def __init__(self,
                 schedulerNames=[],
                 updateSourceStamp=True,
                 waitForFinish=False,
                 set_properties={},
                 copy_properties=[],
                 **kwargs):
        """
        Trigger the given schedulers when this step is executed.

        @param schedulerNames: A list of scheduler names that should be
                               triggered. Schedulers can be specified using
                               WithProperties, if desired.

        @param updateSourceStamp: If True (the default), I will try to give
                                  the schedulers an absolute SourceStamp for
                                  their builds, so that a HEAD build will use
                                  the same revision even if more changes have
                                  occurred since my build's update step was
                                  run. If False, I will use the original
                                  SourceStamp unmodified.

        @param waitForFinish: If False (the default), this step will finish
                              as soon as I've started the triggered
                              schedulers. If True, I will wait until all of
                              the triggered schedulers have finished their
                              builds.

        @param set_properties: A dictionary of properties to set for any
                               builds resulting from this trigger.  These
                               properties will override properties set in the
                               Triggered scheduler's constructor.

        @param copy_properties: a list of property names to copy verbatim
                                into any builds resulting from this trigger.

        """
        assert schedulerNames, "You must specify a scheduler to trigger"
        self.schedulerNames = schedulerNames
        self.updateSourceStamp = updateSourceStamp
        self.waitForFinish = waitForFinish
        self.set_properties = set_properties
        self.copy_properties = copy_properties
        self.running = False
        self.ended = False
        LoggingBuildStep.__init__(self, **kwargs)
        self.addFactoryArguments(schedulerNames=schedulerNames,
                                 updateSourceStamp=updateSourceStamp,
                                 waitForFinish=waitForFinish,
                                 set_properties=set_properties,
                                 copy_properties=copy_properties)
Пример #37
0
    def __init__(self,workdir=None, addonsdir=None, modules='',extra_addons='', dbname=False,port=8869, netport=8974, **kwargs):
        LoggingBuildStep.__init__(self, **kwargs)
        self.addFactoryArguments(workdir=workdir,addonsdir=addonsdir,extra_addons=extra_addons,modules=modules, dbname=dbname, port=port, netport=netport)
        self.args = {'addonsdir': addonsdir,
                     'workdir': workdir,
                     'dbname' : dbname,
                     'modules' : modules,
                     'netport' : netport,
                     'port' : port,
                     'extra_addons':extra_addons,
        }
        self.name = 'install-module'
        self.description = ['Installing Module(s)']
	self.descriptionDone = ['Module Installed Sucessfully']
Пример #38
0
 def __init__(self, slave_name, *args, **kwargs):
     kwargs['haltOnFailure']=False
     if 'workdir' not in kwargs:
         kwargs['workdir'] = 'build'
     
     if 'env' not in kwargs:
         kwargs['env'] = {}    
     
     if 'description' in kwargs and 'descriptionDone' not in kwargs:
         kwargs['descriptionDone'] = kwargs['description']
     
     self.slave_name = slave_name
     self.arguments = kwargs.copy()
     LoggingBuildStep.__init__(self, *args, **kwargs)
Пример #39
0
    def __init__(self, description=None, descriptionDone=None,
                 descriptionSuffix=None, **kw):
        LoggingBuildStep.__init__(self, **kw)

        # GR: taken from master, apparently not handled by base class
        if description:
            self.description = description
        if isinstance(description, basestring):
            self.description = [self.description]
        if descriptionDone:
            self.descriptionDone = descriptionDone
        if isinstance(descriptionDone, basestring):
            self.descriptionDone = [self.descriptionDone]
        if descriptionSuffix:
            self.descriptionSuffix = descriptionSuffix
        if isinstance(descriptionSuffix, basestring):
            self.descriptionSuffix = [self.descriptionSuffix]
    def __init__(self, username, api_key, host=None, domains=None, ports=None, **buildstep_kwargs):
        LoggingBuildStep.__init__(self, **buildstep_kwargs)
        self.addFactoryArguments(username=username, api_key=api_key, host=host, domains=domains, ports=ports)

        # Load all the sauce_connect commands into a dict
        # We'll run this through properties.render() when they are needed
        self._sauce_args = a = {}
        a["u"] = username
        a["k"] = api_key
        if host:
            a["s"] = host
        if domains:
            a["d"] = domains
        if ports:
            a["p"] = ports

        self.full_workdir_path = ""
Пример #41
0
 def __init__(self, slave_name, *args, **kwargs):
     
     if 'workdir' not in kwargs:
         kwargs['workdir'] = 'build'
     
     if 'env' not in kwargs:
         kwargs['env'] = {}    
     
     if 'description' in kwargs and 'descriptionDone' not in kwargs:
         kwargs['descriptionDone'] = kwargs['description']
     
     self.slave_name = slave_name
     self.arguments = kwargs.copy()
     for k, v in kwargs.iteritems():
         if k in ["haltOnFailure", "warnOnFailure", "flunkOnFailure"]:
             setattr(self, k, v)
         
     LoggingBuildStep.__init__(self, *args, **kwargs)
Пример #42
0
 def __init__(self,
              schedulerNames=[],
              sourceStamp=None,
              updateSourceStamp=None,
              alwaysUseLatest=False,
              waitForFinish=False,
              set_properties={},
              copy_properties=[],
              **kwargs):
     if not schedulerNames:
         raise config.ConfigErrors(
             ["You must specify a scheduler to trigger"])
     if sourceStamp and (updateSourceStamp is not None):
         raise config.ConfigErrors(
             ["You can't specify both sourceStamp and updateSourceStamp"])
     if sourceStamp and alwaysUseLatest:
         raise config.ConfigErrors(
             ["You can't specify both sourceStamp and alwaysUseLatest"])
     if alwaysUseLatest and (updateSourceStamp is not None):
         raise config.ConfigErrors([
             "You can't specify both alwaysUseLatest and updateSourceStamp"
         ])
     self.schedulerNames = schedulerNames
     self.sourceStamp = sourceStamp
     if updateSourceStamp is not None:
         self.updateSourceStamp = updateSourceStamp
     else:
         self.updateSourceStamp = not (alwaysUseLatest or sourceStamp)
     self.alwaysUseLatest = alwaysUseLatest
     self.waitForFinish = waitForFinish
     self.set_properties = set_properties
     self.copy_properties = copy_properties
     self.running = False
     self.ended = False
     LoggingBuildStep.__init__(self, **kwargs)
     self.addFactoryArguments(schedulerNames=schedulerNames,
                              sourceStamp=sourceStamp,
                              updateSourceStamp=updateSourceStamp,
                              alwaysUseLatest=alwaysUseLatest,
                              waitForFinish=waitForFinish,
                              set_properties=set_properties,
                              copy_properties=copy_properties)
Пример #43
0
    def __init__(self,
                 workdir=None,
                 description=None,
                 descriptionDone=None,
                 command=None,
                 usePTY="slave-config",
                 **kwargs):
        # most of our arguments get passed through to the RemoteShellCommand
        # that we create, but first strip out the ones that we pass to
        # BuildStep (like haltOnFailure and friends), and a couple that we
        # consume ourselves.

        if description:
            self.description = description
        if isinstance(self.description, str):
            self.description = [self.description]
        if descriptionDone:
            self.descriptionDone = descriptionDone
        if isinstance(self.descriptionDone, str):
            self.descriptionDone = [self.descriptionDone]
        if command:
            self.setCommand(command)

        # pull out the ones that LoggingBuildStep wants, then upcall
        buildstep_kwargs = {}
        for k in kwargs.keys()[:]:
            if k in self.__class__.parms:
                buildstep_kwargs[k] = kwargs[k]
                del kwargs[k]
        LoggingBuildStep.__init__(self, **buildstep_kwargs)
        self.addFactoryArguments(workdir=workdir,
                                 description=description,
                                 descriptionDone=descriptionDone,
                                 command=command)

        # everything left over goes to the RemoteShellCommand
        kwargs['workdir'] = workdir  # including a copy of 'workdir'
        kwargs['usePTY'] = usePTY
        self.remote_kwargs = kwargs
        # we need to stash the RemoteShellCommand's args too
        self.addFactoryArguments(**kwargs)
Пример #44
0
    def __init__(self, workdir=None,
                 description=None, descriptionDone=None,
                 command=None,
                 usePTY="slave-config",
                 **kwargs):
        # most of our arguments get passed through to the RemoteShellCommand
        # that we create, but first strip out the ones that we pass to
        # BuildStep (like haltOnFailure and friends), and a couple that we
        # consume ourselves.

        if description:
            self.description = description
        if isinstance(self.description, str):
            self.description = [self.description]
        if descriptionDone:
            self.descriptionDone = descriptionDone
        if isinstance(self.descriptionDone, str):
            self.descriptionDone = [self.descriptionDone]
        if command:
            self.setCommand(command)

        # pull out the ones that LoggingBuildStep wants, then upcall
        buildstep_kwargs = {}
        for k in kwargs.keys()[:]:
            if k in self.__class__.parms:
                buildstep_kwargs[k] = kwargs[k]
                del kwargs[k]
        LoggingBuildStep.__init__(self, **buildstep_kwargs)
        self.addFactoryArguments(workdir=workdir,
                                 description=description,
                                 descriptionDone=descriptionDone,
                                 command=command)

        # everything left over goes to the RemoteShellCommand
        kwargs['workdir'] = workdir # including a copy of 'workdir'
        kwargs['usePTY'] = usePTY
        self.remote_kwargs = kwargs
        # we need to stash the RemoteShellCommand's args too
        self.addFactoryArguments(**kwargs)
Пример #45
0
 def __init__(self,
              artifactServer,
              artifactServerDir,
              artifactBuilderName,
              workdir='',
              artifactServerPort=None,
              artifactDestination=None,
              artifactDirectory=None,
              artifact=None,
              usePowerShell=True,
              **kwargs):
     self.workdir = workdir
     self.artifact = artifact
     self.artifactBuilderName = artifactBuilderName
     self.artifactDirectory = artifactDirectory
     self.artifactServer = artifactServer
     self.artifactServerDir = artifactServerDir
     self.artifactServerPort = artifactServerPort
     self.artifactDestination = artifactDestination
     self.master = None
     self.usePowerShell = usePowerShell
     LoggingBuildStep.__init__(self, **kwargs)
Пример #46
0
 def __init__(self, workdir=None, dbname=False, addonsdir=None, 
                 netport=None, port=None, ftp_port=None,
                 force_modules=None,
                 black_modules=None,
                 test_mode='full',
                 do_warnings=None, lang=None, debug=False,
                 repo_mode=WithProperties('%(repo_mode)s'),
                 **kwargs):
     LoggingBuildStep.__init__(self, **kwargs)
     if isinstance(black_modules, basestring):
         black_modules = black_modules.split(' ')
     if isinstance(force_modules, basestring):
         force_modules = force_modules.split(' ')
     self.addFactoryArguments(workdir=workdir, dbname=dbname, addonsdir=addonsdir, 
                             netport=netport, port=port, ftp_port=ftp_port, logfiles={},
                             force_modules=(force_modules or []),
                             black_modules=(black_modules or []),
                             do_warnings=do_warnings, lang=lang,
                             repo_mode=repo_mode,
                             debug=debug,
                             test_mode=test_mode)
     self.args = {'port' :port, 'workdir':workdir, 'dbname': dbname, 
                 'netport':netport, 'addonsdir':addonsdir, 'logfiles':{},
                 'ftp_port': ftp_port,
                 'force_modules': (force_modules or []),
                 'black_modules': (black_modules or []),
                 'do_warnings': do_warnings, 'lang': lang,
                 'test_mode': test_mode,
                 'repo_mode': repo_mode, 'debug': debug }
     description = ["Performing OpenERP Test..."]
     self.description = description
     self.summaries = {}
     self.build_result = SUCCESS
     
     self.addLogObserver('stdio', BqiObserver())
     self.progressMetrics += ('tests',)
Пример #47
0
    def __init__(self, workdir=None, mode='update', alwaysUseLatest=False,
                 timeout=20*60, retry=None, env=None, logEnviron=True,
                 description=None, descriptionDone=None, descriptionSuffix=None,
                 codebase='', **kwargs):
        """
        @type  workdir: string
        @param workdir: local directory (relative to the Builder's root)
                        where the tree should be placed

        @type  alwaysUseLatest: boolean
        @param alwaysUseLatest: whether to always update to the most
        recent available sources for this build.

        Normally the Source step asks its Build for a list of all
        Changes that are supposed to go into the build, then computes a
        'source stamp' (revision number or timestamp) that will cause
        exactly that set of changes to be present in the checked out
        tree. This is turned into, e.g., 'cvs update -D timestamp', or
        'svn update -r revnum'. If alwaysUseLatest=True, bypass this
        computation and always update to the latest available sources
        for each build.

        The source stamp helps avoid a race condition in which someone
        commits a change after the master has decided to start a build
        but before the slave finishes checking out the sources. At best
        this results in a build which contains more changes than the
        buildmaster thinks it has (possibly resulting in the wrong
        person taking the blame for any problems that result), at worst
        is can result in an incoherent set of sources (splitting a
        non-atomic commit) which may not build at all.

        @type logEnviron: boolean
        @param logEnviron: If this option is true (the default), then the
                           step's logfile will describe the environment
                           variables on the slave. In situations where the
                           environment is not relevant and is long, it may
                           be easier to set logEnviron=False.

        @type codebase: string
        @param codebase: Specifies which changes in a build are processed by
        the step. The default codebase value is ''. The codebase must correspond
        to a codebase assigned by the codebaseGenerator. If no codebaseGenerator
        is defined in the master then codebase doesn't need to be set, the
        default value will then match all changes.
        """

        LoggingBuildStep.__init__(self, **kwargs)

        # This will get added to args later, after properties are rendered
        self.workdir = workdir

        self.sourcestamp = None

        self.codebase = codebase
        if self.codebase:
            self.name = ' '.join((self.name, self.codebase))

        self.alwaysUseLatest = alwaysUseLatest

        self.logEnviron = logEnviron
        self.env = env
        self.timeout = timeout

        descriptions_for_mode = {
            "clobber": "checkout",
            "export": "exporting"}
        descriptionDones_for_mode = {
            "clobber": "checkout",
            "export": "export"}
        if description:
            self.description = description
        else:
            self.description = [
                descriptions_for_mode.get(mode, "updating")]
        if isinstance(self.description, str):
            self.description = [self.description]

        if descriptionDone:
            self.descriptionDone = descriptionDone
        else:
            self.descriptionDone = [
                descriptionDones_for_mode.get(mode, "update")]
        if isinstance(self.descriptionDone, str):
            self.descriptionDone = [self.descriptionDone]

        if descriptionSuffix:
            self.descriptionSuffix = descriptionSuffix
        else:
            self.descriptionSuffix = self.codebase or None # want None in lieu of ''
        if isinstance(self.descriptionSuffix, str):
            self.descriptionSuffix = [self.descriptionSuffix]
Пример #48
0
 def __init__(self, *args, **kwargs):
     LoggingBuildStep.__init__(self, name='check-retry', *args, **kwargs)
Пример #49
0
    def __init__(self, schedulerNames=[], sourceStamp=None, updateSourceStamp=None, alwaysUseLatest=False,
                 waitForFinish=False, set_properties={}, copy_properties=[], **kwargs):
        """
        Trigger the given schedulers when this step is executed.

        @param schedulerNames: A list of scheduler names that should be
                               triggered. Schedulers can be specified using
                               WithProperties, if desired.

        @param sourceStamp: A dict containing the source stamp to use for the
                            build. Keys must include branch, revision, repository and
                            project. In addition, patch_body, patch_level, and
                            patch_subdir can be specified. Only one of
                            sourceStamp, updateSourceStamp and alwaysUseLatest
                            can be specified. Any of these can be specified using
                            WithProperties, if desired.

        @param updateSourceStamp: If True (the default), I will try to give
                                  the schedulers an absolute SourceStamp for
                                  their builds, so that a HEAD build will use
                                  the same revision even if more changes have
                                  occurred since my build's update step was
                                  run. If False, I will use the original
                                  SourceStamp unmodified.

        @param alwaysUseLatest: If False (the default), I will give the
                                SourceStamp of the current build to the
                                schedulers (as controled by updateSourceStamp).
                                If True, I will give the schedulers  an empty
                                SourceStamp, corresponding to the latest
                                revision.

        @param waitForFinish: If False (the default), this step will finish
                              as soon as I've started the triggered
                              schedulers. If True, I will wait until all of
                              the triggered schedulers have finished their
                              builds.

        @param set_properties: A dictionary of properties to set for any
                               builds resulting from this trigger.  These
                               properties will override properties set in the
                               Triggered scheduler's constructor.

        @param copy_properties: a list of property names to copy verbatim
                                into any builds resulting from this trigger.

        """
        assert schedulerNames, "You must specify a scheduler to trigger"
        if sourceStamp and updateSourceStamp:
            raise ValueError("You can't specify both sourceStamp and updateSourceStamp")
        if sourceStamp and alwaysUseLatest:
            raise ValueError("You can't specify both sourceStamp and alwaysUseLatest")
        if alwaysUseLatest and updateSourceStamp:
            raise ValueError("You can't specify both alwaysUseLatest and updateSourceStamp")
        self.schedulerNames = schedulerNames
        self.sourceStamp = sourceStamp
        self.updateSourceStamp = updateSourceStamp or not (alwaysUseLatest or sourceStamp)
        self.alwaysUseLatest = alwaysUseLatest
        self.waitForFinish = waitForFinish
        self.set_properties = set_properties
        self.copy_properties = copy_properties
        self.running = False
        self.ended = False
        LoggingBuildStep.__init__(self, **kwargs)
        self.addFactoryArguments(schedulerNames=schedulerNames,
                                 sourceStamp=sourceStamp,
                                 updateSourceStamp=updateSourceStamp,
                                 alwaysUseLatest=alwaysUseLatest,
                                 waitForFinish=waitForFinish,
                                 set_properties=set_properties,
                                 copy_properties=copy_properties)
Пример #50
0
 def __init__(self, properties, *args, **kwargs):
     self.properties = properties
     LoggingBuildStep.__init__(self, name='putproperties', *args, **kwargs)
Пример #51
0
 def __init__(self, hideStepIf=True, locks=None, **kwargs):
     LoggingBuildStep.__init__(self,
                               hideStepIf=hideStepIf,
                               locks=locks,
                               **kwargs)
Пример #52
0
 def __init__(self, hideStepIf=True, **kwargs):
     self.releaseLockInstance = None
     LoggingBuildStep.__init__(self, hideStepIf=hideStepIf, **kwargs)
Пример #53
0
 def __init__(self, handle, **kwargs):
     LoggingBuildStep.__init__(self, **kwargs)
     self.addFactoryArguments(handle=handle)
     self.handle = handle
Пример #54
0
    def __init__(self,
                 workdir=None,
                 mode='update',
                 alwaysUseLatest=False,
                 timeout=20 * 60,
                 retry=None,
                 env=None,
                 logEnviron=True,
                 description=None,
                 descriptionDone=None,
                 **kwargs):
        """
        @type  workdir: string
        @param workdir: local directory (relative to the Builder's root)
                        where the tree should be placed

        @type  mode: string
        @param mode: the kind of VC operation that is desired:
           - 'update': specifies that the checkout/update should be
             performed directly into the workdir. Each build is performed
             in the same directory, allowing for incremental builds. This
             minimizes disk space, bandwidth, and CPU time. However, it
             may encounter problems if the build process does not handle
             dependencies properly (if you must sometimes do a 'clean
             build' to make sure everything gets compiled), or if source
             files are deleted but generated files can influence test
             behavior (e.g. python's .pyc files), or when source
             directories are deleted but generated files prevent CVS from
             removing them. When used with a patched checkout, from a
             previous buildbot try for instance, it will try to "revert"
             the changes first and will do a clobber if it is unable to
             get a clean checkout. The behavior is SCM-dependent.

           - 'copy': specifies that the source-controlled workspace
             should be maintained in a separate directory (called the
             'copydir'), using checkout or update as necessary. For each
             build, a new workdir is created with a copy of the source
             tree (rm -rf workdir; cp -R -P -p copydir workdir). This
             doubles the disk space required, but keeps the bandwidth low
             (update instead of a full checkout). A full 'clean' build
             is performed each time.  This avoids any generated-file
             build problems, but is still occasionally vulnerable to
             problems such as a CVS repository being manually rearranged
             (causing CVS errors on update) which are not an issue with
             a full checkout.

           - 'clobber': specifies that the working directory should be
             deleted each time, necessitating a full checkout for each
             build. This insures a clean build off a complete checkout,
             avoiding any of the problems described above, but is
             bandwidth intensive, as the whole source tree must be
             pulled down for each build.

           - 'export': is like 'clobber', except that e.g. the 'cvs
             export' command is used to create the working directory.
             This command removes all VC metadata files (the
             CVS/.svn/{arch} directories) from the tree, which is
             sometimes useful for creating source tarballs (to avoid
             including the metadata in the tar file). Not all VC systems
             support export.

        @type  alwaysUseLatest: boolean
        @param alwaysUseLatest: whether to always update to the most
        recent available sources for this build.

        Normally the Source step asks its Build for a list of all
        Changes that are supposed to go into the build, then computes a
        'source stamp' (revision number or timestamp) that will cause
        exactly that set of changes to be present in the checked out
        tree. This is turned into, e.g., 'cvs update -D timestamp', or
        'svn update -r revnum'. If alwaysUseLatest=True, bypass this
        computation and always update to the latest available sources
        for each build.

        The source stamp helps avoid a race condition in which someone
        commits a change after the master has decided to start a build
        but before the slave finishes checking out the sources. At best
        this results in a build which contains more changes than the
        buildmaster thinks it has (possibly resulting in the wrong
        person taking the blame for any problems that result), at worst
        is can result in an incoherent set of sources (splitting a
        non-atomic commit) which may not build at all.

        @type  retry: tuple of ints (delay, repeats) (or None)
        @param retry: if provided, VC update failures are re-attempted up
                      to REPEATS times, with DELAY seconds between each
                      attempt. Some users have slaves with poor connectivity
                      to their VC repository, and they say that up to 80% of
                      their build failures are due to transient network
                      failures that could be handled by simply retrying a
                      couple times.

        @type logEnviron: boolean
        @param logEnviron: If this option is true (the default), then the
                           step's logfile will describe the environment
                           variables on the slave. In situations where the
                           environment is not relevant and is long, it may
                           be easier to set logEnviron=False.
        """

        LoggingBuildStep.__init__(self, **kwargs)
        self.addFactoryArguments(workdir=workdir,
                                 mode=mode,
                                 alwaysUseLatest=alwaysUseLatest,
                                 timeout=timeout,
                                 retry=retry,
                                 logEnviron=logEnviron,
                                 env=env,
                                 description=description,
                                 descriptionDone=descriptionDone)

        assert mode in ("update", "copy", "clobber", "export")
        if retry:
            delay, repeats = retry
            assert isinstance(repeats, int)
            assert repeats > 0
        self.args = {
            'mode': mode,
            'timeout': timeout,
            'retry': retry,
            'patch': None,  # set during .start
        }
        # This will get added to args later, after properties are rendered
        self.workdir = workdir

        self.sourcestamp = None
        # Codebase cannot be set yet
        self.codebase = ''

        self.alwaysUseLatest = alwaysUseLatest

        self.logEnviron = logEnviron
        self.env = env

        descriptions_for_mode = {"clobber": "checkout", "export": "exporting"}
        descriptionDones_for_mode = {"clobber": "checkout", "export": "export"}
        if description:
            self.description = description
        else:
            self.description = [descriptions_for_mode.get(mode, "updating")]
        if isinstance(self.description, str):
            self.description = [self.description]

        if descriptionDone:
            self.descriptionDone = descriptionDone
        else:
            self.descriptionDone = [
                descriptionDones_for_mode.get(mode, "update")
            ]
        if isinstance(self.descriptionDone, str):
            self.descriptionDone = [self.descriptionDone]