This commit is contained in:
Joao Patricio
2023-03-30 20:24:43 +01:00
parent f05ab87c08
commit a852a15dab
6 changed files with 53 additions and 19 deletions

View File

@@ -30,19 +30,22 @@ if (!function_exists('remoteProcess')) {
return resolve(DispatchRemoteProcess::class, [
'remoteProcessArgs' => new RemoteProcessArgs(
type: $deployment_uuid ? ActivityTypes::DEPLOYMENT->value : ActivityTypes::REMOTE_PROCESS->value,
model: $model,
server_ip: $server->ip,
deployment_uuid: $deployment_uuid,
private_key_location: $private_key_location,
deployment_uuid: $deployment_uuid,
command: <<<EOT
{$command_string}
EOT,
port: $server->port,
user: $server->user,
type: $deployment_uuid ? ActivityTypes::DEPLOYMENT->value : ActivityTypes::REMOTE_PROCESS->value,
),
])();
}
}
if (!function_exists('checkTeam')) {
function checkTeam(string $team_id)
{
$found_team = auth()->user()->teams->pluck('id')->contains($team_id);