feat(Deployment): Integrate Ansible deployment via PHP deployment pipeline
- Create AnsibleDeployStage using framework's Process module for secure command execution - Integrate AnsibleDeployStage into DeploymentPipelineCommands for production deployments - Add force_deploy flag support in Ansible playbook to override stale locks - Use PHP deployment module as orchestrator (php console.php deploy:production) - Fix ErrorAggregationInitializer to use Environment class instead of $_ENV superglobal Architecture: - BuildStage → AnsibleDeployStage → HealthCheckStage for production - Process module provides timeout, error handling, and output capture - Ansible playbook supports rollback via rollback-git-based.yml - Zero-downtime deployments with health checks
This commit is contained in:
38
src/Framework/Notification/Dispatcher/DispatchStrategy.php
Normal file
38
src/Framework/Notification/Dispatcher/DispatchStrategy.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Framework\Notification\Dispatcher;
|
||||
|
||||
/**
|
||||
* Dispatch Strategy
|
||||
*
|
||||
* Defines how notifications should be dispatched across multiple channels
|
||||
*/
|
||||
enum DispatchStrategy: string
|
||||
{
|
||||
/**
|
||||
* Send to ALL channels, regardless of success/failure
|
||||
* Continues even if some channels fail
|
||||
*/
|
||||
case ALL = 'all';
|
||||
|
||||
/**
|
||||
* Send to channels until first SUCCESS
|
||||
* Stops after first successful delivery
|
||||
*/
|
||||
case FIRST_SUCCESS = 'first_success';
|
||||
|
||||
/**
|
||||
* FALLBACK strategy - try channels in order
|
||||
* Only tries next channel if previous failed
|
||||
* Use case: Telegram -> Email -> SMS fallback chain
|
||||
*/
|
||||
case FALLBACK = 'fallback';
|
||||
|
||||
/**
|
||||
* Send to ALL channels, stop on FIRST FAILURE
|
||||
* All channels must succeed, or entire dispatch fails
|
||||
*/
|
||||
case ALL_OR_NONE = 'all_or_none';
|
||||
}
|
||||
Reference in New Issue
Block a user