jenkins

package
v0.0.0-...-bbb8ac2 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Jenkins

type Jenkins struct {
	JenkinsUsername string `required:"true"`
	JenkinsAPIToken string `required:"true"`
	JenkinsBaseURL  string `required:"true"`
	NatsChannel     string `required:"true"`
	NatsConn        *nats.Conn
}

Jenkins represents the configuration of how to connect to a Jenkins server using username and API token for authentication. The BaseURL follows the structure of `"http://myjenkinsserver:8080/job/%s/build"`

func Register

func Register() (*Jenkins, error)

Register is the function that creates a new instance of the Jenkins agent.

func (*Jenkins) Start

func (j *Jenkins) Start() chan bool

Start is the function that takes care of starting the agent and makes sure a file is creating to perform healthchecks in case the agent runs in a Docker container. By returning a boolean channel, it will make sure to create an infinite loop that can be ended grafecully by calling the stop method.

func (*Jenkins) Stop

func (j *Jenkins) Stop()

Stop takes care of the actions that need to be performed when gracefully shutting down the agent

Jump to

Keyboard shortcuts

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