Documentation ¶
Index ¶
- Constants
- func GetPatchCommands(modulePatch patch.ModulePatch, dir, patchPath string) []string
- type GitApplyPatchCommand
- type GitGetProjectCommand
- func (ggpc *GitGetProjectCommand) Execute(pluginLogger plugin.Logger, pluginCom plugin.PluginCommunicator, ...) error
- func (ggpc GitGetProjectCommand) GetPatch(pluginCom plugin.PluginCommunicator, pluginLogger plugin.Logger) (*patch.Patch, error)
- func (ggpc *GitGetProjectCommand) Name() string
- func (ggpc *GitGetProjectCommand) ParseParams(params map[string]interface{}) error
- func (ggpc *GitGetProjectCommand) Plugin() string
- type GitPlugin
Constants ¶
const ( GetProjectCmdName = "get_project" ApplyPatchCmdName = "apply_patch" GitPluginName = "git" GitPatchPath = "patch" GitPatchFilePath = "patchfile" )
Variables ¶
This section is empty.
Functions ¶
func GetPatchCommands ¶
func GetPatchCommands(modulePatch patch.ModulePatch, dir, patchPath string) []string
GetPatchCommands, given a module patch of a patch, will return the appropriate list of commands that need to be executed. If the patch is empty it will not apply the patch.
Types ¶
type GitApplyPatchCommand ¶
type GitApplyPatchCommand struct{}
GitApplyPatchCommand is deprecated. Its functionality is now a part of GitGetProjectCommand.
func (*GitApplyPatchCommand) Execute ¶
func (*GitApplyPatchCommand) Execute(pluginLogger plugin.Logger, pluginCom plugin.PluginCommunicator, conf *model.TaskConfig, stop chan bool) error
func (*GitApplyPatchCommand) Name ¶
func (*GitApplyPatchCommand) Name() string
func (*GitApplyPatchCommand) ParseParams ¶
func (*GitApplyPatchCommand) ParseParams(params map[string]interface{}) error
func (*GitApplyPatchCommand) Plugin ¶
func (*GitApplyPatchCommand) Plugin() string
type GitGetProjectCommand ¶
type GitGetProjectCommand struct { // The root directory (locally) that the code should be checked out into. // Must be a valid non-blank directory name. Directory string `plugin:"expand"` // Revisions are the optional revisions associated with the modules of a project. // Note: If a module does not have a revision it will use the module's branch to get the project. Revisions map[string]string `plugin:"expand"` }
GitGetProjectCommand is a command that fetches source code from git for the project associated with the current task
func (*GitGetProjectCommand) Execute ¶
func (ggpc *GitGetProjectCommand) Execute(pluginLogger plugin.Logger, pluginCom plugin.PluginCommunicator, conf *model.TaskConfig, stop chan bool) error
Execute gets the source code required by the project
func (GitGetProjectCommand) GetPatch ¶
func (ggpc GitGetProjectCommand) GetPatch(pluginCom plugin.PluginCommunicator, pluginLogger plugin.Logger) (*patch.Patch, error)
GetPatch tries to get the patch data from the server in json format, and unmarhals it into a patch struct. The GET request is attempted multiple times upon failure.
func (*GitGetProjectCommand) Name ¶
func (ggpc *GitGetProjectCommand) Name() string
func (*GitGetProjectCommand) ParseParams ¶
func (ggpc *GitGetProjectCommand) ParseParams(params map[string]interface{}) error
ParseParams parses the command's configuration. Fulfills the Command interface.
func (*GitGetProjectCommand) Plugin ¶
func (ggpc *GitGetProjectCommand) Plugin() string
type GitPlugin ¶
type GitPlugin struct{}
GitPlugin handles fetching source code and applying patches using the git version control system.