jenkins

package
v0.0.0-...-5666d16 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Build

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

type BuildRequest

type BuildRequest struct {
	JobName string
	Refs    string
	Number  int
	BaseRef string
	BaseSHA string
	PullSHA string
}

type Client

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

func NewClient

func NewClient(url, user, token string) *Client

func NewDryRunClient

func NewDryRunClient(url, user, token string) *Client

func (*Client) Build

func (c *Client) Build(br BuildRequest) (*Build, error)

Build triggers the job on Jenkins with an ID parameter that will let us track it.

func (*Client) Enqueued

func (c *Client) Enqueued(b *Build) (bool, error)

Enqueued returns whether or not the given build is in Jenkins' build queue.

func (*Client) QueueSize

func (c *Client) QueueSize() (int, error)

QueueSize returns how much is in the queue.

func (*Client) Status

func (c *Client) Status(b *Build) (*Status, error)

Status returns the current status of the build.

type Status

type Status struct {
	Building bool
	Success  bool
	Number   int
}

Status is a build result from Jenkins. If it is still building then Success is meaningless. If it is enqueued then both Success and Number are meaningless.

Jump to

Keyboard shortcuts

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