Versions in this module Expand all Collapse all v1 v1.0.1 Nov 25, 2019 Changes in this version + const ClassUsernameCredentials + const KeySourceDirectEntryType + const KeySourceOnMasterType + type APIRequest struct + Endpoint string + Headers http.Header + Method string + Payload io.Reader + Suffix string + func NewAPIRequest(method string, endpoint string, payload io.Reader) *APIRequest + func (ar *APIRequest) SetHeader(key string, value string) *APIRequest type Build + func (b *Build) GetAllFingerPrints() []*FingerPrint + func (b *Build) GetConsoleOutputFromIndex(startID int64) (consoleResponse, error) + func (b *Build) GetInjectedEnvVars() (map[string]string, error) + func (b *Build) GetRevisionBranch() string + func (b *Build) SetDescription(description string) error + type BuildResponse struct + Actions []generalObj + Artifacts []struct{ ... } + Building bool + BuiltOn string + ChangeSet struct{ ... } + ChangeSets []struct{ ... } + Culprits []Culprit + Description interface{} + DisplayName string + Duration int64 + EstimatedDuration int64 + Executor interface{} + FingerPrint []FingerPrintResponse + FullDisplayName string + ID string + KeepLog bool + MavenArtifacts interface{} + MavenVersionUsed string + Number int64 + QueueID int64 + Result string + Runs []struct{ ... } + Timestamp int64 + URL string + type CredentialsManager struct + Folder string + J *Jenkins + func (cm CredentialsManager) Add(domain string, creds interface{}) error + func (cm CredentialsManager) Delete(domain string, id string) error + func (cm CredentialsManager) GetSingle(domain string, id string, creds interface{}) error + func (cm CredentialsManager) List(domain string) ([]string, error) + func (cm CredentialsManager) Update(domain string, id string, creds interface{}) error + type DockerServerCredentials struct + ClientCertificate string + ClientKey string + Description string + ID string + Scope string + ServerCaCertificate string + Username string + XMLName xml.Name + type ExecutorResponse struct + AssignedLabels []struct{} + Description interface{} + Jobs []InnerJob + Mode string + NodeDescription string + NodeName string + NumExecutors int64 + OverallLoad struct{} + PrimaryView struct{ ... } + QuietingDown bool + SlaveAgentPort int64 + UnlabeledLoad struct{} + UseCrumbs bool + UseSecurity bool + Views []ViewData + type FingerPrint struct + Base string + Id string + Jenkins *Jenkins + Raw *FingerPrintResponse + func (f FingerPrint) GetInfo() (*FingerPrintResponse, error) + func (f FingerPrint) Poll() (int, error) + func (f FingerPrint) Valid() (bool, error) + func (f FingerPrint) ValidateForBuild(filename string, build *Build) (bool, error) + type FingerPrintResponse struct + FileName string + Hash string + Original struct{ ... } + Timestamp int64 + Usage []struct{ ... } + type Folder struct + Base string + Jenkins *Jenkins + Raw *FolderResponse + func (f *Folder) Create(name string) (*Folder, error) + func (f *Folder) GetName() string + func (f *Folder) Poll() (int, error) + type FolderResponse struct + Actions []generalObj + Description string + DisplayName string + Jobs []InnerJob + Name string + PrimaryView *ViewData + URL string + Views []ViewData + type History struct + BuildDisplayName string + BuildNumber int + BuildStatus string + BuildTimestamp int64 + type InnerJob struct + Class string + Color string + Name string + Url string type Jenkins + func (j *Jenkins) CreateFolder(name string, parents ...string) (*Folder, error) + func (j *Jenkins) CreateJobInFolder(config string, jobName string, parentIDs ...string) (*Job, error) + func (j *Jenkins) DeleteNode(name string) (bool, error) + func (j *Jenkins) GetAllJobNames() ([]InnerJob, error) + func (j *Jenkins) GetFolder(id string, parents ...string) (*Folder, error) + func (j *Jenkins) GetLabel(name string) (*Label, error) + func (j *Jenkins) GetQueueItem(id int64) (*Task, error) + func (j *Jenkins) GetSubJob(parentId string, childId string) (*Job, error) + func (j *Jenkins) InstallPlugin(name string, version string) error + func (j *Jenkins) SafeRestart() error + func (j *Jenkins) UninstallPlugin(name string) error type Job + func (j *Job) GetInnerJob(id string) (*Job, error) + func (j *Job) GetInnerJobs() ([]*Job, error) + func (j *Job) GetInnerJobsMetadata() []InnerJob + func (j *Job) History() ([]*History, error) + func (j *Job) UpdateConfig(config string) error + func (job *Job) GetPipelineRun(id string) (pr *PipelineRun, err error) + func (job *Job) GetPipelineRuns() (pr []PipelineRun, err error) + type JobBuild struct + Number int64 + URL string + type JobResponse struct + Actions []generalObj + Buildable bool + Builds []JobBuild + Class string + Color string + ConcurrentBuild bool + Description string + DisplayName string + DisplayNameOrNull interface{} + DownstreamProjects []InnerJob + FirstBuild JobBuild + FullDisplayName string + FullName string + HealthReport []struct{ ... } + InQueue bool + Jobs []InnerJob + KeepDependencies bool + LastBuild JobBuild + LastCompletedBuild JobBuild + LastFailedBuild JobBuild + LastStableBuild JobBuild + LastSuccessfulBuild JobBuild + LastUnstableBuild JobBuild + LastUnsuccessfulBuild JobBuild + Name string + NextBuildNumber int64 + PrimaryView *ViewData + Property []struct{ ... } + QueueItem interface{} + Scm struct{} + URL string + UpstreamProjects []InnerJob + Views []ViewData + type Label struct + Base string + Jenkins *Jenkins + Raw *LabelResponse + func (l *Label) GetName() string + func (l *Label) GetNodes() []LabelNode + func (l *Label) Poll() (int, error) + type LabelNode struct + Class string + Mode string + NodeDescription string + NodeName string + NumExecutors int64 + type LabelResponse struct + BusyExecutors int64 + Description string + IdleExecutors int64 + Name string + Nodes []LabelNode + Offline bool + TotalExecutors int64 + type MODE string + const EXCLUSIVE + const NORMAL type Node + func (n *Node) Disconnect() (int, error) + func (n *Node) GetLogText() (string, error) + func (n *Node) LaunchNodeBySSH() (int, error) + type NodeResponse struct + Actions []interface{} + DisplayName string + Executors []struct{ ... } + Icon string + IconClassName string + Idle bool + JnlpAgent bool + LaunchSupported bool + LoadStatistics struct{} + ManualLaunchAllowed bool + MonitorData struct{ ... } + NumExecutors int64 + Offline bool + OfflineCause struct{} + OfflineCauseReason string + OneOffExecutors []interface{} + TemporarilyOffline bool + type ParameterDefinition struct + DefaultParameterValue struct{ ... } + Description string + Name string + Type string + type PipelineArtifact struct + ID string + Name string + Path string + URL string + type PipelineInputAction struct + AbortURL string + ID string + Message string + ProceedURL string + type PipelineNode struct + Base string + Duration int64 + ID string + Name string + ParentNodes []int64 + Run *PipelineRun + StageFlowNodes []PipelineNode + StartTime int64 + Status string + URLs map[string]map[string]string + func (node *PipelineNode) GetLog() (log *PipelineNodeLog, err error) + type PipelineNodeLog struct + ConsoleURL string + HasMore bool + Length int64 + NodeID string + NodeStatus string + Text string + type PipelineRun struct + Base string + Duration int64 + EndTime int64 + ID string + Job *Job + Name string + Stages []PipelineNode + StartTime int64 + Status string + URLs map[string]map[string]string + func (pr *PipelineRun) AbortInput() (bool, error) + func (pr *PipelineRun) GetArtifacts() (artifacts []PipelineArtifact, err error) + func (pr *PipelineRun) GetNode(id string) (node *PipelineNode, err error) + func (pr *PipelineRun) GetPendingInputActions() (PIAs []PipelineInputAction, err error) + func (pr *PipelineRun) ProceedInput() (bool, error) + type PluginResponse struct + Plugins []Plugin + type PrivateKey struct + Class string + Value string + type PrivateKeyFile struct + Class string + Value string type Requester + CACert []byte + func (r *Requester) PostJSON(endpoint string, payload io.Reader, responseStruct interface{}, ...) (*http.Response, error) + func (r *Requester) ReadJSONResponse(response *http.Response, responseStruct interface{}) (*http.Response, error) + func (r *Requester) ReadRawResponse(response *http.Response, responseStruct interface{}) (*http.Response, error) + func (r *Requester) SetCrumb(ar *APIRequest) error + type SSHCredentials struct + Description string + ID string + Passphrase string + PrivateKeySource interface{} + Scope string + Username string + XMLName xml.Name + type StringCredentials struct + Description string + ID string + Scope string + Secret string + XMLName xml.Name type Task + Base string + func (t *Task) Poll() (int, error) + type UsernameCredentials struct + Description string + ID string + Password string + Scope string + Username string + XMLName xml.Name type View + func (v *View) GetDescription() string + func (v *View) GetJobs() []InnerJob + func (v *View) GetName() string + func (v *View) GetUrl() string + type ViewData struct + Name string + URL string + type ViewResponse struct + Description string + Jobs []InnerJob + Name string + Property []interface{} + URL string v0 v0.2.0 Nov 7, 2014 Changes in this version + var DASHBOARD_VIEW = "hudson.plugins.view.dashboard.Dashboard" + var LIST_VIEW = "hudson.model.ListView" + var MY_VIEW = "hudson.model.MyView" + var NESTED_VIEW = "hudson.plugins.nested_view.NestedView" + var PIPELINE_VIEW = "au.com.centrumsystems.hudson.plugin.buildpipeline.BuildPipelineView" type Jenkins + func (j *Jenkins) CreateView(name string, viewType string) bool + func (j *Jenkins) GetAllBuildIds(job string) []jobBuild + func (j *Jenkins) GetAllViews() []*View + func (j *Jenkins) GetView(name string) *View + func (j *Jenkins) Poll() int type Job + func (j *Job) GetAllBuildIds() []jobBuild type Plugins + func (p *Plugins) Count() int + type View struct + Base string + Jenkins *Jenkins + Raw *viewResponse + func (v *View) AddJob(name string) bool + func (v *View) DeleteJob(name string) bool + func (v *View) Poll() int v0.1.1 Nov 2, 2014 v0.1.0 Nov 2, 2014 Changes in this version + const RESULT_STATUS_FAILED + const RESULT_STATUS_FAILURE + const RESULT_STATUS_SKIPPED + const STATUS_ABORTED + const STATUS_ERROR + const STATUS_FAIL + const STATUS_FIXED + const STATUS_PASSED + const STATUS_REGRESSION + const STATUS_SUCCESS + const STR_RE_SPLIT_VIEW + var Error *log.Logger + var Info *log.Logger + var Warning *log.Logger + type ActionsObject struct + FailCount int64 + SkipCount int64 + TotalCount int64 + UrlName string + type Artifact struct + Build *Build + FileName string + Jenkins *Jenkins + Path string + func (a Artifact) GetData() ([]byte, error) + func (a Artifact) Save(path string) + func (a Artifact) SaveToDir(dir string) + type BasicAuth struct + Password string + Username string + type Branch struct + Name string + SHA1 string + type Build struct + Base string + Depth int + Jenkins *Jenkins + Job *Job + Raw *buildResponse + func (b *Build) GetActions() []GeneralObj + func (b *Build) GetAllFingerprints() []*Fingerprint + func (b *Build) GetArtifacts() []Artifact + func (b *Build) GetBuildNumber() int + func (b *Build) GetCauses() []map[string]interface{} + func (b *Build) GetConsoleOutput() string + func (b *Build) GetCulprits() []Culprit + func (b *Build) GetDownstreamBuilds() []*Build + func (b *Build) GetDownstreamJobNames() []string + func (b *Build) GetDuration() int + func (b *Build) GetMatrixRuns() []*Build + func (b *Build) GetParameters() []Parameter + func (b *Build) GetResult() string + func (b *Build) GetResultSet() *TestResult + func (b *Build) GetRevision() string + func (b *Build) GetRevistionBranch() string + func (b *Build) GetTimestamp() time.Time + func (b *Build) GetUpstreamBuild() *Build + func (b *Build) GetUpstreamBuildNumber() int64 + func (b *Build) GetUpstreamJob() *Job + func (b *Build) GetUrl() string + func (b *Build) Info() *buildResponse + func (b *Build) IsGood() bool + func (b *Build) IsRunning() bool + func (b *Build) Poll(options ...interface{}) int + func (b *Build) Stop() bool + type BuildRevision struct + Branch []Branch + SHA1 string + type Builds struct + BuildNumber int + BuildResult interface{} + Marked BuildRevision + Revision BuildRevision + type Computers struct + BusyExecutors int + Computers []nodeResponse + DisplayName string + TotalExecutors int + type Culprit struct + AbsoluteUrl string + FullName string + type Executor struct + Jenkins *Jenkins + Raw *executorResponse + type Fingerprint struct + Base string + Id string + Jenkins *Jenkins + Raw *fingerPrintResponse + func (f Fingerprint) GetInfo() *fingerPrintResponse + func (f Fingerprint) Poll() int + func (f Fingerprint) Valid() bool + func (f Fingerprint) ValidateForBuild(filename string, build *Build) bool + type GeneralObj struct + BuildsByBranchName map[string]Builds + Causes []map[string]interface{} + LastBuiltRevision BuildRevision + MercurialNodeName string + MercurialRevisionNumber string + Parameters []Parameter + RemoteUrls []string + ScmName string + Subdir interface{} + TotalCount int + UrlName string + type Jenkins struct + Raw *executorResponse + Requester *Requester + Server string + Version string + func CreateJenkins(base string, auth ...interface{}) *Jenkins + func (j *Jenkins) BuildJob(name string, options ...interface{}) bool + func (j *Jenkins) CopyJob(copyFrom string, newName string) *Job + func (j *Jenkins) CreateJob(config string, options ...interface{}) *Job + func (j *Jenkins) CreateNode(name string, numExecutors int, description string, remoteFS string, ...) *Node + func (j *Jenkins) DeleteJob(name string) bool + func (j *Jenkins) GetAllBuilds(job string, options ...interface{}) []*Build + func (j *Jenkins) GetAllJobs(preload bool) []*Job + func (j *Jenkins) GetAllNodes() []*Node + func (j *Jenkins) GetArtifactData(id string) *fingerPrintResponse + func (j *Jenkins) GetBuild(job string, number string) *Build + func (j *Jenkins) GetJob(id string) *Job + func (j *Jenkins) GetNode(name string) *Node + func (j *Jenkins) GetPlugins(depth int) *Plugins + func (j *Jenkins) GetQueue() *Queue + func (j *Jenkins) GetQueueUrl() string + func (j *Jenkins) HasPlugin(name string) *Plugin + func (j *Jenkins) Info() *executorResponse + func (j *Jenkins) Init() *Jenkins + func (j *Jenkins) RenameJob(job string, name string) *Job + func (j *Jenkins) ValidateFingerPrint(id string) bool + type Job struct + Base string + Jenkins *Jenkins + Raw *jobResponse + func (j *Job) Copy(from string, newName string) *Job + func (j *Job) Create(config string, qr ...interface{}) *Job + func (j *Job) Delete() bool + func (j *Job) Disable() bool + func (j *Job) Enable() bool + func (j *Job) GetAllBuilds() + func (j *Job) GetBuild(id int64) *Build + func (j *Job) GetConfig() string + func (j *Job) GetDescription() string + func (j *Job) GetDetails() *jobResponse + func (j *Job) GetDownstreamJobs() []*Job + func (j *Job) GetDownstreamJobsMetadata() []updownProject + func (j *Job) GetFirstBuild() *Build + func (j *Job) GetLastBuild() *Build + func (j *Job) GetLastCompletedBuild() *Build + func (j *Job) GetLastFailedBuild() *Build + func (j *Job) GetLastStableBuild() *Build + func (j *Job) GetLastSuccessfulBuild() *Build + func (j *Job) GetName() string + func (j *Job) GetParameters() []parameterDefinition + func (j *Job) GetUpstreamJobs() []*Job + func (j *Job) GetUpstreamJobsMetadata() []updownProject + func (j *Job) HasQueuedBuild() + func (j *Job) Invoke(files []string, skipIfRunning bool, params map[string]string, cause string, ...) bool + func (j *Job) InvokeSimple(params map[string]string) bool + func (j *Job) IsEnabled() bool + func (j *Job) IsQueued() bool + func (j *Job) IsRunning() bool + func (j *Job) Poll() int + func (j *Job) Rename(name string) + type Node struct + Base string + Jenkins *Jenkins + Raw *nodeResponse + func (n *Node) Delete() bool + func (n *Node) GetName() string + func (n *Node) Info() *nodeResponse + func (n *Node) IsIdle() bool + func (n *Node) IsJnlpAgent() bool + func (n *Node) IsOnline() bool + func (n *Node) IsTemporarilyOffline() bool + func (n *Node) Poll() int + func (n *Node) SetOffline() + func (n *Node) SetOnline() + func (n *Node) ToggleTemporarilyOffline(options ...interface{}) + type Parameter struct + Name string + Value string + type Plugin struct + Active bool + BackupVersion interface{} + Bundled bool + Deleted bool + Dependencies []struct{ ... } + Downgradable bool + Enabled bool + HasUpdate bool + LongName string + Pinned bool + ShortName string + SupportsDynamicLoad string + URL string + Version string + type Plugins struct + Base string + Depth int + Jenkins *Jenkins + Raw *pluginResponse + func (p *Plugins) Contains(name string) *Plugin + func (p *Plugins) Poll() int + type Queue struct + Base string + Jenkins *Jenkins + Raw *queueResponse + func (q *Queue) CancelTask(id int64) bool + func (q *Queue) GetTaskById(id int64) *Task + func (q *Queue) GetTasksForJob(name string) []*Task + func (q *Queue) Poll() int + func (q *Queue) Tasks() []*Task + type Requester struct + Base string + BasicAuth *BasicAuth + Client *http.Client + Headers http.Header + LastResponse *http.Response + SslVerify bool + Suffix string + func (r *Requester) Do(method string, endpoint string, payload io.Reader, responseStruct interface{}, ...) *http.Response + func (r *Requester) Get(endpoint string, responseStruct interface{}, querystring map[string]string) *http.Response + func (r *Requester) GetJSON(endpoint string, responseStruct interface{}, querystring map[string]string) *http.Response + func (r *Requester) GetXML(endpoint string, responseStruct interface{}, querystring map[string]string) *http.Response + func (r *Requester) Post(endpoint string, payload io.Reader, responseStruct interface{}, ...) *http.Response + func (r *Requester) PostFiles(endpoint string, payload io.Reader, responseStruct interface{}, ...) *http.Response + func (r *Requester) PostXML(endpoint string, xml string, responseStruct interface{}, ...) *http.Response + func (r *Requester) SetClient(client *http.Client) *Requester + func (r *Requester) SetHeader(key string, value string) *Requester + type Task struct + Jenkins *Jenkins + Queue *Queue + Raw *taskResponse + func (t *Task) Cancel() bool + func (t *Task) GetCauses() []map[string]interface{} + func (t *Task) GetJob() *Job + func (t *Task) GetParameters() []Parameter + func (t *Task) GetWhy() string + type TestResult struct + Duration int64 + Empty bool + FailCount int64 + PassCount int64 + SkipCount int64 + Suites []struct{ ... }