1
0
Fork 0
mirror of synced 2024-07-04 06:00:53 +12:00

Fix bugs after merge

This commit is contained in:
Matej Bačo 2023-05-28 10:02:23 +02:00
parent 507b2d978a
commit bf5855d101
3 changed files with 7 additions and 5 deletions

@ -1 +1 @@
Subproject commit dd6555abd460b55be996d9d8e10c95801e8bf662
Subproject commit 2f4e16038db4968371ef3a5b1189294d3dc60788

View file

@ -574,7 +574,7 @@ App::put('/v1/functions/:functionId')
// activate the deployment for first run of a VCS repo
if ($needToDeploy) {
$deploymentId = ID::unique();
$entrypoint = 'index.js'; //TODO: Read from function settings
$entrypoint = $function->getAttribute('entrypoint', '');
$deployment = $dbForProject->getDocument('deployments', $deploymentId);
//Add document in VCS repos collection
@ -608,6 +608,8 @@ App::put('/v1/functions/:functionId')
'resourceId' => $function->getId(),
'resourceType' => 'functions',
'entrypoint' => $entrypoint,
'buildCommand' => $buildCommand,
'installCommand' => $installCommand,
'type' => 'vcs',
'vcsInstallationId' => $installation->getId(),
'vcsInstallationInternalId' => $installation->getInternalId(),
@ -960,6 +962,8 @@ App::post('/v1/functions/:functionId/deployments')
'resourceId' => $function->getId(),
'resourceType' => 'functions',
'entrypoint' => $entrypoint,
'buildCommand' => $buildCommand,
'installCommand' => $installCommand,
'path' => $path,
'size' => $fileSize,
'chunksTotal' => $chunks,

View file

@ -274,8 +274,6 @@ class BuildsV1 extends Worker
$command = \str_replace('"', '\\"', $command);
\var_dump($path);
$response = $this->executor->createRuntime(
projectId: $project->getId(),
deploymentId: $deployment->getId(),
@ -289,7 +287,7 @@ class BuildsV1 extends Worker
commands: [
'sh', '-c',
'tar -zxf /tmp/code.tar.gz -C /mnt/code && helpers/build.sh "' . $command . '"'
]
],
);
$endTime = DateTime::now();