[Nostromo] Add flags for TarGz tasks

This commit is contained in:
Andrés Montañez
2017-01-14 22:27:52 -03:00
parent 22576d082f
commit d7724495a9
3 changed files with 5 additions and 3 deletions
+2 -1
View File
@@ -43,6 +43,7 @@ class CopyTask extends AbstractTask
$hostPath = rtrim($this->runtime->getEnvOption('host_path'), '/');
$currentReleaseId = $this->runtime->getReleaseId();
$flags = $this->runtime->getEnvOption('tar_extract', 'xfzop');
$targetDir = sprintf('%s/releases/%s', $hostPath, $currentReleaseId);
$tarGzLocal = $this->runtime->getVar('targz_local');
@@ -53,7 +54,7 @@ class CopyTask extends AbstractTask
/** @var Process $process */
$process = $this->runtime->runLocalCommand($cmdCopy, 300);
if ($process->isSuccessful()) {
$cmdUnTar = sprintf('cd %s && tar xfzop %s', $targetDir, $tarGzRemote);
$cmdUnTar = sprintf('cd %s && tar %s %s', $targetDir, $flags, $tarGzRemote);
$process = $this->runtime->runRemoteCommand($cmdUnTar, false, 600);
if ($process->isSuccessful()) {
$cmdDelete = sprintf('rm %s/%s', $targetDir, $tarGzRemote);