Documentation ¶
Index ¶
- Constants
- func AttachFilesHandler(w http.ResponseWriter, r *http.Request)
- func AttachResultsHandler(w http.ResponseWriter, r *http.Request)
- func SendJSONLogs(taskConfig *model.TaskConfig, pluginLogger plugin.Logger, ...) (string, error)
- func SendJSONResults(taskConfig *model.TaskConfig, pluginLogger plugin.Logger, ...) error
- type AttachPlugin
- func (self *AttachPlugin) Configure(map[string]interface{}) error
- func (self *AttachPlugin) GetAPIHandler() http.Handler
- func (self *AttachPlugin) GetPanelConfig() (*plugin.PanelConfig, error)
- func (self *AttachPlugin) GetUIHandler() http.Handler
- func (self *AttachPlugin) Name() string
- func (self *AttachPlugin) NewCommand(cmdName string) (plugin.Command, error)
- type AttachResultsCommand
- type AttachTaskFilesCommand
- func (self *AttachTaskFilesCommand) Execute(pluginLogger plugin.Logger, pluginCom plugin.PluginCommunicator, ...) error
- func (self *AttachTaskFilesCommand) Name() string
- func (self *AttachTaskFilesCommand) ParseParams(params map[string]interface{}) error
- func (self *AttachTaskFilesCommand) Plugin() string
- func (self *AttachTaskFilesCommand) SendTaskFiles(taskConfig *model.TaskConfig, pluginLogger plugin.Logger, ...) error
- type AttachXUnitResultsCommand
- func (self *AttachXUnitResultsCommand) Execute(pluginLogger plugin.Logger, pluginCom plugin.PluginCommunicator, ...) error
- func (self *AttachXUnitResultsCommand) Name() string
- func (self *AttachXUnitResultsCommand) ParseParams(params map[string]interface{}) error
- func (self *AttachXUnitResultsCommand) Plugin() string
Constants ¶
const ( AttachPluginName = "attach" AttachResultsCmd = "results" AttachXunitResultsCmd = "xunit_results" AttachTaskFilesCmd = "task_files" AttachResultsAPIEndpoint = "results" AttachLogsAPIEndpoint = "test_logs" AttachTaskFilesAPIEndpoint = "task_files" AttachResultsPostRetries = 5 AttachResultsRetrySleepSec = 10 * time.Second )
Variables ¶
This section is empty.
Functions ¶
func AttachFilesHandler ¶
func AttachFilesHandler(w http.ResponseWriter, r *http.Request)
AttachFilesHandler updates file mappings for a task or build
func AttachResultsHandler ¶
func AttachResultsHandler(w http.ResponseWriter, r *http.Request)
XXX remove this once the transition is complete... AttachResultsHandler is an API hook for receiving and updating test results
func SendJSONLogs ¶
func SendJSONLogs(taskConfig *model.TaskConfig, pluginLogger plugin.Logger, pluginCom plugin.PluginCommunicator, logs *model.TestLog) (string, error)
SendJSONLogs is responsible for sending the specified logs to the API Server. If successful, it returns a log ID that can be used to refer to the log object in test results.
func SendJSONResults ¶
func SendJSONResults(taskConfig *model.TaskConfig, pluginLogger plugin.Logger, pluginCom plugin.PluginCommunicator, results *model.TestResults) error
SendJSONResults is responsible for sending the specified file to the API Server
Types ¶
type AttachPlugin ¶
type AttachPlugin struct{}
AttachPlugin has commands for uploading task results and links to files, for display and easy access in the UI.
func (*AttachPlugin) Configure ¶
func (self *AttachPlugin) Configure(map[string]interface{}) error
func (*AttachPlugin) GetAPIHandler ¶
func (self *AttachPlugin) GetAPIHandler() http.Handler
func (*AttachPlugin) GetPanelConfig ¶
func (self *AttachPlugin) GetPanelConfig() (*plugin.PanelConfig, error)
GetPanelConfig returns a plugin.PanelConfig struct representing panels that will be added to the Task and Build pages.
func (*AttachPlugin) GetUIHandler ¶
func (self *AttachPlugin) GetUIHandler() http.Handler
func (*AttachPlugin) Name ¶
func (self *AttachPlugin) Name() string
Name returns the name of this plugin - it serves to satisfy the 'Plugin' interface
func (*AttachPlugin) NewCommand ¶
func (self *AttachPlugin) NewCommand(cmdName string) (plugin.Command, error)
NewCommand returns the AttachPlugin - this is to satisfy the 'Plugin' interface
type AttachResultsCommand ¶
type AttachResultsCommand struct { // FileLoc describes the relative path of the file to be sent. // Note that this can also be described via expansions. FileLoc string `mapstructure:"file_location" plugin:"expand"` }
AttachResultsCommand is used to attach MCI test results in json format to the task page.
func (*AttachResultsCommand) Execute ¶
func (self *AttachResultsCommand) Execute(pluginLogger plugin.Logger, pluginCom plugin.PluginCommunicator, taskConfig *model.TaskConfig, stop chan bool) error
Execute carries out the AttachResultsCommand command - this is required to satisfy the 'Command' interface
func (*AttachResultsCommand) Name ¶
func (self *AttachResultsCommand) Name() string
func (*AttachResultsCommand) ParseParams ¶
func (self *AttachResultsCommand) ParseParams(params map[string]interface{}) error
ParseParams decodes the S3 push command parameters that are specified as part of an AttachPlugin command; this is required to satisfy the 'Command' interface
func (*AttachResultsCommand) Plugin ¶
func (self *AttachResultsCommand) Plugin() string
type AttachTaskFilesCommand ¶
type AttachTaskFilesCommand struct { // Files is a map of strings to strings storing // name -> link pairs. These pairs are sent to the // server and attached to a task. Files artifact.Params }
AttachTaskFilesCommand sends a mapping of filename -> link to the api server, so users can attach arbitrary files and links to a task
func (*AttachTaskFilesCommand) Execute ¶
func (self *AttachTaskFilesCommand) Execute(pluginLogger plugin.Logger, pluginCom plugin.PluginCommunicator, taskConfig *model.TaskConfig, stop chan bool) error
Execute carries out the AttachResultsCommand command - this is required to satisfy the 'Command' interface
func (*AttachTaskFilesCommand) Name ¶
func (self *AttachTaskFilesCommand) Name() string
func (*AttachTaskFilesCommand) ParseParams ¶
func (self *AttachTaskFilesCommand) ParseParams( params map[string]interface{}) error
ParseParams decodes the S3 push command parameters that are specified as part of an AttachPlugin command; this is required to satisfy the 'Command' interface
func (*AttachTaskFilesCommand) Plugin ¶
func (self *AttachTaskFilesCommand) Plugin() string
func (*AttachTaskFilesCommand) SendTaskFiles ¶
func (self *AttachTaskFilesCommand) SendTaskFiles(taskConfig *model.TaskConfig, pluginLogger plugin.Logger, pluginCom plugin.PluginCommunicator) error
SendJSONResults is responsible for sending the specified file to the API Server
type AttachXUnitResultsCommand ¶
type AttachXUnitResultsCommand struct { // File describes the relative path of the file to be sent. Supports globbing. // Note that this can also be described via expansions. File string `mapstructure:"file" plugin:"expand"` }
AttachXUnitResultsCommand reads in an xml file of xunit type results and converts them to a format MCI can use
func (*AttachXUnitResultsCommand) Execute ¶
func (self *AttachXUnitResultsCommand) Execute(pluginLogger plugin.Logger, pluginCom plugin.PluginCommunicator, taskConfig *model.TaskConfig, stop chan bool) error
Execute carries out the AttachResultsCommand command - this is required to satisfy the 'Command' interface
func (*AttachXUnitResultsCommand) Name ¶
func (self *AttachXUnitResultsCommand) Name() string
func (*AttachXUnitResultsCommand) ParseParams ¶
func (self *AttachXUnitResultsCommand) ParseParams( params map[string]interface{}) error
ParseParams reads and validates the command parameters. This is required to satisfy the 'Command' interface
func (*AttachXUnitResultsCommand) Plugin ¶
func (self *AttachXUnitResultsCommand) Plugin() string