PHP Class CapistranoDeploymentBackend

Inheritance: extends Object, implements DeploymentBackend
Afficher le fichier Open project: silverstripe/deploynaut Class Usage Examples

Protected Properties

Свойство Type Description
$packageGenerator

Méthodes publiques

Méthode 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 )

Méthodes protégées

Méthode 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

Méthode Description
deployRollback ( DNEnvironment $environment, DeploynautLogFile $log, DNProject $project, $options, $args )

Method Details

dataTransfer() public méthode

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

dataTransferBackup() protected méthode

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 méthode

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 méthode

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 méthode

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 méthode

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 méthode

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
Résultat Symfony\Component\Process\Process

getDeployOptions() public méthode

public getDeployOptions ( DNEnvironment $environment ) : ArrayList
$environment DNEnvironment
Résultat ArrayList

getPackageGenerator() public méthode

public getPackageGenerator ( )

ping() public méthode

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 méthode

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

rebuild() public méthode

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

setPackageGenerator() public méthode

public setPackageGenerator ( PackageGenerator $packageGenerator )
$packageGenerator PackageGenerator

smokeTest() protected méthode

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

Property Details

$packageGenerator protected_oe property

protected $packageGenerator