Adds general.yml parameter "ssh_needs_tty" which appends "-t" to the ssh

command
Adds deployment parameter "rsync: { copy: yes }" which copies the prior
release then rsync's (to increase speed)
This commit is contained in:
mikec
2014-01-28 21:43:43 -05:00
parent 5cc9c02c3e
commit e7d8d5ce68
3 changed files with 36 additions and 14 deletions
+9 -6
View File
@@ -179,17 +179,20 @@ abstract class AbstractTask
$releasesDirectory = '';
} else {
$releasesDirectory = '/'
. $this->getConfig()->release('directory', 'releases')
. '/'
$releasesDirectory = '/'
. $this->getConfig()->release('directory', 'releases')
. '/'
. $this->getConfig()->getReleaseId();
}
}
} else {
$releasesDirectory = '';
}
// if general.yml includes "ssy_needs_tty: true", then add "-t" to the ssh command
$needs_tty = ($this->getConfig()->general('ssh_needs_tty',false) ? "-t" : "");
$localCommand = 'ssh -p ' . $this->getConfig()->getHostPort() . ' '
$localCommand = 'ssh ' . $needs_tty . ' -p ' . $this->getConfig()->getHostPort() . ' '
. '-q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no '
. $this->getConfig()->deployment('user') . '@' . $this->getConfig()->getHostName() . ' '
. '"cd ' . rtrim($this->getConfig()->deployment('to'), '/') . $releasesDirectory . ' && '
@@ -213,4 +216,4 @@ abstract class AbstractTask
return $this->runCommandLocal($command, $output);
}
}
}
}