feat: extract build commands to the builds worker

This commit is contained in:
Christy Jacob
2022-02-17 18:51:36 +04:00
parent 039d993730
commit 1d7a2cfc71
5 changed files with 123 additions and 148 deletions
+5 -3
View File
@@ -37,8 +37,9 @@ class Executor
string $source,
array $vars,
string $runtime,
string $baseImage)
{
string $baseImage,
array $commands
) {
$route = "/runtimes";
$headers = [
'content-type' => 'application/json',
@@ -51,7 +52,8 @@ class Executor
'destination' => APP_STORAGE_BUILDS . "/app-$projectId",
'vars' => $vars,
'runtime' => $runtime,
'baseImage' => $baseImage
'baseImage' => $baseImage,
'commands' => $commands
];
$response = $this->call(self::METHOD_POST, $route, $headers, $params, true, 30);