mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
feat: create build when activating a deployment
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user