mirror of
https://we.phorge.it/source/phorge.git
synced 2025-02-02 09:58:24 +01:00
adfe84ffce
Summary: This is very preliminary and doesn't actually do anything useful. In theory, it uses Drydock to check out a working copy and run tests. In practice, it's not actually capable of running any of our tests (because of complicated interdependency stuff), but does check out a working copy and //try// to run tests there. Adds various sorts of utility methods to various things as well. Test Plan: Ran `reparse.php --harbormaster --trace <commit>`, observed attempt to run tests via Drydock. Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T2015, T1049 Differential Revision: https://secure.phabricator.com/D4215
22 lines
632 B
PHP
22 lines
632 B
PHP
<?php
|
|
|
|
final class DrydockSSHCommandInterface extends DrydockCommandInterface {
|
|
|
|
public function getExecFuture($command) {
|
|
$argv = func_get_args();
|
|
$argv = $this->applyWorkingDirectoryToArgv($argv);
|
|
|
|
$full_command = call_user_func_array('csprintf', $argv);
|
|
|
|
// NOTE: The "-t -t" is for psuedo-tty allocation so we can "sudo" on some
|
|
// systems, but maybe more trouble than it's worth?
|
|
|
|
return new ExecFuture(
|
|
'ssh -t -t -o StrictHostKeyChecking=no -i %s %s@%s -- %s',
|
|
$this->getConfig('ssh-keyfile'),
|
|
$this->getConfig('user'),
|
|
$this->getConfig('host'),
|
|
$full_command);
|
|
}
|
|
|
|
}
|