PHP Class app\components\Folder

Inheritance: extends Command
Show file Open project: meolu/walle-web Class Usage Examples

Public Methods

Method Description
ansibleCopyFiles ( Project $project, Task $task ) : boolean 将多个文件/目录通过tar + ansible传输到指定的多个目标机
cleanUpLocal ( $version ) : boolean | integer 收尾做处理工作,如清理本地的部署空间
getFileMd5 ( $file ) : boolean 获取文件的MD5
getLinkCommand ( null $version ) : boolean 打软链
initLocalWorkspace ( Task $task ) : boolean | integer 初始化宿主机部署工作空间
initRemoteVersion ( $version ) : boolean 目标机器的版本库初始化 git 和 svn 没有任何区别, 只初始空目录
removeLocalProjectWorkspace ( $projectDir ) : boolean | integer 删除本地项目空间
scpCopyFiles ( Project $project, Task $task ) : boolean 将多个文件/目录通过tar + scp传输到指定的多个目标机

Protected Methods

Method Description
_copyPackageToServer ( $remoteHost, Project $project, Task $task ) : boolean
_copyPackageToServerByAnsible ( Project $project, Task $task ) : boolean
_packageFiles ( Project $project, Task $task ) : boolean
_unpackageFiles ( Project $project, Task $task ) : boolean
_unpackageFilesByAnsible ( Project $project, Task $task ) : boolean
excludes ( array $excludes ) : string rsync时,要排除的文件

Method Details

_copyPackageToServer() protected method

protected _copyPackageToServer ( $remoteHost, Project $project, Task $task ) : boolean
$remoteHost
$project app\models\Project
$task app\models\Task
return boolean

_copyPackageToServerByAnsible() protected method

protected _copyPackageToServerByAnsible ( Project $project, Task $task ) : boolean
$project app\models\Project
$task app\models\Task
return boolean

_packageFiles() protected method

protected _packageFiles ( Project $project, Task $task ) : boolean
$project app\models\Project
$task app\models\Task
return boolean

_unpackageFiles() protected method

protected _unpackageFiles ( Project $project, Task $task ) : boolean
$project app\models\Project
$task app\models\Task
return boolean

_unpackageFilesByAnsible() protected method

protected _unpackageFilesByAnsible ( Project $project, Task $task ) : boolean
$project app\models\Project
$task app\models\Task
return boolean

ansibleCopyFiles() public method

将多个文件/目录通过tar + ansible传输到指定的多个目标机
public ansibleCopyFiles ( Project $project, Task $task ) : boolean
$project app\models\Project
$task app\models\Task
return boolean

cleanUpLocal() public method

收尾做处理工作,如清理本地的部署空间
public cleanUpLocal ( $version ) : boolean | integer
$version
return boolean | integer

excludes() protected method

rsync时,要排除的文件
protected excludes ( array $excludes ) : string
$excludes array
return string

getFileMd5() public method

获取文件的MD5
public getFileMd5 ( $file ) : boolean
$file
return boolean

getLinkCommand() public method

打软链
public getLinkCommand ( null $version ) : boolean
$version null
return boolean

initLocalWorkspace() public method

初始化宿主机部署工作空间
public initLocalWorkspace ( Task $task ) : boolean | integer
$task app\models\Task
return boolean | integer

initRemoteVersion() public method

目标机器的版本库初始化 git 和 svn 没有任何区别, 只初始空目录
Author: wushuiyong
public initRemoteVersion ( $version ) : boolean
return boolean

removeLocalProjectWorkspace() public method

删除本地项目空间
public removeLocalProjectWorkspace ( $projectDir ) : boolean | integer
$projectDir
return boolean | integer

scpCopyFiles() public method

将多个文件/目录通过tar + scp传输到指定的多个目标机
public scpCopyFiles ( Project $project, Task $task ) : boolean
$project app\models\Project
$task app\models\Task
return boolean