feat: create build when activating a deployment
This commit is contained in:
parent
40afec223c
commit
9115aa392d
|
@ -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);
|
||||
});
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue