jenkins

package
v0.0.0-...-e35ac8e Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2022 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, cfg Config, idx *index.Index) error

Types

type API

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

func (*API) Do

func (api *API) Do(ctx context.Context, method, url string, body io.Reader) (io.ReadCloser, error)

func (*API) Jobs

func (api *API) Jobs() *Jobs

func (*API) Pipelines

func (api *API) Pipelines() *Pipelines

type Build

type Build struct {
	Number int `json:"number"`
}

type Config

type Config struct {
	BaseURL string           `json:"base_url" usage:"specify the base url of the jenkins instance we're indexing"`
	Jobs    *cli.StringSlice `json:"job"      usage:"provide an initial list of jobs to analyze"`
}

type GetJobResponse

type GetJobResponse struct {
	Builds []Build `json:"builds"`
}

type GetPipelineResponse

type GetPipelineResponse struct {
	ID                  string          `json:"id"`
	Status              string          `json:"status"`
	StartTimeMillis     int64           `json:"startTimeMillis"`
	DurationMillis      int64           `json:"durationMillis"`
	QueueDurationMillis int64           `json:"queueDurationMillis"`
	PauseDurationMillis int64           `json:"pauseDurationMillis"`
	Stages              []PipelineStage `json:"stages"`
}

type Job

type Job struct {
	Name string `json:"name"`
}

type Jobs

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

func (*Jobs) Get

func (jobs *Jobs) Get(ctx context.Context, project string) (*GetJobResponse, error)

func (*Jobs) List

func (jobs *Jobs) List(ctx context.Context) (*ListJobsResponse, error)

type ListJobsResponse

type ListJobsResponse struct {
	Jobs []Job `json:"jobs"`
}

type PipelineStage

type PipelineStage struct {
	ID                  string `json:"id"`
	Name                string `json:"name"`
	Status              string `json:"status"`
	StartTimeMillis     int64  `json:"startTimeMillis"`
	DurationMillis      int64  `json:"durationMillis"`
	PauseDurationMillis int64  `json:"pauseDurationMillis"`
}

type Pipelines

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

func (*Pipelines) Get

func (pipelines *Pipelines) Get(ctx context.Context, project string, build int) (*GetPipelineResponse, error)

Jump to

Keyboard shortcuts

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