Added identity file option for ssh and scp commands

This commit is contained in:
Osukaru
2014-04-07 12:20:41 +02:00
parent a97d172a6d
commit beb663e801
5 changed files with 27 additions and 17 deletions
@@ -94,7 +94,7 @@ class RsyncTask extends AbstractTask implements IsReleaseAware
}
$command = 'rsync -avz '
. '--rsh="ssh -p' . $this->getConfig()->getHostPort() . '" '
. '--rsh="ssh ' . $this->getConfig()->getHostIdentityFileOption() . '-p' . $this->getConfig()->getHostPort() . '" '
. $this->excludes(array_merge($excludes, $userExcludes)) . ' '
. $this->getConfig()->deployment('from') . ' '
. $this->getConfig()->deployment('user') . '@' . $this->getConfig()->getHostName() . ':' . $deployToDirectory;
@@ -89,7 +89,7 @@ class TarGzTask extends AbstractTask implements IsReleaseAware
$result = $this->runCommandLocal($command);
// Copy Tar Gz to Remote Host
$command = 'scp -P ' . $this->getConfig()->getHostPort() . ' ' . $localTarGz . '.tar.gz '
$command = 'scp ' . $this->getConfig()->getHostIdentityFileOption() . '-P ' . $this->getConfig()->getHostPort() . ' ' . $localTarGz . '.tar.gz '
. $this->getConfig()->deployment('user') . '@' . $this->getConfig()->getHostName() . ':' . $deployToDirectory;
$result = $this->runCommandLocal($command) && $result;