jengo_src

package
v1.2.7 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateRequest

func CreateRequest(METHOD string, URL string) *http.Request

func GetBaseURL

func GetBaseURL() string

func GetEndpoint

func GetEndpoint(Kwargs map[string]interface{}) string

func HandleRequest

func HandleRequest(METHOD string, Kwargs map[string]interface{}) ([]byte, error)

func ListBuilds

func ListBuilds(job_name string) (res [][]string)

func ListJobs

func ListJobs() (res [][]string)

func PrepareUrl

func PrepareUrl(url string) string

func TableBuilds

func TableBuilds(jobs [][]string)

func TableJobs

func TableJobs(jobs [][]string)

func YAMLBuild

func YAMLBuild(build BuildResponse)

func YAMLJob

func YAMLJob(job JobResponse)

Types

type BuildL

type BuildL struct {
	ID                string `yaml:"id"`
	Number            int    `yaml:"number"`
	Timestamp         int64  `yaml:"timestamp"`
	Result            string `yaml:"result"`
	URL               string `yaml:"url"`
	EstimatedDuration int    `yaml:"estimatedDuration"`
	Duration          int    `yaml:"duration"`
	Description       string `yaml:"description"`
}

type BuildListResponse

type BuildListResponse struct {
	Builds []BuildL `yaml:"builds"`
}

type BuildResponse

type BuildResponse struct {
	ID                string      `yaml:"id"`
	Number            int         `yaml:"number"`
	Timestamp         int64       `yaml:"timestamp"`
	Result            string      `yaml:"result"`
	URL               string      `yaml:"url"`
	EstimatedDuration int         `yaml:"estimatedDuration"`
	Duration          int         `yaml:"duration"`
	Description       interface{} `yaml:"description"`
	FullDisplayName   string      `yaml:"fullDisplayName"`
	Building          bool        `yaml:"building"`
	DisplayName       string      `yaml:"displayName"`
	Executor          interface{} `yaml:"executor"`
	KeepLog           bool        `yaml:"keepLog"`
	QueueID           int         `yaml:"queueId"`
}

func GetBuild

func GetBuild(job_name string, build_name string) (obj BuildResponse)

type JenkinsClient

type JenkinsClient struct {
	Name     string `yaml:"name"`
	URL      string `yaml:"url"`
	Username string `yaml:"username"`
	Token    string `yaml:"token"`
}

func GetClient

func GetClient() JenkinsClient

type JobL

type JobL struct {
	Name        string `yaml:"name"`
	Color       string `yaml:"color"`
	Buildable   bool   `yaml:"buildable"`
	URL         string `yaml:"url"`
	Description string `yaml:"description"`
}

type JobListResponse

type JobListResponse struct {
	Jobs []JobL `yaml:"jobs"`
}

type JobRawResponse

type JobRawResponse struct {
	Class       string `yaml:"_class"`
	Description string `yaml:"description"`
	FullName    string `yaml:"fullName"`
	Name        string `yaml:"name"`
	URL         string `yaml:"url"`
	Buildable   bool   `yaml:"buildable"`
	Builds      []struct {
		Class  string `yaml:"_class"`
		Number int    `yaml:"number"`
		URL    string `yaml:"url"`
	} `yaml:"builds"`
	Color        string `yaml:"color"`
	HealthReport []struct {
		Description string `yaml:"description"`
		Score       int    `yaml:"score"`
	} `yaml:"healthReport"`
	InQueue         bool `yaml:"inQueue"`
	NextBuildNumber int  `yaml:"nextBuildNumber"`
	ConcurrentBuild bool `yaml:"concurrentBuild"`
	ResumeBlocked   bool `yaml:"resumeBlocked"`
}

type JobResponse

type JobResponse struct {
	FullName         string `yaml:"fullName"`
	Name             string `yaml:"name"`
	Description      string `yaml:"description"`
	URL              string `yaml:"url"`
	Buildable        bool   `yaml:"buildable"`
	Color            string `yaml:"color"`
	Builds           int    `yaml:"builds"`
	LastHealthReport struct {
		Description string `yaml:"description"`
		Score       int    `yaml:"score"`
	} `yaml:"healthReport"`
	InQueue         bool `yaml:"inQueue"`
	NextBuildNumber int  `yaml:"nextBuildNumber"`
	ConcurrentBuild bool `yaml:"concurrentBuild"`
	ResumeBlocked   bool `yaml:"resumeBlocked"`
}

func GetJob

func GetJob(job_name string) (out_obj JobResponse)

type Kwargs

type Kwargs map[string]interface{}

type YAMLConfig

type YAMLConfig struct {
	Contexts []JenkinsClient
	// contains filtered or unexported fields
}

func (YAMLConfig) GetCurrent

func (config YAMLConfig) GetCurrent() JenkinsClient

Jump to

Keyboard shortcuts

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