示例#1
0
 def _dovccmd(self, command, args, path=None):
     if self._isSshPrivateKeyNeededForCommand(command):
         with private_tempdir.PrivateTemporaryDirectory(
                 dir=self.workdir, prefix='.buildbot-ssh') as tmp_path:
             stdout = yield self._dovccmdImpl(command, args, path, tmp_path)
     else:
         stdout = yield self._dovccmdImpl(command, args, path, None)
     return stdout
示例#2
0
 def _dovccmd(self, command, args, path=None):
     if self._isSshPrivateKeyNeededForCommand(command):
         key_dir = self._getSshDataPath()
         with private_tempdir.PrivateTemporaryDirectory(name=key_dir):
             stdout = yield self._dovccmdImpl(command, args, path)
     else:
         stdout = yield self._dovccmdImpl(command, args, path)
     defer.returnValue(stdout)
示例#3
0
    def perform(self, manager):
        if self._sshKey is not None or self._sshHostKey is not None:
            with private_tempdir.PrivateTemporaryDirectory(
                    prefix='ssh-', dir=manager.master.basedir) as temp_dir:

                key_path, hosts_path = yield self._prepareSshKeys(
                    manager, temp_dir)

                ret = yield self._performImpl(manager, key_path, hosts_path)
        else:
            ret = yield self._performImpl(manager, None, None)
        defer.returnValue(ret)