client

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2022 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client type

func NewClient

func NewClient(cfg *config.Config, streams *types.IOStreams) (*Client, error)

NewClient function to get client instance

func (*Client) Build

func (jc *Client) Build(name string, parameters map[string]string) (int64, error)

Build a job with parameters returns queue id

func (*Client) CreateJob

func (jc *Client) CreateJob(jobName string, xmlData string) (string, error)

Build a job with parameters

func (*Client) DownloadArtifacts

func (jc *Client) DownloadArtifacts(jobName string, buildNumber int, toDirectory string) (string, error)

DownloadArtifacts of a build

func (*Client) GetBuild

func (jc *Client) GetBuild(jobName string, buildNumber int, withConsole bool) (*jenkinsTY.BuildResponse, error)

GetBuild returns build details of a job

func (*Client) GetBuildByQueueID added in v1.1.0

func (jc *Client) GetBuildByQueueID(jobName string, queueID int64, limit int) (*jenkinsTY.BuildResponse, error)

returns build details based on queue id

func (*Client) GetConsole

func (jc *Client) GetConsole(jobName string, buildNumber int, watch bool) (string, error)

GetConsole returns/prints build console log

func (*Client) ListBuilds

func (jc *Client) ListBuilds(jobName string, limit int, withConsole bool) ([]jenkinsTY.BuildResponse, error)

ListBuilds details

func (*Client) ListJobs

func (jc *Client) ListJobs(depth int) ([]gojenkins.InnerJob, error)

ListJobs details

func (*Client) ListParameters

func (jc *Client) ListParameters(jobName string) ([]gojenkins.ParameterDefinition, error)

ListParameters of a job

func (*Client) Status

func (jc *Client) Status() (*gojenkins.ExecutorResponse, error)

Status of the server

func (*Client) Version

func (jc *Client) Version() string

Jump to

Keyboard shortcuts

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