示例#1
0
 def __init__(self, slavedir, baseFilename, scpString, slavesrc=None,
              slavesrcdir=None, targetSubDir=None, **kwargs):
     """
     @type  slavedir:   string
     @param slavedir:   The directory that contains the file that will be
                        transferred (on the BuildSlave)
     @type  baseFilename: string
     @param baseFilename: The filename (without the identifier) of the file
                          that will be transferred
     @type  scpString:  string
     @param scpString:  The scp user@host:/dir string to upload the file to.
                        For example,
                          [email protected]:/var/www.
                        This user should have passwordless access to the
                        host.
     """
     ShellCommand.__init__(self, **kwargs)
     self.addFactoryArguments(slavedir=slavedir, baseFilename=baseFilename,
                              scpString=scpString)
     self.slavedir = slavedir
     self.baseFilename = baseFilename
     self.scpString = scpString
     self.super_class = ShellCommand
     self.slavesrc = slavesrc
     self.slavesrcdir = slavesrcdir
     self.targetSubDir = targetSubDir
示例#2
0
 def __init__(self,
              slavedir,
              baseFilename,
              scpString,
              slavesrc=None,
              slavesrcdir=None,
              targetSubDir=None,
              **kwargs):
     """
     @type  slavedir:   string
     @param slavedir:   The directory that contains the file that will be
                        transferred (on the BuildSlave)
     @type  baseFilename: string
     @param baseFilename: The filename (without the identifier) of the file
                          that will be transferred
     @type  scpString:  string
     @param scpString:  The scp user@host:/dir string to upload the file to.
                        For example,
                          [email protected]:/var/www.
                        This user should have passwordless access to the
                        host.
     """
     ShellCommand.__init__(self, **kwargs)
     self.addFactoryArguments(slavedir=slavedir,
                              baseFilename=baseFilename,
                              scpString=scpString)
     self.slavedir = slavedir
     self.baseFilename = baseFilename
     self.scpString = scpString
     self.super_class = ShellCommand
     self.slavesrc = slavesrc
     self.slavesrcdir = slavesrcdir
     self.targetSubDir = targetSubDir
示例#3
0
 def __init__(self, cvsroot, workdir=".", **kwargs):
     ShellCommand.__init__(self, workdir=workdir, **kwargs)
     self.addFactoryArguments(cvsroot=cvsroot)
     self.cvsroot = cvsroot
     self.workdir = workdir
     # command may be overridden in start()
     self.command = ["cvs", "-d", cvsroot, "co", "mozilla/client.mk"]
     self.super_class = ShellCommand
示例#4
0
 def __init__(self, cvsroot, workdir=".", **kwargs):
     ShellCommand.__init__(self, workdir=workdir, **kwargs)
     self.addFactoryArguments(cvsroot=cvsroot)
     self.cvsroot = cvsroot
     self.workdir = workdir
     # command may be overridden in start()
     self.command = ["cvs", "-d", cvsroot, "co", "mozilla/client.mk"]
     self.super_class = ShellCommand
示例#5
0
 def __init__(self, isOptional=False, workdir="build", **kwargs):
     """
     'workdir' is assumed to be 'build' and should be passed if it is
     anything else.
     'isOptional' is assumed to be False; if the patch is optional, pass True.
     """
     ShellCommand.__init__(self, workdir=workdir, **kwargs)
     self.addFactoryArguments(isOptional=isOptional, workdir=workdir)
     self.optional = isOptional
     self.super_class = ShellCommand
示例#6
0
 def __init__(self, isOptional=False, workdir="build", **kwargs):
     """
     'workdir' is assumed to be 'build' and should be passed if it is
     anything else.
     'isOptional' is assumed to be False; if the patch is optional, pass True.
     """
     ShellCommand.__init__(self, workdir=workdir, **kwargs)
     self.addFactoryArguments(isOptional=isOptional, workdir=workdir)
     self.optional = isOptional
     self.super_class = ShellCommand
示例#7
0
 def __init__(self, **kwargs):
     self.my_shellcommand = ShellCommand
     ShellCommand.__init__(self, **kwargs)
示例#8
0
 def __init__(self, **kwargs):
     self.my_shellcommand = ShellCommand
     ShellCommand.__init__(self, **kwargs)
示例#9
0
 def __init__(self, scpString, targetSubDir=None, **kwargs):
     ShellCommand.__init__(self, **kwargs)
     self.addFactoryArguments(scpString=scpString)
     (self.sshHost, self.sshDir) = scpString.split(":")
     self.super_class = ShellCommand
     self.targetSubDir = targetSubDir
