PHP Class CapistranoDeploymentBackend

Inheritance: extends Object, implements DeploymentBackend
显示文件 Open project: silverstripe/deploynaut Class Usage Examples

Protected Properties

Property Type Description
$packageGenerator

Public Methods

Method Description
dataTransfer ( DNDataTransfer $dataTransfer, DeploynautLogFile $log )
deploy ( DNEnvironment $environment, DeploynautLogFile $log, DNProject $project, array $options ) Deploy the given build to the given environment.
disableMaintenance ( DNEnvironment $environment, DeploynautLogFile $log, DNProject $project ) Disable the maintenance page for the given environment using the maintenance:disable Capistrano task.
enableMaintenance ( DNEnvironment $environment, DeploynautLogFile $log, DNProject $project ) Enable a maintenance page for the given environment using the maintenance:enable Capistrano task.
getCommand ( string $action, string $roles, DNEnvironment $environment, array | null $args = null, DeploynautLogFile $log ) : Process
getDeployOptions ( DNEnvironment $environment ) : ArrayList
getPackageGenerator ( )
ping ( DNEnvironment $environment, DeploynautLogFile $log, DNProject $project ) Check the status using the deploy:check capistrano method
planDeploy ( DNEnvironment $environment, array $options ) : DeploymentStrategy Create a deployment strategy.
rebuild ( DNEnvironment $environment, DeploynautLogFile $log ) Utility function for triggering the db rebuild and flush.
setPackageGenerator ( PackageGenerator $packageGenerator )

Protected Methods

Method Description
dataTransferBackup ( DNDataTransfer $dataTransfer, DeploynautLogFile $log ) Backs up database and/or assets to a designated folder, and packs up the files into a single sspak.
dataTransferRestore ( string $workingDir, DNDataTransfer $dataTransfer, DeploynautLogFile $log ) Extracts a *.sspak file referenced through the passed in $dataTransfer and pushes it to the environment referenced in $dataTransfer.
smokeTest ( DNEnvironment $environment, DeploynautLogFile $log ) : boolean This is mostly copy-pasted from Anthill/Smoketest.

Private Methods

Method Description
deployRollback ( DNEnvironment $environment, DeploynautLogFile $log, DNProject $project, $options, $args )

Method Details

dataTransfer() public method

public dataTransfer ( DNDataTransfer $dataTransfer, DeploynautLogFile $log )
$dataTransfer DNDataTransfer
$log DeploynautLogFile

dataTransferBackup() protected method

Backs up database and/or assets to a designated folder, and packs up the files into a single sspak.
protected dataTransferBackup ( DNDataTransfer $dataTransfer, DeploynautLogFile $log )
$dataTransfer DNDataTransfer
$log DeploynautLogFile

dataTransferRestore() protected method

Extracts a *.sspak file referenced through the passed in $dataTransfer and pushes it to the environment referenced in $dataTransfer.
protected dataTransferRestore ( string $workingDir, DNDataTransfer $dataTransfer, DeploynautLogFile $log )
$workingDir string Directory for the unpacked files.
$dataTransfer DNDataTransfer
$log DeploynautLogFile

deploy() public method

Deploy the given build to the given environment.
public deploy ( DNEnvironment $environment, DeploynautLogFile $log, DNProject $project, array $options )
$environment DNEnvironment
$log DeploynautLogFile
$project DNProject
$options array

disableMaintenance() public method

Disable the maintenance page for the given environment using the maintenance:disable Capistrano task.
public disableMaintenance ( DNEnvironment $environment, DeploynautLogFile $log, DNProject $project )
$environment DNEnvironment
$log DeploynautLogFile
$project DNProject

enableMaintenance() public method

Enable a maintenance page for the given environment using the maintenance:enable Capistrano task.
public enableMaintenance ( DNEnvironment $environment, DeploynautLogFile $log, DNProject $project )
$environment DNEnvironment
$log DeploynautLogFile
$project DNProject

getCommand() public method

public getCommand ( string $action, string $roles, DNEnvironment $environment, array | null $args = null, DeploynautLogFile $log ) : Process
$action string Capistrano action to be executed
$roles string Defining a server role is required to target only the required servers.
$environment DNEnvironment
$args array | null
$log DeploynautLogFile
return Symfony\Component\Process\Process

getDeployOptions() public method

public getDeployOptions ( DNEnvironment $environment ) : ArrayList
$environment DNEnvironment
return ArrayList

getPackageGenerator() public method

public getPackageGenerator ( )

ping() public method

Check the status using the deploy:check capistrano method
public ping ( DNEnvironment $environment, DeploynautLogFile $log, DNProject $project )
$environment DNEnvironment
$log DeploynautLogFile
$project DNProject

planDeploy() public method

Create a deployment strategy.
public planDeploy ( DNEnvironment $environment, array $options ) : DeploymentStrategy
$environment DNEnvironment
$options array
return DeploymentStrategy

rebuild() public method

Also cleans up and generates new error pages.
public rebuild ( DNEnvironment $environment, DeploynautLogFile $log )
$environment DNEnvironment
$log DeploynautLogFile

setPackageGenerator() public method

public setPackageGenerator ( PackageGenerator $packageGenerator )
$packageGenerator PackageGenerator

smokeTest() protected method

This is mostly copy-pasted from Anthill/Smoketest.
protected smokeTest ( DNEnvironment $environment, DeploynautLogFile $log ) : boolean
$environment DNEnvironment
$log DeploynautLogFile
return boolean

Property Details

$packageGenerator protected_oe property

protected $packageGenerator