jengo_src

package
v1.3.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Trace   *log.Logger
	Info    *log.Logger
	Warning *log.Logger
	Error   *log.Logger
)

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 Init

func Init(
	traceHandle io.Writer,
	infoHandle io.Writer,
	warningHandle io.Writer,
	errorHandle io.Writer)

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)

func YAMLNode added in v1.3.6

func YAMLNode(node Computer)

func YAMLNodes added in v1.3.6

func YAMLNodes(nodes NodesResponse)

Types

type AssignedLabels added in v1.3.6

type AssignedLabels struct {
	Name string `yaml:"name"`
}

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 Computer added in v1.3.6

type Computer struct {
	Class               string           `yaml:"_class"`
	Actions             []interface{}    `yaml:"actions"`
	AssignedLabels      []AssignedLabels `yaml:"assignedLabels"`
	Description         string           `yaml:"description"`
	DisplayName         string           `yaml:"displayName"`
	Executors           []Executors      `yaml:"executors"`
	Icon                string           `yaml:"icon"`
	IconClassName       string           `yaml:"iconClassName"`
	Idle                bool             `yaml:"idle"`
	JnlpAgent           bool             `yaml:"jnlpAgent"`
	LaunchSupported     bool             `yaml:"launchSupported"`
	LoadStatistics      LoadStatistics   `yaml:"loadStatistics"`
	ManualLaunchAllowed bool             `yaml:"manualLaunchAllowed"`
	MonitorData         MonitorData      `yaml:"monitorData"`
	NumExecutors        int              `yaml:"numExecutors"`
	Offline             bool             `yaml:"offline"`
	OfflineCause        interface{}      `yaml:"offlineCause"`
	OfflineCauseReason  string           `yaml:"offlineCauseReason"`
	OneOffExecutors     []interface{}    `yaml:"oneOffExecutors"`
	TemporarilyOffline  bool             `yaml:"temporarilyOffline"`
}

func GetNode added in v1.3.6

func GetNode(node_name string) (obj Computer)

type Executors added in v1.3.6

type Executors struct {
}

type HudsonNodeMonitorsClockMonitor added in v1.3.6

type HudsonNodeMonitorsClockMonitor struct {
	Class string `yaml:"_class"`
	Diff  int    `yaml:"diff"`
}

type HudsonNodeMonitorsDiskSpaceMonitor added in v1.3.6

type HudsonNodeMonitorsDiskSpaceMonitor struct {
	Class     string `yaml:"_class"`
	Timestamp int64  `yaml:"timestamp"`
	Path      string `yaml:"path"`
	Size      int64  `yaml:"size"`
}

type HudsonNodeMonitorsResponseTimeMonitor added in v1.3.6

type HudsonNodeMonitorsResponseTimeMonitor struct {
	Class     string `yaml:"_class"`
	Timestamp int64  `yaml:"timestamp"`
	Average   int    `yaml:"average"`
}

type HudsonNodeMonitorsSwapSpaceMonitor added in v1.3.6

type HudsonNodeMonitorsSwapSpaceMonitor struct {
	Class                   string `yaml:"_class"`
	AvailablePhysicalMemory int    `yaml:"availablePhysicalMemory"`
	AvailableSwapSpace      int    `yaml:"availableSwapSpace"`
	TotalPhysicalMemory     int    `yaml:"totalPhysicalMemory"`
	TotalSwapSpace          int    `yaml:"totalSwapSpace"`
}

type HudsonNodeMonitorsTemporarySpaceMonitor added in v1.3.6

type HudsonNodeMonitorsTemporarySpaceMonitor struct {
	Class     string `yaml:"_class"`
	Timestamp int64  `yaml:"timestamp"`
	Path      string `yaml:"path"`
	Size      int64  `yaml:"size"`
}

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 LoadStatistics added in v1.3.6

type LoadStatistics struct {
	Class string `yaml:"_class"`
}

type MonitorData added in v1.3.6

type MonitorData struct {
	HudsonNodeMonitorsSwapSpaceMonitor      HudsonNodeMonitorsSwapSpaceMonitor      `yaml:"hudson.node_monitors.SwapSpaceMonitor"`
	HudsonNodeMonitorsTemporarySpaceMonitor HudsonNodeMonitorsTemporarySpaceMonitor `yaml:"hudson.node_monitors.TemporarySpaceMonitor"`
	HudsonNodeMonitorsDiskSpaceMonitor      HudsonNodeMonitorsDiskSpaceMonitor      `yaml:"hudson.node_monitors.DiskSpaceMonitor"`
	HudsonNodeMonitorsArchitectureMonitor   string                                  `yaml:"hudson.node_monitors.ArchitectureMonitor"`
	HudsonNodeMonitorsResponseTimeMonitor   HudsonNodeMonitorsResponseTimeMonitor   `yaml:"hudson.node_monitors.ResponseTimeMonitor"`
	HudsonNodeMonitorsClockMonitor          HudsonNodeMonitorsClockMonitor          `yaml:"hudson.node_monitors.ClockMonitor"`
}

type NodesResponse added in v1.3.6

type NodesResponse struct {
	BusyExecutors  int        `yaml:"busyExecutors"`
	Computer       []Computer `yaml:"computer"`
	DisplayName    string     `yaml:"displayName"`
	TotalExecutors int        `yaml:"totalExecutors"`
}

func ListNodes added in v1.3.6

func ListNodes() (obj NodesResponse)

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