jenkins

package
v0.0.0-...-b425644 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2019 License: Apache-2.0 Imports: 7 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 {
	Number string `xml:"number"`
	Url    string `xml:"url"`
}

type Builders

type Builders struct {
	Tasks []interface{} `xml:""`
}

type Client

type Client struct {
	Address string

	// custom http client to be used
	Client *http.Client
}

func (*Client) CreateJob

func (c *Client) CreateJob(name string, body io.Reader) error

func (*Client) DeleteJob

func (c *Client) DeleteJob(name string) error

func (*Client) Info

func (j *Client) Info() (info *Info, e error)

func (*Client) JobConfig

func (j *Client) JobConfig(name string) (*Config, error)

func (*Client) QueueInfo

func (j *Client) QueueInfo() ([]byte, error)

func (*Client) TriggerBuildWithParams

func (j *Client) TriggerBuildWithParams(name string, values url.Values) (string, error)

maybe also add add delay=0sec

func (*Client) UpdateJob

func (c *Client) UpdateJob(name string, body io.Reader) error

type Config

type Config struct {
	RAW                              string        `xml:"-"`
	XMLName                          xml.Name      `xml:"project"`
	KeepDependencies                 bool          `xml:"keepDependencies"`
	Properties                       []interface{} `xml:"properties>ignored"`
	Scm                              interface{}   `xml:"scm"`
	CanRoam                          bool          `xml:"canRoam"`                          // true</canRoam>
	Disabled                         bool          `xml:"disabled"`                         // false</disabled>
	BlockBuildWhenDownstreamBuilding bool          `xml:"blockBuildWhenDownstreamBuilding"` // false</blockBuildWhenDownstreamBuilding>
	BlockBuildWhenUpstreamBuilding   bool          `xml:"blockBuildWhenUpstreamBuilding"`   // false</blockBuildWhenUpstreamBuilding>
	ConcurrentBuild                  bool          `xml:"concurrentBuild"`
	//Triggers                         []interface{} `xml:"triggers>trigger"`
	// Builders                         []interface{}   `xml:"builders>builder"`
	SCMTrigger     []*SCMTrigger   `xml:"triggers>hudson.triggers.SCMTrigger"`
	ShellBuilders  []*ShellBuilder `xml:"builders>hudson.tasks.Shell"`
	TimerTriggers  []*TimerTrigger `xml:"triggers>hudson.triggers.TimerTrigger"`
	AssignedToNode string          `xml:"assignedNode,omitempty"`
	Publishers     []interface{}   `xml:"publishers>ignored"`
	LogRotator     *LogRotator     `xml:"logRotator,omitempty"`
}

type Info

type Info struct {
	XMLName xml.Name `xml:"hudson"`
	Jobs    []*Job   `xml:"job"`
}

type Job

type Job struct {
	Name                string   `xml:"name"`
	Url                 string   `xml:"url"`
	Color               string   `xml:"color"`
	DisplayName         string   `xml:"display_name"`
	Buildable           bool     `xml:"buildable"`
	Builds              []*Build `xml:"build"`
	FirstBuild          *Build   `xml:"firstBuild"`
	LastBuild           *Build   `xml:"lastBuild"`
	LastSuccessfulBuild *Build   `xml:"lastSuccessfulBuild"`
	LastStableBuild     *Build   `xml:"lastStableBuild"`
	LastCompletedBuild  *Build   `xml:"lastCompletedBuild"`
}

type LogRotator

type LogRotator struct {
	Class              string `xml:"class,attr"`
	DaysToKeep         int    `xml:"daysToKeep"`
	NumToKeep          int    `xml:"numToKeep"`
	ArtifactDaysToKeep int    `xml:"artifactDaysToKeep"`
	ArtifactNumToKeep  int    `xml:"artifactNumToKeep"`
}

func NewLogRotator

func NewLogRotator(n int) *LogRotator

type SCMTrigger

type SCMTrigger struct {
	XMLName xml.Name `xml:"hudson.triggers.SCMTrigger"`
}

type Scm

type Scm struct {
	Class         string `xml:"class,attr"`
	Plugin        string `xml:"plugin,attr,omitempty"`
	ConfigVersion int    `xml:"configVersion,omitempty"`
}

func NullScm

func NullScm() *Scm

type ShellBuilder

type ShellBuilder struct {
	Command string `xml:"command"`
}

type ShellTask

type ShellTask struct {
	XMLName xml.Name `xml:"hudson.tasks.Shell"`
	Command string   `xml:"command"`
}

type TimerTrigger

type TimerTrigger struct {
	XMLName xml.Name `xml:"hudson.triggers.TimerTrigger"`
	Spec    string   `xml:"spec"`
}

Jump to

Keyboard shortcuts

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