From fbebec00aadad3826770787a24db2cdb4222acd9 Mon Sep 17 00:00:00 2001 From: Jorrit Wronski Date: Thu, 9 Jul 2015 22:02:50 +0200 Subject: [PATCH] Playing around with the renderable properties --- dev/buildbot/master/master.cfg | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/dev/buildbot/master/master.cfg b/dev/buildbot/master/master.cfg index 53670f61..409c1b75 100644 --- a/dev/buildbot/master/master.cfg +++ b/dev/buildbot/master/master.cfg @@ -278,25 +278,25 @@ def fixPermissions(factory): def upload_command(factory, slavesrc, masterdest=None, branch=None, platform=None, pyID=None): """Upload files to the master server. Avoids buildbot upload on platforms other than Windows.""" - if (masterdest is None and branch is None) or \ - (masterdest is not None and branch is not None): + if (masterdest is not None and branch is not None): raise ValueError("Unknown target, specify either \"masterdest\" or \"branch\".") if (platform is not None and pyID is not None): raise ValueError("Unknown target, specify either \"platform\" or \"pyID\".") + + if masterdest is not None: target = masterdest + elif branch is not None: target = _master_loc_rel(branch) + else: target = master_loc_rel if platform is None and pyID is None: # default - if masterdest is not None: target = masterdest - else: target = _master_loc_rel(branch) factory.addStep(DirectoryUpload(slavesrc=slavesrc, masterdest=target)) elif (platform is not None and platform == 'windows') or \ (pyID is not None and checkID(pyID, teID=100, strict=False)): - if masterdest is not None: target = masterdest - else: target = _master_loc_rel(branch) factory.addStep(DirectoryUpload(slavesrc=slavesrc, masterdest=target)) else: if masterdest is not None: target = masterdest - else: target = _master_loc_abs(branch) - rsyncCommand = ' '.join(['rsync', '-a', '--stats', '{0}/ {1}'.format(slavesrc,masterdest)]) - factory.addStep(ShellCommand(command=rsyncCommand, haltOnFailure = False)) + elif branch is not None: target = _master_loc_abs(branch) + else: target = master_loc_abs + rsyncCommand = ['rsync', '-aP', '--no-perms', '--no-owner', '--no-group', '--stats', '{0}/'.format(slavesrc), target] + factory.addStep(ShellCommand(command=rsyncCommand, haltOnFailure = True)) fixPermissions(factory) @@ -452,7 +452,7 @@ def pythonFactory(pyID, pyCFG=PythonSlaveConfig("name")): factory.addStep(ShellCommand(command=combinedCMD(installCMD), workdir='build', haltOnFailure=True)) if buildPyPI or buildConda: - upload_command(factory, installFolder, branch=_branch, pyID=pyID) + upload_command(factory, installFolder, pyID=pyID) return factory