示例#10
0
 def __init__(self, timeout=2 * 3600, maxTime=4 * 3600, **kwargs):
     self.my_shellcommand = ShellCommand
     ShellCommand.__init__(self, timeout=timeout, maxTime=maxTime, **kwargs)
 def __init__(self, timeout=2 * 3600, maxTime=4 * 3600, **kwargs):
     self.my_shellcommand = ShellCommand
     ShellCommand.__init__(self, timeout=timeout, maxTime=maxTime, **kwargs)
示例#12
0
 def __init__(self, scpString, targetSubDir=None, **kwargs):
     ShellCommand.__init__(self, **kwargs)
     self.addFactoryArguments(scpString=scpString)
     (self.sshHost, self.sshDir) = scpString.split(":")
     self.super_class = ShellCommand
     self.targetSubDir = targetSubDir
示例#13
0
    def __init__(self, objdir, username, milestone, platform, remoteHost,
                 remoteBasePath, group=None, chmodMode=755, sshKey=None,
                 releaseToDated=True, releaseToLatest=True,
                 releaseToTinderboxBuilds=True, tinderboxBuildsDir=None,
                 releaseToCandidates=False, remoteCandidatesPath=None,
                 dependToDated=True, uploadCompleteMar=True,
                 uploadLangPacks=False, packageGlob=None, **kwargs):
        """
        @type  objdir: string
        @param objdir: The obj directory used for the build. This is needed to
                       find the packages in the source tree.

        @type  username: string
        @param username: The username used to login with on the remote host.
                         The buildslaves should have passwordless logins to
                         this account.

        @type  milestone: string
        @param milestone: The milestone of the build (eg, trunk)

        @type  platform: string
        @param platform: The platform we are uploading for. One of 'win32',
                         'linux', 'linux64', 'macosx' or 'macosx64'.

        @type  remoteHost: string
        @param remoteHost: The server to upload the builds to.

        @type  remoteBasePath: string
        @param remoteBasePath: The directory on the server used as a base path
                               for these builds. eg:
                               /home/ftp/pub/firefox

        @type  group: string
        @param group: If group is set, any files uploaded will be chgrp'ed to
                      it. Default: None

        @type  chmodMode: int
        @param chmodMode: The mode used when fixing permissions on remoteHost.
                          Default: 755

        @type  sshKey: string
        @param sshKey: If defined, the filename of the ssh key to use. It
                       should be relative to ${HOME}/.ssh/. Default: None

        @type  releaseToDated: bool
        @param releaseToDated: If True, builds will be pushed to
                'remoteBasePath'/nightly/yyyy/mm/yyyy-mm-dd-hh-milestone. This
                directory will also be symlinked in 'remoteBasePath'/nightly/. 
                Generally, this should be True for nightlies. Default: True

        @type  releaseToLatest: bool
        @param releaseToLatest: If True, builds will be pushed to
                'remoteBasePath'/nightly/latest-milestone. If
                releaseToDated=True, builds will be copied from
                'remoteBasePath'/nightly/yyyy/mm/yyyy-mm-dd-hh-milestone.
                Otherwise, builds will be uploaded from the slave. Generally,
                this should be True for nightlies. Default: True

        @type  releaseToTinderboxBuilds: bool
        @param releaseToTinderboxBuilds: If True, builds will be pushed to
                'remoteBasePath'/tinderbox-builds/$hostname. This should
                generally be set to True for all builds. Default: True

        @type  tinderboxBuildsDir: string
        @param tinderboxBuildsDir: This option only has effect when
                                   releaseToTinderboxBuilds is True. If this
                                   option is None (default), builds will be
                                   uploaded to:
                                   tinderbox-builds/builderName
                                   If otherwise set builds will be uploaded to
                                   tinderbox-builds/tinderboxBuildsDir.

        @type  releaseToCandidates: bool
        @param releaseToCandidates: If True, builds will be pushed to
                remoteCandidatesDir.  This should only be set for releases.

        @type  remoteCandidatesDir: string
        @param remoteCandidatesDir: This option only has effect, and is
                                    required, when releaseToCandidates is
                                    True.

        @type  dependToDated: This option only has effect when
                              releaseToTinderboxBuilds is True. When
                              dependToDated is True builds will be placed in
                              a subdirectory named for the build start time
                              (in unix time) when being pushed to the
                              tinderbox-builds dir. For example:
                              tinderbox-builds/builder/1203094573. The option
                              defaults to True.

        @type  uploadCompleteMar: bool
        @param uploadCompleteMar: When True, the MozillaStageUpload will upload
                                  the complete mar file found in dist/update to
                                  the datedDir/latestDir. This option only
                                  applies when releaseToDated or
                                  releaseToLatest is True. Default: True

        @type  uploadLangPacks: bool
        @param uploadLangPacks: When True, the MozillaStageUpload will upload
                                language pack XPIs to the datedDir/latestDir.
                                This option only applies when releaseToDated or
                                releaseToLatest is True. Default: False

        @type  packageGlob: string
        @param packageGlob: The shell wildcard pattern that expresses the build
                            files we will be uploading. Default: each platform gets
                            a sensible default in objdir/dist/*.{ext} with ext tailored
                            for that platform (i.e. .zip, .dmg, .tar.gz)

        """

        ShellCommand.__init__(self, **kwargs)
        self.addFactoryArguments(objdir=objdir,
                                 username=username,
                                 milestone=milestone,
                                 platform=platform,
                                 remoteHost=remoteHost,
                                 remoteBasePath=remoteBasePath,
                                 packageGlob=packageGlob,
                                 group=group,
                                 chmodMode=chmodMode,
                                 sshKey=sshKey,
                                 releaseToDated=releaseToDated,
                                 releaseToLatest=releaseToLatest,
                                 releaseToTinderboxBuilds=releaseToTinderboxBuilds,
                                 tinderboxBuildsDir=tinderboxBuildsDir,
                                 releaseToCandidates=releaseToCandidates,
                                 remoteCandidatesPath=remoteCandidatesPath,
                                 dependToDated=dependToDated,
                                 uploadCompleteMar=uploadCompleteMar,
                                 uploadLangPacks=uploadLangPacks)

        assert platform in getSupportedPlatforms()
        if releaseToCandidates:
            assert remoteCandidatesPath
        self.objdir = objdir
        self.username = username
        self.milestone = milestone
        self.platform = platform
        self.remoteHost = remoteHost
        self.remoteBasePath = remoteBasePath
        self.packageGlob = packageGlob
        self.group = group
        self.chmodMode = chmodMode
        self.sshKey = sshKey
        self.releaseToDated = releaseToDated
        self.releaseToLatest = releaseToLatest
        self.releaseToCandidates = releaseToCandidates
        self.remoteCandidatesPath = remoteCandidatesPath
        self.releaseToTinderboxBuilds = releaseToTinderboxBuilds
        self.tinderboxBuildsDir = tinderboxBuildsDir
        self.dependToDated = dependToDated
        self.uploadCompleteMar = uploadCompleteMar
        self.uploadLangPacks = uploadLangPacks

        self.description = ["uploading package(s) to", remoteHost]
        self.descriptionDone = ["upload package(s) to", remoteHost]
