mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-09-22 09:27:39 +02:00
Add hook deployment onCollect
This commit is contained in:
parent
04ba8d12cf
commit
9387ede99a
@ -677,6 +677,12 @@ constants
|
|||||||
$deployment->set('stage_collected', 'y');
|
$deployment->set('stage_collected', 'y');
|
||||||
|
|
||||||
$deployment->store();
|
$deployment->store();
|
||||||
|
|
||||||
|
/** @var DeploymentHook[] $hooks */
|
||||||
|
$hooks = Hook::all('director/Deployment');
|
||||||
|
foreach ($hooks as $hook) {
|
||||||
|
$hook->onCollect($deployment);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($missing as $deployment) {
|
foreach ($missing as $deployment) {
|
||||||
|
@ -50,4 +50,16 @@ abstract class DeploymentHook
|
|||||||
$this->onSuccessfulDump($deploymentLog);
|
$this->onSuccessfulDump($deploymentLog);
|
||||||
$this->onSuccessfullDump($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…
x
Reference in New Issue
Block a user