jenkins

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2018 License: MIT Imports: 5 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 {
	Result    string `json:"result,omitempty"`
	Number    int    `json:"number,omitempty"`
	Timestamp int64  `json:"timestamp,omitempty"`
}

Build describes a build from the Jenkins API.

type Client

type Client struct {
	Baseurl  string `json:"base_url"`
	Username string `json:"username"`
	Token    string `json:"token"`
}

Client contains the information for connecting to a jenkins instance

func New

func New(uri, username, token string) *Client

New sets the authentication for the Jenkins client Password can be an API token as described in: https://wiki.jenkins-ci.org/display/JENKINS/Authenticating+scripted+clients

func (*Client) GetJobs

func (c *Client) GetJobs() ([]Job, error)

GetJobs gets the jobs for a Jenkins instance.

type Job

type Job struct {
	Name        string `json:"name,omitempty"`
	DisplayName string `json:"displayName,omitempty"`
	LastBuild   Build  `json:"lastBuild,omitempty"`
}

Job describes a job object from the Jenkins API.

type JobsResponse

type JobsResponse struct {
	Jobs []Job `json:"jobs,omitempty"`
}

JobsResponse describes a response for jobs.

Jump to

Keyboard shortcuts

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