Documentation ¶
Index ¶
- type Action
- type Artifact
- type Auth
- type Branches
- type BranchesSpec
- type Build
- type BuildButtonColumn
- type Cause
- type ChangeSetItem
- type Column
- type Columns
- type Computer
- type ComputerObject
- type CrumbIssuer
- type GitBrowser
- type GitExtensions
- type GitSubmoduleCfg
- type Health
- type Item
- type Jenkins
- func (jenkins *Jenkins) AddJobToView(viewName string, job Job) error
- func (jenkins *Jenkins) Build(job Job, params url.Values) error
- func (jenkins *Jenkins) CreateJob(mavenJobItem MavenJobItem, jobName string) error
- func (jenkins *Jenkins) CreateView(listView ListView) error
- func (jenkins *Jenkins) DeleteJob(job Job) error
- func (jenkins *Jenkins) GetArtifact(build Build, artifact Artifact) ([]byte, error)
- func (jenkins *Jenkins) GetBuild(job Job, number int) (build Build, err error)
- func (jenkins *Jenkins) GetBuildConsoleOutput(build Build) ([]byte, error)
- func (jenkins *Jenkins) GetComputer(name string) (computer Computer, err error)
- func (jenkins *Jenkins) GetComputerObject() (co ComputerObject, err error)
- func (jenkins *Jenkins) GetComputers() ([]Computer, error)
- func (jenkins *Jenkins) GetJob(name string) (job Job, err error)
- func (jenkins *Jenkins) GetJobConfig(name string) (job MavenJobItem, err error)
- func (jenkins *Jenkins) GetJobs() ([]Job, error)
- func (jenkins *Jenkins) GetLastBuild(job Job) (build Build, err error)
- func (jenkins *Jenkins) GetQueue() (queue Queue, err error)
- func (jenkins *Jenkins) SetBuildDescription(build Build, description string) error
- type Job
- type JobColumn
- type JobProperties
- type JobSetting
- type JobSettings
- type LastDurationColumn
- type LastFailureColumn
- type LastSuccessColumn
- type ListView
- type LocalBranch
- type Locations
- type MavenJobItem
- type ParameterDefinition
- type PostBuilder
- type PostBuilders
- type Queue
- type RunPostStepsIfResult
- type Scm
- type ScmAuthor
- type ScmChangeSet
- type ScmChangeSetPath
- type ScmContent
- type ScmGit
- type ScmSvn
- type ScmSvnLocation
- type ScmTrigger
- type ShellBuilder
- type StatusColumn
- type Task
- type Trigger
- type Triggers
- type UpstreamCause
- type UserRemoteConfig
- type UserRemoteConfigs
- type WeatherColumn
- type WorkspaceUpdater
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct { Causes []Cause `json:"causes"` ParameterDefinitions []ParameterDefinition `json:"parameterDefinitions"` }
type Branches ¶
type Branches struct {
BranchesSpec []BranchesSpec `xml:"hudson.plugins.git.BranchSpec"`
}
type BranchesSpec ¶
type BranchesSpec struct {
Name string `xml:"name"`
}
type Build ¶
type Build struct { Id string `json:"id"` Number int `json:"number"` Url string `json:"url"` FullDisplayName string `json:"fullDisplayName"` Description string `json:"description"` Timestamp int `json:"timestamp"` Duration int `json:"duration"` EstimatedDuration int `json:"estimatedDuration"` Building bool `json:"building"` KeepLog bool `json:"keepLog"` Result string `json:"result"` Artifacts []Artifact `json:"artifacts"` Actions []Action `json:"actions"` ChangeSet ScmChangeSet `json:"changeSet"` }
type BuildButtonColumn ¶
type Cause ¶
type Cause struct { ShortDescription string `json:"shortDescription"` UserId string `json:"userId"` UserName string `json:"userName"` UpstreamCause }
type ChangeSetItem ¶
type ChangeSetItem struct { AffectedPaths []string `json:"affectedPaths"` CommitId string `json:"commitId"` Timestamp int `json:"timestamp"` Author ScmAuthor `json:"author"` Comment string `json:"comment"` Date string `json:"date"` Id string `json:"id"` Message string `json:"msg"` Paths []ScmChangeSetPath `json:"paths"` }
type Computer ¶
type Computer struct { Actions []struct{} `json:"actions"` DisplayName string `json:"displayName"` Executors []struct{} `json:"executors"` Idle bool `json:"idle"` JnlpAgent bool `json:"jnlpAgent"` LaunchSupported bool `json:"launchSupported"` ManualLaunchAllowed bool `json:"manualLaunchAllowed"` MonitorData struct { SwapSpaceMonitor struct { AvailablePhysicalMemory int64 `json:"availablePhysicalMemory"` AvailableSwapSpace int64 `json:"availableSwapSpace"` TotalPhysicalMemory int64 `json:"totalPhysicalMemory"` TotalSwapSpace int64 `json:"totalSwapSpace"` } `json:"hudson.node_monitors.SwapSpaceMonitor"` TemporarySpaceMonitor struct { Timestamp int64 `json:"timestamp"` Path string `json:"path"` Size int64 `json:"size"` } `json:"hudson.node_monitors.TemporarySpaceMonitor"` DiskSpaceMonitor struct { Timestamp int64 `json:"timestamp"` Path string `json:"path"` Size int64 `json:"size"` } `json:"hudson.node_monitors.DiskSpaceMonitor"` ArchitectureMonitor string `json:"hudson.node_monitors.ArchitectureMonitor"` ResponseTimeMonitor struct { Timestamp int64 `json:"timestamp"` Average int64 `json:"average"` } `json:"hudson.node_monitors.ResponseTimeMonitor"` ClockMonitor struct { Diff int64 `json:"diff"` } `json:"hudson.node_monitors.ClockMonitor"` } `json:"monitorData"` NumExecutors int `json:"numExecutors"` Offline bool `json:"offline"` OfflineCauseReason string `json:"offlineCauseReason"` TemporarilyOffline bool `json:"temporarilyOffline"` }
type ComputerObject ¶
type CrumbIssuer ¶
type GitBrowser ¶
type GitExtensions ¶
type GitExtensions struct { Class string `xml:"class,attr"` LocalBranch LocalBranch `xml:"hudson.plugins.git.extensions.impl.LocalBranch"` }
type GitSubmoduleCfg ¶
type GitSubmoduleCfg struct {
Class string `xml:"class,attr"`
}
type Item ¶
type Item struct { Actions []Action `json:"actions"` Blocked bool `json:"blocked"` Buildable bool `json:"buildable"` Id int `json:"id"` InQueueSince int64 `json:"inQueueSince"` Params string `json:"params"` Stuck bool `json:"stuck"` Task Task `json:"task"` URL string `json:"url"` Why string `json:"why"` BuildableStartMilliseconds int64 `json:"buildableStartMilliseconds"` Pending bool `json:"pending"` }
type Jenkins ¶
type Jenkins struct {
// contains filtered or unexported fields
}
func NewJenkins ¶
func (*Jenkins) AddJobToView ¶
Add job to view
func (*Jenkins) CreateJob ¶
func (jenkins *Jenkins) CreateJob(mavenJobItem MavenJobItem, jobName string) error
Create a new job
func (*Jenkins) CreateView ¶
Create a new view
func (*Jenkins) GetArtifact ¶
GetArtifact return the content of a build artifact
func (*Jenkins) GetBuildConsoleOutput ¶
Get the console output from a build.
func (*Jenkins) GetComputer ¶
GetComputer returns a Computer object with a specified name.
func (*Jenkins) GetComputerObject ¶
func (jenkins *Jenkins) GetComputerObject() (co ComputerObject, err error)
GetComputerObject returns the main ComputerObject
func (*Jenkins) GetComputers ¶
GetComputers returns the list of all Computer objects
func (*Jenkins) GetJobConfig ¶
func (jenkins *Jenkins) GetJobConfig(name string) (job MavenJobItem, err error)
GetJobConfig returns a maven job, has the one used to create Maven job
func (*Jenkins) GetLastBuild ¶
GetLastBuild returns the last build of specified job.
type Job ¶
type Job struct { Actions []Action `json:"actions"` Name string `json:"name"` Url string `json:"url"` Color string `json:"color"` Buildable bool `json:"buildable"` DisplayName string `json:"displayName"` Description string `json:"description"` HealthReport []Health `json:"healthReport"` LastCompletedBuild Build `json:"lastCompletedBuild"` LastFailedBuild Build `json:"lastFailedBuild"` LastStableBuild Build `json:"lastStableBuild"` LastSuccessfulBuild Build `json:"lastSuccessfulBuild"` LastUnstableBuild Build `json:"lastUnstableBuild"` LastUnsuccessfulBuild Build `json:"lastUnsuccessfulBuild"` }
type JobProperties ¶
type JobProperties struct { }
type JobSetting ¶
type JobSetting struct { }
type JobSettings ¶
type JobSettings struct { Class string `xml:"class,attr"` JobSetting []JobSetting }
type LastDurationColumn ¶
type LastFailureColumn ¶
type LastSuccessColumn ¶
type ListView ¶
type ListView struct { XMLName xml.Name `xml:"hudson.model.ListView"` Name string `xml:"name"` FilterExecutors bool `xml:"filterExecutors"` FilterQueue bool `xml:"filterQueue"` Columns Columns `xml:"columns"` }
func NewListView ¶
type LocalBranch ¶
type LocalBranch struct {
LocalBranch string `xml:"localBranch"`
}
type Locations ¶
type Locations struct {
Location []ScmSvnLocation `xml:"hudson.scm.SubversionSCM_-ModuleLocation"`
}
type MavenJobItem ¶
type MavenJobItem struct { XMLName struct{} `xml:"maven2-moduleset"` Plugin string `xml:"plugin,attr"` Actions string `xml:"actions"` Description string `xml:"description"` KeepDependencies string `xml:"keepDependencies"` Properties JobProperties `xml:"properties"` Scm Scm `xml:"scm"` CanRoam string `xml:"canRoam"` Disabled string `xml:"disabled"` BlockBuildWhenDownstreamBuilding string `xml:"blockBuildWhenDownstreamBuilding"` BlockBuildWhenUpstreamBuilding string `xml:"blockBuildWhenUpstreamBuilding"` Triggers Triggers `xml:"triggers"` ConcurrentBuild string `xml:"concurrentBuild"` Goals string `xml:"goals"` AggregatorStyleBuild string `xml:"aggregatorStyleBuild"` IncrementalBuild string `xml:"incrementalBuild"` IgnoreUpstremChanges string `xml:"ignoreUpstremChanges"` ArchivingDisabled string `xml:"archivingDisabled"` SiteArchivingDisabled string `xml:"siteArchivingDisabled"` FingerprintingDisabled string `xml:"fingerprintingDisabled"` ResolveDependencies string `xml:"resolveDependencies"` ProcessPlugins string `xml:"processPlugins"` MavenName string `xml:"mavenName"` MavenValidationLevel string `xml:"mavenValidationLevel"` DefaultGoals string `xml:"defaultGoals"` RunHeadless string `xml:"runHeadless"` DisableTriggerDownstreamProjects string `xml:"disableTriggerDownstreamProjects"` Settings JobSettings `xml:"settings"` GlobalSettings JobSettings `xml:"globalSettings"` RunPostStepsIfResult RunPostStepsIfResult `xml:"runPostStepsIfResult"` Postbuilders PostBuilders `xml:"postbuilders"` }
type ParameterDefinition ¶
type ParameterDefinition struct {
Name string `json:"name"`
}
type PostBuilder ¶
type PostBuilder interface { }
type PostBuilders ¶
type PostBuilders struct { XMLName xml.Name `xml:"postbuilders"` PostBuilder []PostBuilder }
type RunPostStepsIfResult ¶
type Scm ¶
type Scm struct { ScmContent Class string `xml:"class,attr"` Plugin string `xml:"plugin,attr"` }
func (*Scm) UnmarshalXML ¶
UnmarshalXML implements xml.UnmarshalXML intrface Decode between multiple types of Scm. for now only SVN is supported
type ScmChangeSet ¶
type ScmChangeSet struct { Kind string `json:"kind"` Items []ChangeSetItem `json:"items"` }
type ScmChangeSetPath ¶
type ScmContent ¶
type ScmContent interface{}
type ScmGit ¶
type ScmGit struct { UserRemoteConfigs UserRemoteConfigs `xml:"userRemoteConfigs"` Branches Branches `xml:"branches"` DoGenerateSubmoduleConfigurations bool `xml:"doGenerateSubmoduleConfigurations"` GitBrowser GitBrowser `xml:"browser"` GitSubmoduleCfg GitSubmoduleCfg `xml:"submoduleCfg"` GitExtensions GitExtensions `xml:"extensions"` }
type ScmSvn ¶
type ScmSvn struct { Locations Locations `xml:"locations"` ExcludedRegions string `xml:"excludedRegions"` IncludedRegions string `xml:"includedRegions"` ExcludedUsers string `xml:"excludedUsers"` ExcludedRevprop string `xml:"excludedRevprop"` ExcludedCommitMessages string `xml:"excludedCommitMessages"` WorkspaceUpdater WorkspaceUpdater `xml:"workspaceUpdater"` IgnoreDirPropChanges string `xml:"ignoreDirPropChanges"` FilterChangelog string `xml:"filterChangelog"` }
type ScmSvnLocation ¶
type ScmTrigger ¶
type ShellBuilder ¶
type StatusColumn ¶
type UpstreamCause ¶
type UserRemoteConfig ¶
type UserRemoteConfig struct {
Urls []string `xml:"url"`
}
type UserRemoteConfigs ¶
type UserRemoteConfigs struct {
UserRemoteConfig UserRemoteConfig `xml:"hudson.plugins.git.UserRemoteConfig"`
}
type WeatherColumn ¶
type WorkspaceUpdater ¶
type WorkspaceUpdater struct {
Class string `xml:"class,attr"`
}
Click to show internal directories.
Click to hide internal directories.