worker

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Worker

type Worker struct {
	// contains filtered or unexported fields
}

Worker works on a request for test build

func NewWorker

func NewWorker(amqpURI, jenkinsURL, jenkinsUser, jenkinsPassword, jenkinsProject string, cimsgenv string, cimsg *messages.RemoteBuildRequestMessage, envVars map[string]string, jenkinsBuild int, psbsize int, sshNodes *node.NodeList, final bool, tags []string, stripANSIColor bool, redact bool, gitUser, gitEmail string, retryLoopCount int, retryLoopBackoff time.Duration) *Worker

NewWorker creates a new worker struct. if standalone is true, then rabbitmq is not used for communication with requestor. Instead cimsg must be provided manually(see readme). amqpURI is full uri (including username and password) of rabbitmq server. jenkinsURL, jenkinsUser, jenkinsPassword, jenkinsProject are info related to jenkins (robot account is used for cancelling older builds by matching job parameter cienvmsg). cimsg is parsed CI message. to provide nessasary info to worker and also match and cleanup older jenkins jobs. envVars are envs to be exposed to the setup and run scripts . jenkinsBuild is current jenkins build number. psbSize is max buffer size for PrintStreamBuffer and sshNode is a parsed sshnodefile (see readme)

func (*Worker) Run

func (w *Worker) Run() (bool, error)

Run runs the worker and returns error if any.

func (*Worker) Shutdown

func (w *Worker) Shutdown() error

Shutdown shuts down the worker and returns error if any

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL