PHP Class DNDeployment

Inheritance: extends DataObject
ファイルを表示 Open project: silverstripe/deploynaut Class Usage Examples

Public Methods

Method Description
Link ( )
LogContent ( )
LogLink ( )
ResqueStatus ( ) : string This remains here for backwards compatibility - we don't want to expose Resque status in here.
canView ( $member = null )
enqueueDeployment ( ) : string Start a resque job for this deployment
getChanges ( ) : ArrayList Return a list of things that are going to be deployed, such as the code version, and any infrastructural changes.
getCommit ( ) : Gitonomy\Git\Commit | null Gets the commit from source. The result is cached upstream in Repository.
getCommitMessage ( ) : string | null Gets the commit message.
getCommitSubjectMessage ( ) : string | null Gets the commit message.
getCommitURL ( ) : null | string Get the commit URL to the commit associated with this deployment.
getDeploymentStrategy ( ) : DeploymentStrategy
getFiniteState ( )
getFullDeployMessages ( ) : ArrayList Collate the list of additional flags to affix to this deployment.
getMachine ( )
getRepository ( ) : Repository | null Fetch the git repository
getSigFile ( )
getStatus ( )
getTag ( ) : Varchar | null Fetches the latest tag for the deployed commit
getTags ( ) : ArrayList Return all tags for the deployed commit.
log ( ) : DeploynautLogFile
setFiniteState ( $state )
setResqueToken ( $token )
setSignal ( $signal ) Signal the worker to self-abort. If we had a reliable way of figuring out the right PID, we could posix_kill directly, but Resque seems to not provide a way to find out the PID from the job nor worker.

Protected Methods

Method Description
logfile ( ) : string Return a path to the log file.

Method Details

LogContent() public method

public LogContent ( )

ResqueStatus() public method

Resque job (DeployJob) will change statuses as part of its execution.
public ResqueStatus ( ) : string
return string

canView() public method

public canView ( $member = null )

enqueueDeployment() public method

Start a resque job for this deployment
public enqueueDeployment ( ) : string
return string Resque token

getChanges() public method

Return a list of things that are going to be deployed, such as the code version, and any infrastructural changes.
public getChanges ( ) : ArrayList
return ArrayList

getCommit() public method

Gets the commit from source. The result is cached upstream in Repository.
public getCommit ( ) : Gitonomy\Git\Commit | null
return Gitonomy\Git\Commit | null

getCommitMessage() public method

Gets the commit message.
public getCommitMessage ( ) : string | null
return string | null

getCommitSubjectMessage() public method

Gets the commit message.
public getCommitSubjectMessage ( ) : string | null
return string | null

getCommitURL() public method

Get the commit URL to the commit associated with this deployment.
public getCommitURL ( ) : null | string
return null | string

getDeploymentStrategy() public method

public getDeploymentStrategy ( ) : DeploymentStrategy
return DeploymentStrategy

getFiniteState() public method

public getFiniteState ( )

getFullDeployMessages() public method

Elements of the array will be rendered literally.
public getFullDeployMessages ( ) : ArrayList
return ArrayList

getMachine() public method

public getMachine ( )

getRepository() public method

Fetch the git repository
public getRepository ( ) : Repository | null
return Gitonomy\Git\Repository | null

getSigFile() public method

public getSigFile ( )

getStatus() public method

public getStatus ( )

getTag() public method

Fetches the latest tag for the deployed commit
public getTag ( ) : Varchar | null
return Varchar | null

getTags() public method

Return all tags for the deployed commit.
public getTags ( ) : ArrayList
return ArrayList

log() public method

public log ( ) : DeploynautLogFile
return DeploynautLogFile

logfile() protected method

Return a path to the log file.
protected logfile ( ) : string
return string

setFiniteState() public method

public setFiniteState ( $state )

setResqueToken() public method

public setResqueToken ( $token )

setSignal() public method

Signal the worker to self-abort. If we had a reliable way of figuring out the right PID, we could posix_kill directly, but Resque seems to not provide a way to find out the PID from the job nor worker.
public setSignal ( $signal )