- 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
39 lines
883 B
PHP
39 lines
883 B
PHP
<?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';
|
|
}
|