示例#14
0
    def __init__(self,
                 objdir,
                 username,
                 milestone,
                 platform,
                 remoteHost,
                 remoteBasePath,
                 group=None,
                 chmodMode=755,
                 sshKey=None,
                 releaseToDated=True,
                 releaseToLatest=True,
                 releaseToTinderboxBuilds=True,
                 tinderboxBuildsDir=None,
                 releaseToCandidates=False,
                 remoteCandidatesPath=None,
                 dependToDated=True,
                 uploadCompleteMar=True,
                 uploadLangPacks=False,
                 packageGlob=None,
                 **kwargs):
        """
        @type  objdir: string
        @param objdir: The obj directory used for the build. This is needed to
                       find the packages in the source tree.

        @type  username: string
        @param username: The username used to login with on the remote host.
                         The buildslaves should have passwordless logins to
                         this account.

        @type  milestone: string
        @param milestone: The milestone of the build (eg, trunk)

        @type  platform: string
        @param platform: The platform we are uploading for. One of 'win32',
                         'linux', 'linux64', 'macosx' or 'macosx64'.

        @type  remoteHost: string
        @param remoteHost: The server to upload the builds to.

        @type  remoteBasePath: string
        @param remoteBasePath: The directory on the server used as a base path
                               for these builds. eg:
                               /home/ftp/pub/firefox

        @type  group: string
        @param group: If group is set, any files uploaded will be chgrp'ed to
                      it. Default: None

        @type  chmodMode: int
        @param chmodMode: The mode used when fixing permissions on remoteHost.
                          Default: 755

        @type  sshKey: string
        @param sshKey: If defined, the filename of the ssh key to use. It
                       should be relative to ${HOME}/.ssh/. Default: None

        @type  releaseToDated: bool
        @param releaseToDated: If True, builds will be pushed to
                'remoteBasePath'/nightly/yyyy/mm/yyyy-mm-dd-hh-milestone. This
                directory will also be symlinked in 'remoteBasePath'/nightly/. 
                Generally, this should be True for nightlies. Default: True

        @type  releaseToLatest: bool
        @param releaseToLatest: If True, builds will be pushed to
                'remoteBasePath'/nightly/latest-milestone. If
                releaseToDated=True, builds will be copied from
                'remoteBasePath'/nightly/yyyy/mm/yyyy-mm-dd-hh-milestone.
                Otherwise, builds will be uploaded from the slave. Generally,
                this should be True for nightlies. Default: True

        @type  releaseToTinderboxBuilds: bool
        @param releaseToTinderboxBuilds: If True, builds will be pushed to
                'remoteBasePath'/tinderbox-builds/$hostname. This should
                generally be set to True for all builds. Default: True

        @type  tinderboxBuildsDir: string
        @param tinderboxBuildsDir: This option only has effect when
                                   releaseToTinderboxBuilds is True. If this
                                   option is None (default), builds will be
                                   uploaded to:
                                   tinderbox-builds/builderName
                                   If otherwise set builds will be uploaded to
                                   tinderbox-builds/tinderboxBuildsDir.

        @type  releaseToCandidates: bool
        @param releaseToCandidates: If True, builds will be pushed to
                remoteCandidatesDir.  This should only be set for releases.

        @type  remoteCandidatesDir: string
        @param remoteCandidatesDir: This option only has effect, and is
                                    required, when releaseToCandidates is
                                    True.

        @type  dependToDated: This option only has effect when
                              releaseToTinderboxBuilds is True. When
                              dependToDated is True builds will be placed in
                              a subdirectory named for the build start time
                              (in unix time) when being pushed to the
                              tinderbox-builds dir. For example:
                              tinderbox-builds/builder/1203094573. The option
                              defaults to True.

        @type  uploadCompleteMar: bool
        @param uploadCompleteMar: When True, the MozillaStageUpload will upload
                                  the complete mar file found in dist/update to
                                  the datedDir/latestDir. This option only
                                  applies when releaseToDated or
                                  releaseToLatest is True. Default: True

        @type  uploadLangPacks: bool
        @param uploadLangPacks: When True, the MozillaStageUpload will upload
                                language pack XPIs to the datedDir/latestDir.
                                This option only applies when releaseToDated or
                                releaseToLatest is True. Default: False

        @type  packageGlob: string
        @param packageGlob: The shell wildcard pattern that expresses the build
                            files we will be uploading. Default: each platform gets
                            a sensible default in objdir/dist/*.{ext} with ext tailored
                            for that platform (i.e. .zip, .dmg, .tar.gz)

        """

        ShellCommand.__init__(self, **kwargs)
        self.addFactoryArguments(
            objdir=objdir,
            username=username,
            milestone=milestone,
            platform=platform,
            remoteHost=remoteHost,
            remoteBasePath=remoteBasePath,
            packageGlob=packageGlob,
            group=group,
            chmodMode=chmodMode,
            sshKey=sshKey,
            releaseToDated=releaseToDated,
            releaseToLatest=releaseToLatest,
            releaseToTinderboxBuilds=releaseToTinderboxBuilds,
            tinderboxBuildsDir=tinderboxBuildsDir,
            releaseToCandidates=releaseToCandidates,
            remoteCandidatesPath=remoteCandidatesPath,
            dependToDated=dependToDated,
            uploadCompleteMar=uploadCompleteMar,
            uploadLangPacks=uploadLangPacks)

        assert platform in getSupportedPlatforms()
        if releaseToCandidates:
            assert remoteCandidatesPath
        self.objdir = objdir
        self.username = username
        self.milestone = milestone
        self.platform = platform
        self.remoteHost = remoteHost
        self.remoteBasePath = remoteBasePath
        self.packageGlob = packageGlob
        self.group = group
        self.chmodMode = chmodMode
        self.sshKey = sshKey
        self.releaseToDated = releaseToDated
        self.releaseToLatest = releaseToLatest
        self.releaseToCandidates = releaseToCandidates
        self.remoteCandidatesPath = remoteCandidatesPath
        self.releaseToTinderboxBuilds = releaseToTinderboxBuilds
        self.tinderboxBuildsDir = tinderboxBuildsDir
        self.dependToDated = dependToDated
        self.uploadCompleteMar = uploadCompleteMar
        self.uploadLangPacks = uploadLangPacks

        self.description = ["uploading package(s) to", remoteHost]
        self.descriptionDone = ["upload package(s) to", remoteHost]