Documentation ¶
Index ¶
- Constants
- func ParseJobPath(jobName string) (path string)
- func PrepareEmptyItems(roundTripper *mhttp.MockRoundTripper, rootURL, name, kind, user, token string)
- func PrepareForBuildWithNoParams(roundTripper *mhttp.MockRoundTripper, rootURL, jobName, user, password string) (request *http.Request, response *http.Response)
- func PrepareForBuildWithParams(roundTripper *mhttp.MockRoundTripper, rootURL, jobName, user, password string) (request *http.Request, response *http.Response)
- func PrepareForCreatePipelineJob(roundTripper *mhttp.MockRoundTripper, rootURL, user, password string, ...)
- func PrepareForDisableJob(roundTripper *mhttp.MockRoundTripper, rootURL, name, user, token string)
- func PrepareForEnableJob(roundTripper *mhttp.MockRoundTripper, rootURL, name, user, token string)
- func PrepareForGetBuild(roundTripper *mhttp.MockRoundTripper, rootURL, jobName string, buildID int, ...)
- func PrepareForGetJob(roundTripper *mhttp.MockRoundTripper, rootURL, jobName, user, password string) (response *http.Response)
- func PrepareForGetJobInputActions(roundTripper *mhttp.MockRoundTripper, rootURL, user, password, jobName string, ...) (request *http.Request, response *http.Response)
- func PrepareForGetJobWithParams(roundTripper *mhttp.MockRoundTripper, rootURL, jobName, user, password string)
- func PrepareForJobLog(roundTripper *mhttp.MockRoundTripper, rootURL, jobName string, buildID int, ...)
- func PrepareForSubmitInput(roundTripper *mhttp.MockRoundTripper, rootURL, jobPath, user, password string) (request *http.Request, response *http.Response)
- func PrepareForSubmitProcessInput(roundTripper *mhttp.MockRoundTripper, rootURL, jobPath, user, password string) (request *http.Request, response *http.Response)
- func PrepareGetStatus(roundTripper *mhttp.MockRoundTripper, rootURL, user, password string)
- func PrepareOneItem(roundTripper *mhttp.MockRoundTripper, rootURL, name, kind, user, token string)
- type AgentLabel
- type BlueArtifact
- type BlueChangeSetEntry
- type BlueContainerItem
- type BlueItemRun
- type BlueMultiBranchItem
- type BlueMultiBranchPipeline
- type BlueOceanClient
- func (c *BlueOceanClient) Build(option BuildOption) (*PipelineRun, error)
- func (c *BlueOceanClient) GetBranches(option GetBranchesOption) ([]PipelineBranch, error)
- func (c *BlueOceanClient) GetBuild(option GetBuildOption) (*PipelineRun, error)
- func (c *BlueOceanClient) GetNodes(option GetNodesOption) ([]Node, error)
- func (c *BlueOceanClient) GetPipeline(pipelineName string, folders ...string) (*Pipeline, error)
- func (c *BlueOceanClient) GetPipelineRuns(pipeline string, folders ...string) (runs []PipelineRun, err error)
- func (c *BlueOceanClient) GetPipelines(folders ...string) (pipelines []Pipeline, err error)
- func (c *BlueOceanClient) GetSteps(option GetStepsOption) ([]Step, error)
- func (c *BlueOceanClient) Replay(option ReplayOption) (*PipelineRun, error)
- func (c *BlueOceanClient) Search(name string, start, limit int) (items []JenkinsItem, err error)
- type BluePipelineItem
- type BlueRunnableItem
- type BlueUser
- type BlueUserPermission
- type Branch
- type Build
- type BuildOption
- type Category
- type CategoryItem
- type Cause
- type Client
- func (q *Client) AddParameters(name, parameters string) (err error)
- func (q *Client) Build(jobName string) (err error)
- func (q *Client) BuildAndReturn(jobName, cause string, timeout, delay int) (build IdentityBuild, err error)
- func (q *Client) BuildWithParams(jobName string, parameters []ParameterDefinition) (err error)
- func (q *Client) Create(jobPayload CreateJobPayload) (err error)
- func (q *Client) CreateJobInFolder(jobPayload CreateJobPayload, path string) (err error)
- func (q *Client) Delete(jobName string) (err error)
- func (q *Client) DeleteHistory(jobName string, num int) (err error)
- func (q *Client) DisableJob(jobName string) (err error)
- func (q *Client) EnableJob(jobName string) (err error)
- func (q *Client) GetBuild(jobName string, id int) (job *Build, err error)
- func (q *Client) GetHistory(name string) (builds []*Build, err error)
- func (q *Client) GetJob(name string) (job *Job, err error)
- func (q *Client) GetJobInputActions(jobName string, buildID int) (actions []InputItem, err error)
- func (q *Client) GetJobTypeCategories() (jobCategories []Category, err error)
- func (q *Client) GetPipeline(name string) (pipeline *SimplePipeline, err error)
- func (q *Client) JobInputSubmit(jobName, inputID string, buildID int, abort bool, params map[string]string) (err error)
- func (q *Client) Log(jobName string, history int, start int64) (jobLog Log, err error)
- func (q *Client) RemoveParameters(name, parameters string) (err error)
- func (q *Client) Search(name, kind string, start, limit int) (items []JenkinsItem, err error)
- func (q *Client) SearchViaBlue(name string, start, limit int) (items []JenkinsItem, err error)deprecated
- func (q *Client) StopJob(jobName string, num int) (err error)
- func (q *Client) UpdatePipeline(name, script string) (err error)
- type CreateJobPayload
- type Edge
- type Filter
- type GetBranchesOption
- type GetBuildOption
- type GetNodesOption
- type GetStepsOption
- type IdentityBuild
- type IdentityCause
- type Input
- type InputItem
- type Issue
- type JenkinsInputParametersRequest
- type JenkinsItem
- type JenkinsStatus
- type JenkinsStatusClient
- type Job
- type Log
- type Node
- type Parameter
- type ParameterDefinition
- type ParameterValue
- type ParametersDefinitionProperty
- type Permissions
- type Pipeline
- type PipelineBranch
- type PipelineRun
- type PipelineRunSummary
- type PullRequest
- type ReplayOption
- type SCMSource
- type SimpleJobBuild
- type SimplePipeline
- type Step
- type Time
- type View
Constants ¶
const ( // StringParameterDefinition is the definition for string parameter StringParameterDefinition = "StringParameterDefinition" // FileParameterDefinition is the definition for file parameter FileParameterDefinition = "FileParameterDefinition" )
Variables ¶
This section is empty.
Functions ¶
func PrepareEmptyItems ¶
func PrepareEmptyItems(roundTripper *mhttp.MockRoundTripper, rootURL, name, kind, user, token string)
PrepareEmptyItems only for test
func PrepareForBuildWithNoParams ¶
func PrepareForBuildWithNoParams(roundTripper *mhttp.MockRoundTripper, rootURL, jobName, user, password string) ( request *http.Request, response *http.Response)
PrepareForBuildWithNoParams only for test
func PrepareForBuildWithParams ¶
func PrepareForBuildWithParams(roundTripper *mhttp.MockRoundTripper, rootURL, jobName, user, password string) ( request *http.Request, response *http.Response)
PrepareForBuildWithParams only for test
func PrepareForCreatePipelineJob ¶
func PrepareForCreatePipelineJob(roundTripper *mhttp.MockRoundTripper, rootURL, user, password string, jobPayload CreateJobPayload)
PrepareForCreatePipelineJob only for test
func PrepareForDisableJob ¶
func PrepareForDisableJob(roundTripper *mhttp.MockRoundTripper, rootURL, name, user, token string)
PrepareForDisableJob only for test
func PrepareForEnableJob ¶
func PrepareForEnableJob(roundTripper *mhttp.MockRoundTripper, rootURL, name, user, token string)
PrepareForEnableJob only for test
func PrepareForGetBuild ¶
func PrepareForGetBuild(roundTripper *mhttp.MockRoundTripper, rootURL, jobName string, buildID int, user, password string)
PrepareForGetBuild only for test
func PrepareForGetJob ¶
func PrepareForGetJob(roundTripper *mhttp.MockRoundTripper, rootURL, jobName, user, password string) ( response *http.Response)
PrepareForGetJob only for test
func PrepareForGetJobInputActions ¶
func PrepareForGetJobInputActions(roundTripper *mhttp.MockRoundTripper, rootURL, user, password, jobName string, buildID int) ( request *http.Request, response *http.Response)
PrepareForGetJobInputActions only for test
func PrepareForGetJobWithParams ¶
func PrepareForGetJobWithParams(roundTripper *mhttp.MockRoundTripper, rootURL, jobName, user, password string)
PrepareForGetJobWithParams only for test
func PrepareForJobLog ¶
func PrepareForJobLog(roundTripper *mhttp.MockRoundTripper, rootURL, jobName string, buildID int, user, password string)
PrepareForJobLog only for test
func PrepareForSubmitInput ¶
func PrepareForSubmitInput(roundTripper *mhttp.MockRoundTripper, rootURL, jobPath, user, password string) ( request *http.Request, response *http.Response)
PrepareForSubmitInput only for test
func PrepareForSubmitProcessInput ¶
func PrepareForSubmitProcessInput(roundTripper *mhttp.MockRoundTripper, rootURL, jobPath, user, password string) ( request *http.Request, response *http.Response)
PrepareForSubmitProcessInput only for test
func PrepareGetStatus ¶ added in v0.0.3
func PrepareGetStatus(roundTripper *mhttp.MockRoundTripper, rootURL, user, password string)
PrepareGetStatus only for test
func PrepareOneItem ¶
func PrepareOneItem(roundTripper *mhttp.MockRoundTripper, rootURL, name, kind, user, token string)
PrepareOneItem only for test
Types ¶
type AgentLabel ¶
type AgentLabel struct {
Name string
}
AgentLabel represents the label of Jenkins agent
type BlueArtifact ¶ added in v0.0.5
type BlueArtifact struct { ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` Path string `json:"path,omitempty"` URL string `json:"url,omitempty"` Size int64 `json:"size,omitempty"` Downloadable bool `json:"downloadable,omitempty"` }
BlueArtifact contains fields that artifact owns. Reference: https://github.com/jenkinsci/blueocean-plugin/blob/6b27be3724c892427b732f30575fdcc2977cfaef/blueocean-rest/src/main/java/io/jenkins/blueocean/rest/model/BlueArtifact.java#L9
type BlueChangeSetEntry ¶ added in v0.0.5
type BlueChangeSetEntry struct { CommitID string `json:"commitId,omitempty"` Author *BlueUser `json:"author,omitempty"` Timestamp Time `json:"timestamp,omitempty"` Message string `json:"msg,omitempty"` AffectedPaths []string `json:"affectedPaths,omitempty"` URL string `json:"url,omitempty"` CheckoutCount int `json:"checkoutCount,omitempty"` Issues []Issue `json:"issues,omitempty"` }
BlueChangeSetEntry represents a single commit as a REST resource. Reference: https://github.com/jenkinsci/blueocean-plugin/blob/6b27be3724c892427b732f30575fdcc2977cfaef/blueocean-rest/src/main/java/io/jenkins/blueocean/rest/model/BlueChangeSetEntry.java#L15
type BlueContainerItem ¶ added in v0.0.5
type BlueContainerItem struct { NumberOfPipelines int `json:"numberOfPipelines,omitempty"` NumberOfFolders int `json:"numberOfFolders,omitempty"` PipelineFolderNames []string `json:"pipelineFolderNames,omitempty"` }
BlueContainerItem only contains folders information of a PipelineRun. Reference: https://github.com/jenkinsci/blueocean-plugin/blob/6b27be3724c892427b732f30575fdcc2977cfaef/blueocean-rest/src/main/java/io/jenkins/blueocean/rest/model/BlueContainerItem.java
type BlueItemRun ¶ added in v0.0.5
type BlueItemRun struct { ArtifactsZipFile string `json:"artifactsZipFile,omitempty"` CauseOfBlockage string `json:"causeOfBlockage,omitempty"` Causes []Cause `json:"causes,omitempty"` ChangeSet []BlueChangeSetEntry `json:"changeSet,omitempty"` Description string `json:"description,omitempty"` DurationInMillis *int64 `json:"durationInMillis,omitempty"` EnQueueTime Time `json:"enQueueTime,omitempty"` EndTime Time `json:"endTime,omitempty"` StartTime Time `json:"startTime,omitempty"` EstimatedDurationInMillis *int64 `json:"estimatedDurationInMillis,omitempty"` ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` Organization string `json:"organization,omitempty"` Pipeline string `json:"pipeline,omitempty"` Replayable bool `json:"replayable,omitempty"` Result string `json:"result,omitempty"` RunSummary string `json:"runSummary,omitempty"` State string `json:"state,omitempty"` Type string `json:"type,omitempty"` }
BlueItemRun contains basic metadata of a build. Reference: https://github.com/jenkinsci/blueocean-plugin/blob/a7cbc946b73d89daf9dfd91cd713cc7ab64a2d95/blueocean-rest/src/main/java/io/jenkins/blueocean/rest/model/BlueItemRun.java
type BlueMultiBranchItem ¶ added in v0.0.5
type BlueMultiBranchItem struct { TotalNumberOfBranches int `json:"totalNumberOfBranches,omitempty"` NumberOfFailingBranches int `json:"numberOfFailingBranches,omitempty"` NumberOfSuccessfulBranches int `json:"numberOfSuccessfulBranches,omitempty"` TotalNumberOfPullRequests int `json:"totalNumberOfPullRequests,omitempty"` NumberOfFailingPullRequests int `json:"numberOfFailingPullRequests,omitempty"` NumberOfSuccessfulPullRequests int `json:"numberOfSuccessfulPullRequests,omitempty"` BranchNames []string `json:"branchNames,omitempty"` }
BlueMultiBranchItem contains some fields multi-branch PipelineRun owns only. Reference: https://github.com/jenkinsci/blueocean-plugin/blob/6b27be3724c892427b732f30575fdcc2977cfaef/blueocean-rest/src/main/java/io/jenkins/blueocean/rest/model/BlueMultiBranchItem.java
type BlueMultiBranchPipeline ¶ added in v0.0.5
type BlueMultiBranchPipeline struct { BlueRunnableItem BluePipelineItem BlueContainerItem BlueMultiBranchItem SCMSource *SCMSource `json:"scmSource,omitempty"` ScriptPath string `json:"scriptPath,omitempty"` }
BlueMultiBranchPipeline contains all fields mult-branch PipelineRun owns. Reference: https://github.com/jenkinsci/blueocean-plugin/blob/6b27be3724c892427b732f30575fdcc2977cfaef/blueocean-pipeline-api-impl/src/main/java/io/jenkins/blueocean/rest/impl/pipeline/MultiBranchPipelineImpl.java
type BlueOceanClient ¶
type BlueOceanClient struct { core.JenkinsCore Organization string }
BlueOceanClient is client for operating pipelines via BlueOcean RESTful API.
func (*BlueOceanClient) Build ¶
func (c *BlueOceanClient) Build(option BuildOption) (*PipelineRun, error)
Build builds a pipeline for specific organization and pipelines.
func (*BlueOceanClient) GetBranches ¶ added in v0.0.5
func (c *BlueOceanClient) GetBranches(option GetBranchesOption) ([]PipelineBranch, error)
GetBranches gets branches of a Pipeline.
func (*BlueOceanClient) GetBuild ¶
func (c *BlueOceanClient) GetBuild(option GetBuildOption) (*PipelineRun, error)
GetBuild gets build result for specific organization, run ID and pipelines.
func (*BlueOceanClient) GetNodes ¶ added in v0.0.3
func (c *BlueOceanClient) GetNodes(option GetNodesOption) ([]Node, error)
GetNodes gets nodes details
func (*BlueOceanClient) GetPipeline ¶ added in v0.0.4
func (c *BlueOceanClient) GetPipeline(pipelineName string, folders ...string) (*Pipeline, error)
GetPipeline obtains Pipeline metadata with Pipeline name and folders.
func (*BlueOceanClient) GetPipelineRuns ¶ added in v0.0.3
func (c *BlueOceanClient) GetPipelineRuns(pipeline string, folders ...string) (runs []PipelineRun, err error)
GetPipelineRuns returns a PipelineRun which in the possible nest folders
func (*BlueOceanClient) GetPipelines ¶ added in v0.0.3
func (c *BlueOceanClient) GetPipelines(folders ...string) (pipelines []Pipeline, err error)
GetPipelines returns the Pipeline list which comes from the possible nest folders
func (*BlueOceanClient) GetSteps ¶ added in v0.0.5
func (c *BlueOceanClient) GetSteps(option GetStepsOption) ([]Step, error)
GetSteps returns all steps of the given Pipeline. Reference: https://github.com/jenkinsci/blueocean-plugin/tree/master/blueocean-rest#get-pipeline-steps
func (*BlueOceanClient) Replay ¶ added in v0.0.4
func (c *BlueOceanClient) Replay(option ReplayOption) (*PipelineRun, error)
Replay will queue up a replay of the pipeline run with the same commit id as the run used. Reference: https://github.com/jenkinsci/blueocean-plugin/tree/master/blueocean-rest#replay-a-pipeline-build
func (*BlueOceanClient) Search ¶
func (c *BlueOceanClient) Search(name string, start, limit int) (items []JenkinsItem, err error)
Search searches jobs via the BlueOcean API
type BluePipelineItem ¶ added in v0.0.5
type BluePipelineItem struct { Organization string `json:"organization,omitempty"` Name string `json:"name,omitempty"` Disabled bool `json:"disabled,omitempty"` DisplayName string `json:"displayName,omitempty"` FullName string `json:"fullName,omitempty"` FullDisplayName string `json:"fullDisplayName,omitempty"` }
BluePipelineItem only contains minimal fields PipelineRun owns. Reference: https://github.com/jenkinsci/blueocean-plugin/blob/6b27be3724c892427b732f30575fdcc2977cfaef/blueocean-rest/src/main/java/io/jenkins/blueocean/rest/model/BluePipelineItem.java
type BlueRunnableItem ¶ added in v0.0.5
type BlueRunnableItem struct { WeatherScore int `json:"weatherScore,omitempty"` LatestRun *PipelineRunSummary `json:"latestRun,omitempty"` EstimatedDurationInMillis int64 `json:"estimatedDurationInMillis,omitempty"` Permissions *Permissions `json:"permissions,omitempty"` Parameters []ParameterDefinition `json:"parameters,omitempty"` }
BlueRunnableItem contains some fields runnable PipelineRun owns only. Reference: https://github.com/jenkinsci/blueocean-plugin/blob/6b27be3724c892427b732f30575fdcc2977cfaef/blueocean-rest/src/main/java/io/jenkins/blueocean/rest/model/BlueRunnableItem.java
type BlueUser ¶ added in v0.0.5
type BlueUser struct { ID string `json:"id,omitempty"` FullName string `json:"fullName,omitempty"` Email string `json:"email,omitempty"` Avatar string `json:"avatar,omitempty"` Permission *BlueUserPermission `json:"permission,omitempty"` }
BlueUser is an API endpoint for a user. Reference: https://github.com/jenkinsci/blueocean-plugin/blob/6b27be3724c892427b732f30575fdcc2977cfaef/blueocean-rest/src/main/java/io/jenkins/blueocean/rest/model/BlueUser.java#L16
type BlueUserPermission ¶ added in v0.0.5
type BlueUserPermission struct { Administrator bool `json:"administrator,omitempty"` PipelinePermissions *Permissions `json:"pipeline,omitempty"` CredentialPermissions *Permissions `json:"credential,omitempty"` }
BlueUserPermission contains administrator, pipeline permission and credential permission. Reference: https://github.com/jenkinsci/blueocean-plugin/blob/6b27be3724c892427b732f30575fdcc2977cfaef/blueocean-rest/src/main/java/io/jenkins/blueocean/rest/model/BlueUserPermission.java#L14
type Branch ¶ added in v0.0.5
type Branch struct { URL string `json:"url,omitempty"` IsPrimary bool `json:"isPrimary,omitempty"` Issues []Issue `json:"issues,omitempty"` }
Branch contains metadata of branch.
type Build ¶
type Build struct { SimpleJobBuild Building bool Description string DisplayName string Duration int64 EstimatedDuration int64 FullDisplayName string ID string KeepLog bool QueueID int Result string Timestamp int64 PreviousBuild SimpleJobBuild NextBuild SimpleJobBuild }
Build represents a job build
type BuildOption ¶ added in v0.0.3
BuildOption contains some options of Build method.
type Category ¶
type Category struct { Description string ID string Items []CategoryItem MinToShow int Name string Order int }
Category represents a job category
type CategoryItem ¶
CategoryItem represents a job category item
type Cause ¶ added in v0.0.5
type Cause map[string]interface{}
Cause is a map structure and contains shortDescription field at least. Reference: - https://github.com/jenkinsci/blueocean-plugin/blob/6b27be3724c892427b732f30575fdcc2977cfaef/blueocean-rest/src/main/java/io/jenkins/blueocean/rest/model/BlueRun.java#L257 - https://github.com/jenkinsci/jenkins/blob/f8b43c12fb6f07c1118d63f1435e6564723a3253/core/src/main/java/hudson/model/Cause.java#L401
func (Cause) GetShortDescription ¶ added in v0.0.5
GetShortDescription gets short description of current cause.
type Client ¶
type Client struct { core.JenkinsCore Parent string }
Client is client for operate jobs
func (*Client) AddParameters ¶
AddParameters add parameters to a SimplePipeline
func (*Client) BuildAndReturn ¶
func (q *Client) BuildAndReturn(jobName, cause string, timeout, delay int) (build IdentityBuild, err error)
BuildAndReturn trigger a job then returns the build info
func (*Client) BuildWithParams ¶
func (q *Client) BuildWithParams(jobName string, parameters []ParameterDefinition) (err error)
BuildWithParams build a job which has params
func (*Client) Create ¶
func (q *Client) Create(jobPayload CreateJobPayload) (err error)
Create can create a job
func (*Client) CreateJobInFolder ¶
func (q *Client) CreateJobInFolder(jobPayload CreateJobPayload, path string) (err error)
CreateJobInFolder creates a job in a specific folder and create folder first if the folder does not exist
func (*Client) DeleteHistory ¶
DeleteHistory returns the build history of a job
func (*Client) DisableJob ¶
DisableJob disable a job
func (*Client) GetHistory ¶
GetHistory returns the build history of a job
func (*Client) GetJobInputActions ¶
GetJobInputActions returns the all pending actions
func (*Client) GetJobTypeCategories ¶
GetJobTypeCategories returns all categories of jobs
func (*Client) GetPipeline ¶
func (q *Client) GetPipeline(name string) (pipeline *SimplePipeline, err error)
GetPipeline return the pipeline object
func (*Client) JobInputSubmit ¶
func (q *Client) JobInputSubmit(jobName, inputID string, buildID int, abort bool, params map[string]string) (err error)
JobInputSubmit submit the pending input request
func (*Client) RemoveParameters ¶
RemoveParameters add parameters to a SimplePipeline
func (*Client) Search ¶
func (q *Client) Search(name, kind string, start, limit int) (items []JenkinsItem, err error)
Search find a set of jobs by name
func (*Client) SearchViaBlue
deprecated
func (q *Client) SearchViaBlue(name string, start, limit int) (items []JenkinsItem, err error)
SearchViaBlue searches jobs via the BlueOcean API
Deprecated: For clearer client of BlueOcean, please use BlueOceanClient#Search instead
func (*Client) UpdatePipeline ¶
UpdatePipeline updates the pipeline script
type CreateJobPayload ¶
type CreateJobPayload struct { Name string `json:"name"` Mode string `json:"mode"` From string `json:"from"` }
CreateJobPayload the payload for creating a job
type Filter ¶ added in v0.0.5
type Filter string
Filter is Pipeline job filter. Reference: https://github.com/jenkinsci/blueocean-plugin/blob/a7cbc946b73d89daf9dfd91cd713cc7ab64a2d95/blueocean-pipeline-api-impl/src/main/java/io/jenkins/blueocean/rest/impl/pipeline/PipelineJobFilters.java
const ( // FolderJobFilter will filter out non folder Pipelines. FolderJobFilter Filter = "no-folders" // OriginFilter will filter out branches that are not pull requests. OriginFilter Filter = "origin" // PullRequestFilter will filter out branches that are pull requests. PullRequestFilter Filter = "pull-requests" )
type GetBranchesOption ¶ added in v0.0.5
type GetBranchesOption struct { Folders []string PipelineName string Filter Filter Start int Limit int }
GetBranchesOption contains some options for getting Pipeline branches.
type GetBuildOption ¶ added in v0.0.3
GetBuildOption contains some options while getting a specific build.
type GetNodesOption ¶ added in v0.0.3
GetNodesOption contains some options while getting nodes detail.
type GetStepsOption ¶ added in v0.0.5
type GetStepsOption struct { Folders []string PipelineName string Branch string RunID string NodeID string }
GetStepsOption holds options for getting steps data.
type IdentityBuild ¶
type IdentityBuild struct { Build Build Cause IdentityCause }
IdentityBuild is the build which carry the identity cause
type IdentityCause ¶
type IdentityCause struct { UUID string `json:"uuid"` ShortDescription string `json:"shortDescription"` Message string }
IdentityCause carray a identity cause
type Input ¶ added in v0.0.3
type Input struct { ID string `json:"id,omitempty"` Message string `json:"message,omitempty"` Ok string `json:"ok,omitempty"` Parameters []ParameterDefinition `json:"parameters,omitempty"` Submitter string `json:"submitter,omitempty"` }
Input contains input step data.
type InputItem ¶
type InputItem struct { ID string AbortURL string Message string ProceedText string ProceedURL string RedirectApprovalURL string Inputs []ParameterDefinition }
InputItem represents a job input action
type JenkinsInputParametersRequest ¶
type JenkinsInputParametersRequest struct {
Parameter []ParameterDefinition `json:"parameter"`
}
JenkinsInputParametersRequest represents the parameters for the Jenkins input request
type JenkinsItem ¶
type JenkinsItem struct { Name string DisplayName string URL string Description string Type string /** comes from Job */ Buildable bool Building bool InQueue bool /** comes from ParameterizedJob */ Parameterized bool Disabled bool /** comes from blueOcean */ FullName string WeatherScore int Parameters []ParameterDefinition }
JenkinsItem represents the item of Jenkins
type JenkinsStatus ¶
type JenkinsStatus struct { AssignedLabels []AgentLabel Description string Jobs []Job Mode string NodeDescription string NodeName string NumExecutors int PrimaryView View QuietingDown bool SlaveAgentPort int UseCrumbs bool UseSecurity bool Views []View Version string }
JenkinsStatus holds the status of Jenkins
type JenkinsStatusClient ¶
type JenkinsStatusClient struct {
core.JenkinsCore
}
JenkinsStatusClient use to connect with Jenkins status
func (*JenkinsStatusClient) Get ¶
func (q *JenkinsStatusClient) Get() (status *JenkinsStatus, err error)
Get returns status of Jenkins
type Job ¶
type Job struct { Type string `json:"_class"` Builds []Build Color string ConcurrentBuild bool Name string NextBuildNumber int URL string Buildable bool Property []ParametersDefinitionProperty }
Job represents a job
type Node ¶ added in v0.0.3
type Node struct { DisplayDescription string `json:"displayDescription,omitempty"` DisplayName string `json:"displayName,omitempty"` DurationInMillis int `json:"durationInMillis,omitempty"` ID string `json:"id,omitempty"` Input *Input `json:"input,omitempty"` Result string `json:"result,omitempty"` StartTime Time `json:"startTime,omitempty"` State string `json:"state,omitempty"` Type string `json:"type,omitempty"` CauseOfBlockage string `json:"causeOfBlockage,omitempty"` Edges []Edge `json:"edges,omitempty"` FirstParent string `json:"firstParent,omitempty"` Restartable bool `json:"restartable,omitempty"` }
Node represents a node detail of a PipelineRun.
type ParameterDefinition ¶
type ParameterDefinition struct { Description string `json:"description,omitempty"` Name string `json:"name"` Type string `json:"type"` Value string `json:"value"` Filepath string `json:"file,omitempty"` DefaultParameterValue *ParameterValue `json:"defaultParameterValue,omitempty"` // Reference: https://github.com/jenkinsci/jenkins/blob/65b9f1cf51c3b3cf44ecb7d51d3f30d7dbe6b3bd/core/src/main/java/hudson/model/RunParameterDefinition.java#L103-L106 Choices []string `json:"choices,omitempty"` // Reference: https://github.com/jenkinsci/jenkins/blob/65b9f1cf51c3b3cf44ecb7d51d3f30d7dbe6b3bd/core/src/main/java/hudson/model/RunParameterDefinition.java#L103-L106 ProjectName string `json:"projectName,omitempty"` // Reference: https://github.com/jenkinsci/jenkins/blob/65b9f1cf51c3b3cf44ecb7d51d3f30d7dbe6b3bd/core/src/main/java/hudson/model/RunParameterDefinition.java#L116-L121 Filter string `json:"filter,omitempty"` }
ParameterDefinition holds the parameter definition Reference: https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/ParameterDefinition.java#L98
type ParameterValue ¶ added in v0.0.5
type ParameterValue struct { Name string `json:"name"` Value interface{} `json:"value,omitempty"` // Fields of RunParameterValue // Reference: https://github.com/jenkinsci/jenkins/blob/f23512f2bc97d18cd4f0183a7db4a62bc6b84196/core/src/main/java/hudson/model/RunParameterValue.java#L33 JobName string `json:"jobName,omitempty"` Number string `json:"number,omitempty"` }
ParameterValue represents the value for param Reference: https://github.com/jenkinsci/jenkins/blob/f23512f2bc97d18cd4f0183a7db4a62bc6b84196/core/src/main/java/hudson/model/ParameterValue.java#L78
type ParametersDefinitionProperty ¶
type ParametersDefinitionProperty struct {
ParameterDefinitions []ParameterDefinition
}
ParametersDefinitionProperty holds the param definition property
type Permissions ¶ added in v0.0.5
Permissions are a map (string, bool) to represent permission of some operations.
type Pipeline ¶
type Pipeline struct {
BlueMultiBranchPipeline
}
Pipeline represents a Jenkins BlueOcean Pipeline data
type PipelineBranch ¶ added in v0.0.5
type PipelineBranch struct { BlueRunnableItem BluePipelineItem Branch *Branch `json:"branch,omitempty"` PullRequest *PullRequest `json:"pullRequest,omitempty"` }
PipelineBranch is like Pipeline but contains some additional data, such as branch and pull request. Reference: https://github.com/jenkinsci/blueocean-plugin/blob/6b27be3724c892427b732f30575fdcc2977cfaef/blueocean-pipeline-api-impl/src/main/java/io/jenkins/blueocean/rest/impl/pipeline/BranchImpl.java#L37
type PipelineRun ¶ added in v0.0.3
type PipelineRun struct { BlueItemRun QueueID string `json:"queueId,omitempty"` CommitID string `json:"commitId,omitempty"` CommitURL string `json:"commitUrl,omitempty"` PullRequest *PullRequest `json:"pullRequest,omitempty"` Branch *Branch `json:"branch,omitempty"` }
PipelineRun represents a build detail of Pipeline. Reference: https://github.com/jenkinsci/blueocean-plugin/blob/a7cbc946b73d89daf9dfd91cd713cc7ab64a2d95/blueocean-pipeline-api-impl/src/main/java/io/jenkins/blueocean/rest/impl/pipeline/PipelineRunImpl.java
type PipelineRunSummary ¶ added in v0.0.5
type PipelineRunSummary struct {
BlueItemRun
}
PipelineRunSummary is summary of a PipelineRun. Reference: https://github.com/jenkinsci/blueocean-plugin/blob/6b27be3724c892427b732f30575fdcc2977cfaef/blueocean-rest-impl/src/main/java/io/jenkins/blueocean/service/embedded/rest/AbstractBlueRunSummary.java#L18
type PullRequest ¶ added in v0.0.5
type PullRequest struct { ID string `json:"id,omitempty"` Author string `json:"author,omitempty"` Title string `json:"title,omitempty"` URL string `json:"url,omitempty"` }
PullRequest contains metadata of pull request. Reference: https://github.com/jenkinsci/blueocean-plugin/blob/a7cbc946b73d89daf9dfd91cd713cc7ab64a2d95/blueocean-pipeline-api-impl/src/main/java/io/jenkins/blueocean/rest/impl/pipeline/BranchImpl.java#L143
type ReplayOption ¶ added in v0.0.4
ReplayOption contains some options while replaying a PipelineRun.
type SCMSource ¶ added in v0.0.4
SCMSource provides metadata about the backing SCM for a BluePipeline. Reference: https://github.com/jenkinsci/blueocean-plugin/blob/868c0ea4354f19e8d509deacc94325f97151aec0/blueocean-rest/src/main/java/io/jenkins/blueocean/rest/model/BlueScmSource.java
type SimpleJobBuild ¶
SimpleJobBuild represents a simple job build
type SimplePipeline ¶ added in v0.0.3
SimplePipeline represents a pipeline
type Step ¶ added in v0.0.5
type Step struct { ID string `json:"id,omitempty"` DisplayName string `json:"displayName,omitempty"` DisplayDescription string `json:"displayDescription,omitempty"` Type string `json:"type,omitempty"` Result string `json:"result,omitempty"` State string `json:"state,omitempty"` StartTime Time `json:"startTime,omitempty"` DurationInMillis int64 `json:"durationInMillis,omitempty"` Input *Input `json:"input,omitempty"` }
Step represents a step of Pipeline. Reference: https://github.com/jenkinsci/blueocean-plugin/blob/6b27be3724c892427b732f30575fdcc2977cfaef/blueocean-rest/src/main/java/io/jenkins/blueocean/rest/model/BluePipelineStep.java
type Time ¶
Time wraps time.Time for more flexible operations.
func (*Time) MarshalJSON ¶ added in v0.0.5
MarshalJSON implements the json.Marshaler interface.
func (*Time) UnmarshalJSON ¶
UnmarshalJSON implements the json Unmarshaler interface.