mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-08 09:22:34 +00:00
code style fix
add command tests
This commit is contained in:
@ -21,6 +21,7 @@ public function handle(): void
|
||||
{
|
||||
if ($this->server->provider()->isRunning()) {
|
||||
$this->server->install();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@ -33,6 +34,7 @@ public function handle(): void
|
||||
'server' => $this->server,
|
||||
])
|
||||
);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
use App\Jobs\Job;
|
||||
use App\Models\FirewallRule;
|
||||
use App\Models\Service;
|
||||
use App\SSHCommands\PHPMyAdmin\DeleteNginxPHPMyAdminVHost;
|
||||
use App\SSHCommands\PHPMyAdmin\DeleteNginxPHPMyAdminVHostCommand;
|
||||
use Exception;
|
||||
use Throwable;
|
||||
|
||||
@ -48,7 +48,7 @@ private function removeFirewallRule(): void
|
||||
private function deleteVHost(): void
|
||||
{
|
||||
$this->service->server->ssh()->exec(
|
||||
new DeleteNginxPHPMyAdminVHost('/home/vito/phpmyadmin'),
|
||||
new DeleteNginxPHPMyAdminVHostCommand('/home/vito/phpmyadmin'),
|
||||
'delete-phpmyadmin-vhost'
|
||||
);
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
use App\Helpers\SSH;
|
||||
use App\Jobs\Job;
|
||||
use App\Models\Deployment;
|
||||
use App\SSHCommands\System\RunScript;
|
||||
use App\SSHCommands\System\RunScriptCommand;
|
||||
use Throwable;
|
||||
|
||||
class Deploy extends Job
|
||||
@ -34,7 +34,7 @@ public function handle(): void
|
||||
{
|
||||
$this->ssh = $this->deployment->site->server->ssh();
|
||||
$this->ssh->exec(
|
||||
new RunScript($this->path, $this->script),
|
||||
new RunScriptCommand($this->path, $this->script),
|
||||
'deploy',
|
||||
$this->deployment->site_id
|
||||
);
|
||||
|
@ -34,7 +34,7 @@ public function handle(): void
|
||||
);
|
||||
$this->site->save();
|
||||
$this->site->sourceControl()->provider()->deployKey(
|
||||
$this->site->domain.'-key-' . $this->site->id,
|
||||
$this->site->domain.'-key-'.$this->site->id,
|
||||
$this->site->repository,
|
||||
$this->site->ssh_key
|
||||
);
|
||||
|
Reference in New Issue
Block a user