jenkins

package
v0.0.0-...-fa18c62 Latest Latest
Warning

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

Go to latest
Published: May 6, 2016 License: Apache-2.0 Imports: 6 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 {
	Number int    `json:"number"`
	URL    string `json:"url"`
}

Build has information about a specific build

type JenkinsClient

type JenkinsClient struct {
	Host string
}

JenkinsClient is how we talk to the Jenkins instance

func (*JenkinsClient) GetConsoleLog

func (j *JenkinsClient) GetConsoleLog(name string, build int) (io.ReadCloser, error)

GetConsoleLog downloads the logs for a particular job and build number

func (*JenkinsClient) GetJob

func (j *JenkinsClient) GetJob(name string) (*Queue, error)

GetJob will get information about a single job

func (*JenkinsClient) GetLastCompletedBuild

func (j *JenkinsClient) GetLastCompletedBuild(name string) (*Job, error)

GetLastCompletedBuild does just that

type Job

type Job struct {
	Result    string `json:"result"`
	ID        string `json:"id"`
	Timestamp int    `json:"timestamp"`
}

Job containers information about a job

func (Job) IsStable

func (j Job) IsStable() bool

IsStable is really is success, but maybe there is a way to make it look at multiple runs...

type Queue

type Queue struct {
	Builds             []Build `json:"builds"`
	LastCompletedBuild Build   `json:"lastCompletedBuild"`
	LastStableBuild    Build   `json:"lastStableBuild"`
}

Queue has information about the last completed builg and the last stable build

Jump to

Keyboard shortcuts

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