"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "buildbot/util/git.py" between
buildbot-3.0.2.tar.gz and buildbot-3.1.0.tar.gz

About: Buildbot is a continuous integration testing framework (Python-based). It supports also automation of complex build systems, application deployment, and management of sophisticated software-release processes.

git.py  (buildbot-3.0.2):git.py  (buildbot-3.1.0)
skipping to change at line 26 skipping to change at line 26
import re import re
from pkg_resources import parse_version from pkg_resources import parse_version
from twisted.internet import defer from twisted.internet import defer
from twisted.python import log from twisted.python import log
from buildbot import config from buildbot import config
from buildbot.process import buildstep from buildbot.process import buildstep
from buildbot.process import remotecommand from buildbot.process import remotecommand
from buildbot.process.properties import Properties from buildbot.process.properties import Properties
from buildbot.util import bytes2unicode
RC_SUCCESS = 0 RC_SUCCESS = 0
def getSshArgsForKeys(keyPath, knownHostsPath): def getSshArgsForKeys(keyPath, knownHostsPath):
args = ['-o', 'BatchMode=yes'] args = ['-o', 'BatchMode=yes']
if keyPath is not None: if keyPath is not None:
args += ['-i', keyPath] args += ['-i', keyPath]
if knownHostsPath is not None: if knownHostsPath is not None:
args += ['-o', 'UserKnownHostsFile={0}'.format(knownHostsPath)] args += ['-o', 'UserKnownHostsFile={0}'.format(knownHostsPath)]
return args return args
skipping to change at line 146 skipping to change at line 147
if command[0] in gitCommandsThatNeedSshKey: if command[0] in gitCommandsThatNeedSshKey:
return True return True
return False return False
def _getSshDataPath(self): def _getSshDataPath(self):
# we can't use the workdir for temporary ssh-related files, because # we can't use the workdir for temporary ssh-related files, because
# it's needed when cloning repositories and git does not like the # it's needed when cloning repositories and git does not like the
# destination directory being non-empty. We have to use separate # destination directory being non-empty. We have to use separate
# temporary directory for that data to ensure the confidentiality of it. # temporary directory for that data to ensure the confidentiality of it.
# So instead of # So instead of
# '{path}/{to}/{workdir}/.buildbot-ssh-key' we put the key at # '{path}/{to}/{workerbuilddir}/{workdir}/.buildbot-ssh-key'
# '{path}/{to}/.{builder_name}.{workdir}.buildbot/ssh-key'. # we put the key in
# '{path}/{to}/.{workerbuilddir}.{workdir}.buildbot/ssh-key'.
# basename and dirname interpret the last element being empty for paths # basename and dirname interpret the last element being empty for paths
# ending with a slash # ending with a slash
path_module = self.build.path_module path_module = self.build.path_module
workerbuilddir = bytes2unicode(self.build.builder.config.workerbuilddir)
workdir = self._getSshDataWorkDir().rstrip('/\\') workdir = self._getSshDataWorkDir().rstrip('/\\')
if path_module.isabs(workdir): if path_module.isabs(workdir):
parent_path = path_module.dirname(workdir) parent_path = path_module.dirname(workdir)
else: else:
parent_path = path_module.join(self.worker.worker_basedir, parent_path = path_module.join(self.worker.worker_basedir,
path_module.dirname(workdir)) path_module.dirname(workdir))
basename = '.{0}.{1}.buildbot'.format(self.build.builder.name, basename = '.{0}.{1}.buildbot'.format(workerbuilddir,
path_module.basename(workdir)) path_module.basename(workdir))
return path_module.join(parent_path, basename) return path_module.join(parent_path, basename)
def _getSshPrivateKeyPath(self, ssh_data_path): def _getSshPrivateKeyPath(self, ssh_data_path):
return self.build.path_module.join(ssh_data_path, 'ssh-key') return self.build.path_module.join(ssh_data_path, 'ssh-key')
def _getSshHostKeyPath(self, ssh_data_path): def _getSshHostKeyPath(self, ssh_data_path):
return self.build.path_module.join(ssh_data_path, 'ssh-known-hosts') return self.build.path_module.join(ssh_data_path, 'ssh-known-hosts')
def _getSshWrapperScriptPath(self, ssh_data_path): def _getSshWrapperScriptPath(self, ssh_data_path):
 End of changes. 4 change blocks. 
3 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)