DeployOnEvent
class DeployOnEvent implements CommandInterface, EventReceiverInterface, QueueReceiverInterface
Traits
Methods
Receive the event and do something with it.
Apply repository criterion to the setter, in vendor-name/project-name format
Return the event type for which this receiver listens
Apply username criterion to the setter, formatted as the formal name, e.g. 'Keith Freeman'
Called by the Event Emitter and will determine if the Event matches the set criteria
Run a command received off the queue
DeployOnMerge constructor.
Details
at line line 84
handle()
Receive the event and do something with it.
in EventReceiverFluentSetter at line line 38
$this
forRepo($repo)
Apply repository criterion to the setter, in vendor-name/project-name format
in EventReceiverFluentSetter at line line 52
$this
from($branch)
Apply from branch criterion to the setter
in EventReceiverFluentSetter at line line 64
boolean|string
getEventType()
Return the event type for which this receiver listens
in EventReceiverFluentSetter at line line 77
$this
initiatedBy($username)
Apply username criterion to the setter, formatted as the formal name, e.g. 'Keith Freeman'
in EventReceiverFluentSetter at line line 93
receive(array $event, string $eventType = null)
Called by the Event Emitter and will determine if the Event matches the set criteria
The $eventType
will only be populated if this receiver listens to all events.
This is done by implementing the interface method getEventType()
with a function that returns false.
in EventReceiverFluentSetter at line line 115
$this
on($eventType)
Apply eventType criterion to the setter
in EventReceiverFluentSetter at line line 129
$this
to($branch)
Apply to branch criterion to the setter
in QueueAccess at line line 18
$this
setQueue(QueueManager $queue)
Set the storage instance
at line line 34
static boolean
run($payload)
Run a command received off the queue
In other words, deploy changes to the git repo at the given directory.
The remote
and branch
are configurable, and commands can be given to run after the git deployment.
at line line 59
__construct($eventType, $path, string $branch = 'master', string $remote = 'origin', string|array $postCommand = '')
DeployOnMerge constructor.