Add hook deployment onCollect
This commit is contained in:
parent
04ba8d12cf
commit
9387ede99a
|
@ -677,6 +677,12 @@ constants
|
|||
$deployment->set('stage_collected', 'y');
|
||||
|
||||
$deployment->store();
|
||||
|
||||
/** @var DeploymentHook[] $hooks */
|
||||
$hooks = Hook::all('director/Deployment');
|
||||
foreach ($hooks as $hook) {
|
||||
$hook->onCollect($deployment);
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($missing as $deployment) {
|
||||
|
|
|
@ -50,4 +50,16 @@ abstract class DeploymentHook
|
|||
$this->onSuccessfulDump($deploymentLog);
|
||||
$this->onSuccessfullDump($deploymentLog);
|
||||
}
|
||||
|
||||
/**
|
||||
* Please override this method if you want to trigger custom actions
|
||||
* once success (or failure) information have been collected for a deployed
|
||||
* stage. startup_succeeded will then be filled, and startup_log might be
|
||||
* available
|
||||
*
|
||||
* @param DirectorDeploymentLog $deployment
|
||||
*/
|
||||
public function onCollect(DirectorDeploymentLog $deployment)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue