1
0
Fork 0
mirror of synced 2024-06-27 02:31:04 +12:00

feat: create build when activating a deployment

This commit is contained in:
Christy Jacob 2022-02-17 00:38:58 +04:00
parent 40afec223c
commit 9115aa392d
2 changed files with 9 additions and 1 deletions

View file

@ -406,6 +406,14 @@ App::patch('/v1/functions/:functionId/deployments/:deploymentId')
]); // Async task rescheduale
}
// Enqueue a message to start the build
Resque::enqueue(Event::BUILDS_QUEUE_NAME, Event::BUILDS_CLASS_NAME, [
'projectId' => $project->getId(),
'functionId' => $function->getId(),
'deploymentId' => $deploymentId,
'type' => BUILD_TYPE_DEPLOYMENT
]);
$response->dynamic($function, Response::MODEL_FUNCTION);
});

View file

@ -117,7 +117,7 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled', true);
data-failure="alert"
data-failure-param-alert-text="Failed to update deployment"
data-failure-param-alert-classname="error">
<input type="hidden" name="deployment" data-ls-bind="{{deployment.$id}}">
<input type="hidden" name="deploymentId" data-ls-bind="{{deployment.$id}}">
<button>Activate</button>
</form>
<form data-ls-if="({{deployment.$id}} !== {{project-function.deployment}} && {{deployment.status}} == 'failed')" name="functions.retryBuild" class="pull-end"