Versions in this module Expand all Collapse all v1 v1.2.5 Mar 15, 2021 v1.2.4 Mar 15, 2021 v1.2.3 Mar 12, 2021 v1.2.2 Mar 12, 2021 v1.2.1 Mar 12, 2021 v1.2.0 Mar 11, 2021 Changes in this version type Jenkins + func (j *Jenkins) GetBuildFromQueueID(ctx context.Context, queueid int64) (*Build, error) + func (j *Jenkins) UpdateJob(ctx context.Context, job string, config string) *Job type Job + func (j *Job) GetBuildsFields(ctx context.Context, fields []string, custom interface{}) error type NodeResponse + Class string v1.0.1 Nov 25, 2019 Changes in this version + const ClassUsernameCredentials + const KeySourceDirectEntryType + const KeySourceOnMasterType + 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 DASHBOARD_VIEW = "hudson.plugins.view.dashboard.Dashboard" + var Error *log.Logger + var Info *log.Logger + 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" + var Warning *log.Logger + 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 Artifact struct + Build *Build + FileName string + Jenkins *Jenkins + Path string + func (a Artifact) GetData() ([]byte, error) + func (a Artifact) Save(path string) (bool, error) + func (a Artifact) SaveToDir(dir string) (bool, error) + type BasicAuth struct + Password string + Username 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() int64 + func (b *Build) GetCauses() ([]map[string]interface{}, error) + func (b *Build) GetConsoleOutput() string + func (b *Build) GetConsoleOutputFromIndex(startID int64) (consoleResponse, error) + func (b *Build) GetCulprits() []Culprit + func (b *Build) GetDownstreamBuilds() ([]*Build, error) + func (b *Build) GetDownstreamJobNames() []string + func (b *Build) GetDuration() int64 + func (b *Build) GetInjectedEnvVars() (map[string]string, error) + func (b *Build) GetMatrixRuns() ([]*Build, error) + func (b *Build) GetParameters() []parameter + func (b *Build) GetResult() string + func (b *Build) GetResultSet() (*TestResult, error) + func (b *Build) GetRevision() string + func (b *Build) GetRevisionBranch() string + func (b *Build) GetTimestamp() time.Time + func (b *Build) GetUpstreamBuild() (*Build, error) + func (b *Build) GetUpstreamBuildNumber() (int64, error) + func (b *Build) GetUpstreamJob() (*Job, error) + 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, error) + func (b *Build) SetDescription(description string) error + func (b *Build) Stop() (bool, 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 BuildRevision struct + Branch []branch + SHA1 string + type Builds struct + BuildNumber int64 + BuildResult interface{} + Marked BuildRevision + Revision BuildRevision + type Computers struct + BusyExecutors int + Computers []*NodeResponse + DisplayName string + TotalExecutors int + 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 Culprit struct + AbsoluteUrl string + FullName string + type DockerServerCredentials struct + ClientCertificate string + ClientKey string + Description string + ID string + Scope string + ServerCaCertificate string + Username string + XMLName xml.Name + type Executor struct + Jenkins *Jenkins + Raw *ExecutorResponse + 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 struct + Raw *ExecutorResponse + Requester *Requester + Server string + Version string + func CreateJenkins(client *http.Client, base string, auth ...interface{}) *Jenkins + func (j *Jenkins) BuildJob(name string, options ...interface{}) (int64, error) + func (j *Jenkins) CopyJob(copyFrom string, newName string) (*Job, error) + func (j *Jenkins) CreateFolder(name string, parents ...string) (*Folder, error) + func (j *Jenkins) CreateJob(config string, options ...interface{}) (*Job, error) + func (j *Jenkins) CreateJobInFolder(config string, jobName string, parentIDs ...string) (*Job, error) + func (j *Jenkins) CreateNode(name string, numExecutors int, description string, remoteFS string, ...) (*Node, error) + func (j *Jenkins) CreateView(name string, viewType string) (*View, error) + func (j *Jenkins) DeleteJob(name string) (bool, error) + func (j *Jenkins) DeleteNode(name string) (bool, error) + func (j *Jenkins) GetAllBuildIds(job string) ([]JobBuild, error) + func (j *Jenkins) GetAllJobNames() ([]InnerJob, error) + func (j *Jenkins) GetAllJobs() ([]*Job, error) + func (j *Jenkins) GetAllNodes() ([]*Node, error) + func (j *Jenkins) GetAllViews() ([]*View, error) + func (j *Jenkins) GetArtifactData(id string) (*FingerPrintResponse, error) + func (j *Jenkins) GetBuild(jobName string, number int64) (*Build, error) + func (j *Jenkins) GetFolder(id string, parents ...string) (*Folder, error) + func (j *Jenkins) GetJob(id string, parentIDs ...string) (*Job, error) + func (j *Jenkins) GetLabel(name string) (*Label, error) + func (j *Jenkins) GetNode(name string) (*Node, error) + func (j *Jenkins) GetPlugins(depth int) (*Plugins, error) + func (j *Jenkins) GetQueue() (*Queue, error) + func (j *Jenkins) GetQueueItem(id int64) (*Task, error) + func (j *Jenkins) GetQueueUrl() string + func (j *Jenkins) GetSubJob(parentId string, childId string) (*Job, error) + func (j *Jenkins) GetView(name string) (*View, error) + func (j *Jenkins) HasPlugin(name string) (*Plugin, error) + func (j *Jenkins) Info() (*ExecutorResponse, error) + func (j *Jenkins) Init() (*Jenkins, error) + func (j *Jenkins) InstallPlugin(name string, version string) error + func (j *Jenkins) Poll() (int, error) + func (j *Jenkins) RenameJob(job string, name string) *Job + func (j *Jenkins) SafeRestart() error + func (j *Jenkins) UninstallPlugin(name string) error + func (j *Jenkins) ValidateFingerPrint(id string) (bool, error) + type Job struct + Base string + Jenkins *Jenkins + Raw *JobResponse + func (j *Job) Copy(destinationName string) (*Job, error) + func (j *Job) Create(config string, qr ...interface{}) (*Job, error) + func (j *Job) Delete() (bool, error) + func (j *Job) Disable() (bool, error) + func (j *Job) Enable() (bool, error) + func (j *Job) GetAllBuildIds() ([]JobBuild, error) + func (j *Job) GetBuild(id int64) (*Build, error) + func (j *Job) GetConfig() (string, error) + func (j *Job) GetDescription() string + func (j *Job) GetDetails() *JobResponse + func (j *Job) GetDownstreamJobs() ([]*Job, error) + func (j *Job) GetDownstreamJobsMetadata() []InnerJob + func (j *Job) GetFirstBuild() (*Build, error) + func (j *Job) GetInnerJob(id string) (*Job, error) + func (j *Job) GetInnerJobs() ([]*Job, error) + func (j *Job) GetInnerJobsMetadata() []InnerJob + func (j *Job) GetLastBuild() (*Build, error) + func (j *Job) GetLastCompletedBuild() (*Build, error) + func (j *Job) GetLastFailedBuild() (*Build, error) + func (j *Job) GetLastStableBuild() (*Build, error) + func (j *Job) GetLastSuccessfulBuild() (*Build, error) + func (j *Job) GetName() string + func (j *Job) GetParameters() ([]ParameterDefinition, error) + func (j *Job) GetUpstreamJobs() ([]*Job, error) + func (j *Job) GetUpstreamJobsMetadata() []InnerJob + func (j *Job) HasQueuedBuild() + func (j *Job) History() ([]*History, error) + func (j *Job) Invoke(files []string, skipIfRunning bool, params map[string]string, cause string, ...) (bool, error) + func (j *Job) InvokeSimple(params map[string]string) (int64, error) + func (j *Job) IsEnabled() (bool, error) + func (j *Job) IsQueued() (bool, error) + func (j *Job) IsRunning() (bool, error) + func (j *Job) Poll() (int, error) + func (j *Job) Rename(name string) (bool, 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 struct + Base string + Jenkins *Jenkins + Raw *NodeResponse + func (n *Node) Delete() (bool, error) + func (n *Node) Disconnect() (int, error) + func (n *Node) GetLogText() (string, error) + func (n *Node) GetName() string + func (n *Node) Info() (*NodeResponse, error) + func (n *Node) IsIdle() (bool, error) + func (n *Node) IsJnlpAgent() (bool, error) + func (n *Node) IsOnline() (bool, error) + func (n *Node) IsTemporarilyOffline() (bool, error) + func (n *Node) LaunchNodeBySSH() (int, error) + func (n *Node) Poll() (int, error) + func (n *Node) SetOffline(options ...interface{}) (bool, error) + func (n *Node) SetOnline() (bool, error) + func (n *Node) ToggleTemporarilyOffline(options ...interface{}) (bool, 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 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 PluginResponse struct + Plugins []Plugin + type Plugins struct + Base string + Depth int + Jenkins *Jenkins + Raw *PluginResponse + func (p *Plugins) Contains(name string) *Plugin + func (p *Plugins) Count() int + func (p *Plugins) Poll() (int, error) + type PrivateKey struct + Class string + Value string + type PrivateKeyFile struct + Class string + Value string + type Queue struct + Base string + Jenkins *Jenkins + Raw *queueResponse + func (q *Queue) CancelTask(id int64) (bool, error) + func (q *Queue) GetTaskById(id int64) *Task + func (q *Queue) GetTasksForJob(name string) []*Task + func (q *Queue) Poll() (int, error) + func (q *Queue) Tasks() []*Task + type Requester struct + Base string + BasicAuth *BasicAuth + CACert []byte + Client *http.Client + SslVerify bool + func (r *Requester) Do(ar *APIRequest, responseStruct interface{}, options ...interface{}) (*http.Response, error) + func (r *Requester) Get(endpoint string, responseStruct interface{}, querystring map[string]string) (*http.Response, error) + func (r *Requester) GetJSON(endpoint string, responseStruct interface{}, query map[string]string) (*http.Response, error) + func (r *Requester) GetXML(endpoint string, responseStruct interface{}, query map[string]string) (*http.Response, error) + func (r *Requester) Post(endpoint string, payload io.Reader, responseStruct interface{}, ...) (*http.Response, error) + func (r *Requester) PostFiles(endpoint string, payload io.Reader, responseStruct interface{}, ...) (*http.Response, error) + func (r *Requester) PostJSON(endpoint string, payload io.Reader, responseStruct interface{}, ...) (*http.Response, error) + func (r *Requester) PostXML(endpoint string, xml string, 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) SetClient(client *http.Client) *Requester + 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 struct + Base string + Jenkins *Jenkins + Queue *Queue + Raw *taskResponse + func (t *Task) Cancel() (bool, error) + func (t *Task) GetCauses() []map[string]interface{} + func (t *Task) GetJob() (*Job, error) + func (t *Task) GetParameters() []parameter + func (t *Task) GetWhy() string + func (t *Task) Poll() (int, error) + type TestResult struct + Duration int64 + Empty bool + FailCount int64 + PassCount int64 + SkipCount int64 + Suites []struct{ ... } + type UsernameCredentials struct + Description string + ID string + Password string + Scope string + Username string + XMLName xml.Name + type View struct + Base string + Jenkins *Jenkins + Raw *ViewResponse + func (v *View) AddJob(name string) (bool, error) + func (v *View) DeleteJob(name string) (bool, error) + func (v *View) GetDescription() string + func (v *View) GetJobs() []InnerJob + func (v *View) GetName() string + func (v *View) GetUrl() string + func (v *View) Poll() (int, error) + type ViewData struct + Name string + URL string + type ViewResponse struct + Description string + Jobs []InnerJob + Name string + Property []interface{} + URL string