Documentation ¶
Index ¶
- Constants
- type BasJenkins
- type BaseComponents
- func (c *BaseComponents) CleanUpLocal(version string) error
- func (c *BaseComponents) CleanUpReleasesVersion(versions []string) error
- func (c *BaseComponents) CopyFiles() error
- func (c *BaseComponents) GetAllHost() []string
- func (c *BaseComponents) GetDeployFromDir() string
- func (c *BaseComponents) GetExecFlush() error
- func (c *BaseComponents) GetGitLog() error
- func (c *BaseComponents) GetGitProjectName(gitUrl string) string
- func (c *BaseComponents) GetGitPull() error
- func (c *BaseComponents) GetGroupHost() map[int]string
- func (c *BaseComponents) GetHostIps() []string
- func (c *BaseComponents) GetHosts() []HostInfo
- func (c *BaseComponents) GetHosts_database() []HostInfo
- func (c *BaseComponents) GetHosts_jumpserver() []HostInfo
- func (c *BaseComponents) GetLinkCommand(version string) string
- func (c *BaseComponents) InitLocalWorkspace(version string) error
- func (c *BaseComponents) InitRemoteVersion(version string) error
- func (c *BaseComponents) LastDeploy(version string) error
- func (c *BaseComponents) LogTaskCommond(value interface{})
- func (c *BaseComponents) PostDeploy(version string) error
- func (c *BaseComponents) PreDeploy(version string) error
- func (c *BaseComponents) RemoveLocalProjectWorkspace() error
- func (c *BaseComponents) SaveRecord(command string) int
- func (c *BaseComponents) SaveRecordRes(id int, duration int, createdAt int, status int, value interface{})
- func (c *BaseComponents) SendP2pAgent(dirAgentPath string, destPath string) error
- func (c *BaseComponents) SetProject(project *models.Project)
- func (c *BaseComponents) SetTask(task *models.Task)
- func (c *BaseComponents) StartP2pAgent(ips []string, destPath string) error
- func (c *BaseComponents) TestReleaseDir() error
- func (c *BaseComponents) TestSsh() error
- func (c *BaseComponents) UpdateRemoteServers(version string) error
- type BaseFile
- type BaseGit
- func (c *BaseGit) DiffBetweenCommits(branch string, commitIdNew string, commitIdOld string) ([]string, error)
- func (c *BaseGit) GetBranchList() ([]map[string]string, error)
- func (c *BaseGit) GetCommitList(branch string, count int) ([]map[string]string, error)
- func (c *BaseGit) GetLastModifyInfo(branch string, filepath string) (map[string]string, error)
- func (c *BaseGit) GetTagList(count int) ([]map[string]string, error)
- func (c *BaseGit) SetBaseComponents(b BaseComponents)
- func (c *BaseGit) UpdateRepo(branch string, gitDir string) error
- func (c *BaseGit) UpdateToVersion() error
- type HostInfo
- type JenkinData
- type Ldap
Constants ¶
View Source
const SSHREMOTETIMEOUT = 600
View Source
const SSHTIMEOUT = 3600
View Source
const SSHWorker = 10
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BasJenkins ¶
type BasJenkins struct {
// contains filtered or unexported fields
}
func (*BasJenkins) GetCommitList ¶
func (c *BasJenkins) GetCommitList(count int) ([]JenkinData, error)
func (*BasJenkins) SetBaseComponents ¶
func (c *BasJenkins) SetBaseComponents(b BaseComponents)
type BaseComponents ¶
type BaseComponents struct {
// contains filtered or unexported fields
}
func (*BaseComponents) CleanUpLocal ¶
func (c *BaseComponents) CleanUpLocal(version string) error
*
- 清理空间
func (*BaseComponents) CleanUpReleasesVersion ¶
func (c *BaseComponents) CleanUpReleasesVersion(versions []string) error
*
- 清理远端空间
func (*BaseComponents) GetDeployFromDir ¶
func (c *BaseComponents) GetDeployFromDir() string
*
- 拼接宿主机的仓库目录
- {deploy_from}/{env}/{project}
func (*BaseComponents) GetExecFlush ¶
func (c *BaseComponents) GetExecFlush() error
func (*BaseComponents) GetGitLog ¶
func (c *BaseComponents) GetGitLog() error
func (*BaseComponents) GetGitProjectName ¶
func (c *BaseComponents) GetGitProjectName(gitUrl string) string
根据git地址获取项目名字
func (*BaseComponents) GetGitPull ¶
func (c *BaseComponents) GetGitPull() error
func (*BaseComponents) GetGroupHost ¶
func (c *BaseComponents) GetGroupHost() map[int]string
func (*BaseComponents) GetHosts ¶
func (c *BaseComponents) GetHosts() []HostInfo
func (*BaseComponents) GetHosts_database ¶
func (c *BaseComponents) GetHosts_database() []HostInfo
*
- 获取host
func (*BaseComponents) GetHosts_jumpserver ¶
func (c *BaseComponents) GetHosts_jumpserver() []HostInfo
func (*BaseComponents) GetLinkCommand ¶
func (c *BaseComponents) GetLinkCommand(version string) string
*
- 打软链
func (*BaseComponents) InitLocalWorkspace ¶
func (c *BaseComponents) InitLocalWorkspace(version string) error
*
- 初始化宿主机部署工作空间 *
func (*BaseComponents) InitRemoteVersion ¶
func (c *BaseComponents) InitRemoteVersion(version string) error
*
- 目标机器的版本库初始化
func (*BaseComponents) LastDeploy ¶
func (c *BaseComponents) LastDeploy(version string) error
func (*BaseComponents) LogTaskCommond ¶
func (c *BaseComponents) LogTaskCommond(value interface{})
func (*BaseComponents) PostDeploy ¶
func (c *BaseComponents) PostDeploy(version string) error
func (*BaseComponents) PreDeploy ¶
func (c *BaseComponents) PreDeploy(version string) error
func (*BaseComponents) RemoveLocalProjectWorkspace ¶
func (c *BaseComponents) RemoveLocalProjectWorkspace() error
*
- 清理项目目录 *
func (*BaseComponents) SaveRecord ¶
func (c *BaseComponents) SaveRecord(command string) int
func (*BaseComponents) SaveRecordRes ¶
func (c *BaseComponents) SaveRecordRes(id int, duration int, createdAt int, status int, value interface{})
func (*BaseComponents) SendP2pAgent ¶
func (c *BaseComponents) SendP2pAgent(dirAgentPath string, destPath string) error
*
- 发送p2p客户端并启动 *
func (*BaseComponents) SetProject ¶
func (c *BaseComponents) SetProject(project *models.Project)
func (*BaseComponents) SetTask ¶
func (c *BaseComponents) SetTask(task *models.Task)
func (*BaseComponents) StartP2pAgent ¶
func (c *BaseComponents) StartP2pAgent(ips []string, destPath string) error
func (*BaseComponents) TestReleaseDir ¶
func (c *BaseComponents) TestReleaseDir() error
*
- 检测php用户是否具有目标机release目录读写权限 *
func (*BaseComponents) UpdateRemoteServers ¶
func (c *BaseComponents) UpdateRemoteServers(version string) error
type BaseFile ¶
type BaseFile struct {
// contains filtered or unexported fields
}
func (*BaseFile) SetBaseComponents ¶
func (c *BaseFile) SetBaseComponents(b BaseComponents)
type BaseGit ¶
type BaseGit struct {
// contains filtered or unexported fields
}
func (*BaseGit) DiffBetweenCommits ¶
func (*BaseGit) GetLastModifyInfo ¶
func (*BaseGit) SetBaseComponents ¶
func (c *BaseGit) SetBaseComponents(b BaseComponents)
type JenkinData ¶
type JenkinData struct { Build string `json:"build"` TarUrl string `json:"tar_url"` MD5 interface{} `json:"md5"` }
*
- 获取提交历史 *
Click to show internal directories.
Click to hide internal directories.