Documentation
¶
Index ¶
- Variables
- func JobConfigFromJob(job *Job) *jobConfig
- type Client
- func (client *Client) Do(req *http.Request) (*http.Response, error)
- func (client *Client) DoWithResponse(req *http.Request, v interface{}) (*http.Response, error)
- func (client *Client) NewRequest(method string, path string) (*http.Request, error)
- func (client *Client) NewRequestWithBody(method string, path string, data interface{}) (*http.Request, error)
- type CompareType
- type Config
- type CpsScmFlowDefinition
- type DynamicGerritProjects
- type GitSCM
- func (scm *GitSCM) DeleteBranch(branchId string) error
- func (scm *GitSCM) DeleteExtension(extensionId string) error
- func (scm *GitSCM) DeleteUserRemoteConfig(configId string) error
- func (scm *GitSCM) GetBranch(branchId string) (*GitScmBranchSpec, error)
- func (scm *GitSCM) GetExtension(extensionId string) (GitScmExtension, error)
- func (scm *GitSCM) GetUserRemoteConfig(configId string) (*GitUserRemoteConfig, error)
- func (scm *GitSCM) UpdateBranch(branch *GitScmBranchSpec) error
- func (scm *GitSCM) UpdateExtension(extension GitScmExtension) error
- func (scm *GitSCM) UpdateUserRemoteConfig(config *GitUserRemoteConfig) error
- type GitScmBranchSpec
- type GitScmBranches
- type GitScmCleanBeforeCheckoutExtension
- type GitScmExtension
- type GitScmExtensions
- type GitScmSubmodulesConfig
- type GitUserRemoteConfig
- type GitUserRemoteConfigs
- type JenkinsError
- type Job
- func (job *Job) DeleteAction(actionId string) error
- func (job *Job) DeleteProperty(propertyId string) error
- func (job *Job) Folder() string
- func (job *Job) GetAction(actionId string) (JobAction, error)
- func (job *Job) GetProperty(propertyId string) (JobProperty, error)
- func (job *Job) NameOnly() string
- func (job *Job) UpdateAction(action JobAction) error
- func (job *Job) UpdateProperty(property JobProperty) error
- type JobAction
- type JobActions
- type JobBuildDiscarderProperty
- type JobBuildDiscarderPropertyStrategy
- type JobBuildDiscarderPropertyStrategyLogRotator
- type JobBuildDiscarderPropertyStrategyXml
- type JobDatadogJobProperty
- type JobDeclarativeJobAction
- type JobDeclarativeJobPropertyTrackerAction
- type JobDefinition
- type JobDefinitionXml
- type JobDisableConcurrentBuildsJobProperty
- type JobGerritTrigger
- func (trigger *JobGerritTrigger) DeleteEvent(eventId string) error
- func (trigger *JobGerritTrigger) DeleteProject(projectId string) error
- func (trigger *JobGerritTrigger) GetEvent(eventId string) (JobGerritTriggerOnEvent, error)
- func (trigger *JobGerritTrigger) GetId() string
- func (trigger *JobGerritTrigger) GetProject(projectId string) (*JobGerritTriggerProject, error)
- func (t *JobGerritTrigger) SetId(id string)
- func (trigger *JobGerritTrigger) UpdateEvent(event JobGerritTriggerOnEvent) error
- func (trigger *JobGerritTrigger) UpdateProject(project *JobGerritTriggerProject) error
- type JobGerritTriggerBranch
- type JobGerritTriggerBranches
- type JobGerritTriggerFilePath
- type JobGerritTriggerFilePaths
- type JobGerritTriggerOnEvent
- type JobGerritTriggerOnEvents
- type JobGerritTriggerPluginChangeMergedEvent
- type JobGerritTriggerPluginDraftPublishedEvent
- type JobGerritTriggerPluginPatchsetCreatedEvent
- type JobGerritTriggerProject
- func (project *JobGerritTriggerProject) DeleteBranch(branchId string) error
- func (project *JobGerritTriggerProject) DeleteFilePath(filePathId string) error
- func (project *JobGerritTriggerProject) GetBranch(branchId string) (*JobGerritTriggerBranch, error)
- func (project *JobGerritTriggerProject) GetFilePath(filePathId string) (*JobGerritTriggerFilePath, error)
- func (project *JobGerritTriggerProject) UpdateBranch(branch *JobGerritTriggerBranch) error
- func (project *JobGerritTriggerProject) UpdateFilePath(filePath *JobGerritTriggerFilePath) error
- type JobGerritTriggerProjects
- type JobGerritTriggerSkipVote
- type JobJiraProjectProperty
- type JobParameterDefinition
- type JobParameterDefinitionChoice
- type JobParameterDefinitionChoiceList
- type JobParameterDefinitionChoiceListArray
- type JobParameterDefinitions
- type JobParametersDefinitionProperty
- func (property *JobParametersDefinitionProperty) DeleteParameterDefinition(definitionId string) error
- func (property *JobParametersDefinitionProperty) GetId() string
- func (property *JobParametersDefinitionProperty) GetParameterDefinition(definitionId string) (JobParameterDefinition, error)
- func (p *JobParametersDefinitionProperty) SetId(id string)
- func (property *JobParametersDefinitionProperty) UpdateParameterDefinition(newDefinition JobParameterDefinition) error
- type JobPipelineTriggersProperty
- func (property *JobPipelineTriggersProperty) DeleteTrigger(triggerId string) error
- func (property *JobPipelineTriggersProperty) GetId() string
- func (property *JobPipelineTriggersProperty) GetTrigger(triggerId string) (JobTrigger, error)
- func (p *JobPipelineTriggersProperty) SetId(id string)
- func (property *JobPipelineTriggersProperty) UpdateTrigger(newTrigger JobTrigger) error
- type JobProperties
- type JobProperty
- type JobService
- func (service *JobService) CreateJob(job *Job) error
- func (service *JobService) DeleteJob(jobFullName string) error
- func (service *JobService) GetJob(jobFullName string) (*Job, error)
- func (service *JobService) GetJobs(folder string) (*[]*Job, error)
- func (service *JobService) UpdateJob(job *Job) error
- type JobTrigger
- type JobTriggers
- type JobsResponse
- type ParameterMode
Constants ¶
This section is empty.
Variables ¶
var ErrGitScmBranchNotFound = errors.New("Could not find git scm branch")
ErrGitScmBranchNotFound git scm branch not found
var ErrGitScmExtensionNotFound = errors.New("Could not find git scm extension")
ErrGitScmExtensionNotFound git scm extension not found
var ErrGitScmUserRemoteConfigNotFound = errors.New("Could not find git scm scm user remote config")
ErrGitScmUserRemoteConfigNotFound git scm user remote config not found
var ErrInvalidDecodeResponseParameter = errors.New("nil interface provided to decodeResponse")
ErrInvalidDecodeResponseParameter invalid parameter for decodeResponse
var ErrJobActionNotFound = errors.New("Could not find job action")
ErrJobActionNotFound job action not found
var ErrJobGerritTriggerBranchNotFound = errors.New("Could not find job trigger gerrit branch")
ErrJobGerritTriggerBranchNotFound job trigger gerrit branch not found
var ErrJobGerritTriggerEventNotFound = errors.New("Could not find job gerrit trigger event")
ErrJobGerritTriggerEventNotFound job gerrit trigger event not found
var ErrJobGerritTriggerFilePathNotFound = errors.New("Could not find job trigger gerrit file path")
ErrJobGerritTriggerFilePathNotFound job trigger gerrit file path not found
var ErrJobGerritTriggerProjectNotFound = errors.New("Could not find job gerrit trigger project")
ErrJobGerritTriggerProjectNotFound job gerrit trigger project not found
var ErrJobNameRequired = errors.New("Cannot create a job without a name")
var ErrJobParameterDefinitionNotFound = errors.New("Could not find job parameter definition")
ErrJobParameterDefinitionNotFound job parameter definition not found
var ErrJobPropertyNotFound = errors.New("Could not find job property")
ErrJobPropertyNotFound job property not found
var ErrJobTriggerNotFound = errors.New("Could not find job pipeline trigger")
ErrJobTriggerNotFound job property not found
Functions ¶
func JobConfigFromJob ¶
func JobConfigFromJob(job *Job) *jobConfig
Types ¶
type Client ¶
type Client struct { Config Config // contains filtered or unexported fields }
Client to talk to Jenkins
func (*Client) DoWithResponse ¶
DoWithResponse send http request and parse response body
func (*Client) NewRequest ¶
NewRequest create http request
type CompareType ¶
type CompareType int
const ( CompareTypeUnknown CompareType = iota CompareTypePlain CompareTypeRegExp CompareTypeAnt )
func ParseCompareType ¶
func ParseCompareType(s string) (CompareType, error)
func (CompareType) MarshalXML ¶
func (t CompareType) MarshalXML(e *xml.Encoder, start xml.StartElement) error
func (CompareType) String ¶
func (t CompareType) String() string
func (*CompareType) UnmarshalXML ¶
func (t *CompareType) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
type CpsScmFlowDefinition ¶
type CpsScmFlowDefinition struct { Class string `xml:"class,attr"` Id string `xml:"id,attr,omitempty"` Plugin string `xml:"plugin,attr,omitempty"` SCM *GitSCM `xml:"scm"` ScriptPath string `xml:"scriptPath"` Lightweight bool `xml:"lightweight"` }
func NewCpsScmFlowDefinition ¶
func NewCpsScmFlowDefinition() *CpsScmFlowDefinition
func (*CpsScmFlowDefinition) GetId ¶ added in v0.1.0
func (d *CpsScmFlowDefinition) GetId() string
func (*CpsScmFlowDefinition) SetId ¶ added in v0.1.0
func (d *CpsScmFlowDefinition) SetId(id string)
type DynamicGerritProjects ¶ added in v0.1.0
type DynamicGerritProjects struct { XMLName xml.Name `xml:"dynamicGerritProjects"` Class string `xml:"class,attr"` }
func NewDynamicGerritProjects ¶ added in v0.1.0
func NewDynamicGerritProjects() *DynamicGerritProjects
type GitSCM ¶
type GitSCM struct { XMLName xml.Name `xml:"scm"` Class string `xml:"class,attr"` Plugin string `xml:"plugin,attr,omitempty"` ConfigVersion string `xml:"configVersion"` UserRemoteConfigs *GitUserRemoteConfigs `xml:"userRemoteConfigs"` Branches *GitScmBranches `xml:"branches"` DoGenerateSubmoduleConfigurations bool `xml:"doGenerateSubmoduleConfigurations"` SubmoduleCfg *GitScmSubmodulesConfig `xml:"submoduleCfg"` Extensions *GitScmExtensions `xml:"extensions"` }
func (*GitSCM) DeleteBranch ¶
func (*GitSCM) DeleteExtension ¶
func (*GitSCM) DeleteUserRemoteConfig ¶
func (*GitSCM) GetExtension ¶
func (scm *GitSCM) GetExtension(extensionId string) (GitScmExtension, error)
func (*GitSCM) GetUserRemoteConfig ¶
func (scm *GitSCM) GetUserRemoteConfig(configId string) (*GitUserRemoteConfig, error)
func (*GitSCM) UpdateBranch ¶
func (scm *GitSCM) UpdateBranch(branch *GitScmBranchSpec) error
func (*GitSCM) UpdateExtension ¶
func (scm *GitSCM) UpdateExtension(extension GitScmExtension) error
func (*GitSCM) UpdateUserRemoteConfig ¶
func (scm *GitSCM) UpdateUserRemoteConfig(config *GitUserRemoteConfig) error
type GitScmBranchSpec ¶
func NewGitScmBranchSpec ¶
func NewGitScmBranchSpec() *GitScmBranchSpec
type GitScmBranches ¶
type GitScmBranches struct { XMLName xml.Name `xml:"branches"` Items *[]*GitScmBranchSpec `xml:"hudson.plugins.git.BranchSpec"` }
func NewGitScmBranches ¶
func NewGitScmBranches() *GitScmBranches
func (*GitScmBranches) Append ¶
func (branches *GitScmBranches) Append(branch *GitScmBranchSpec) *GitScmBranches
type GitScmCleanBeforeCheckoutExtension ¶
type GitScmCleanBeforeCheckoutExtension struct { XMLName xml.Name `xml:"hudson.plugins.git.extensions.impl.CleanBeforeCheckout"` Id string `xml:"id,attr,omitempty"` }
func NewGitScmCleanBeforeCheckoutExtension ¶
func NewGitScmCleanBeforeCheckoutExtension() *GitScmCleanBeforeCheckoutExtension
func (*GitScmCleanBeforeCheckoutExtension) GetId ¶
func (e *GitScmCleanBeforeCheckoutExtension) GetId() string
func (*GitScmCleanBeforeCheckoutExtension) SetId ¶ added in v0.1.0
func (e *GitScmCleanBeforeCheckoutExtension) SetId(id string)
type GitScmExtension ¶
type GitScmExtensions ¶
type GitScmExtensions struct {
Items *[]GitScmExtension
}
func NewGitScmExtensions ¶
func NewGitScmExtensions() *GitScmExtensions
func (*GitScmExtensions) Append ¶
func (extensions *GitScmExtensions) Append(extension GitScmExtension) *GitScmExtensions
func (*GitScmExtensions) UnmarshalXML ¶
func (extensions *GitScmExtensions) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
type GitScmSubmodulesConfig ¶ added in v0.1.0
type GitScmSubmodulesConfig struct {
Class string `xml:"class,attr"`
}
func NewGitScmSubmodulesConfig ¶ added in v0.1.0
func NewGitScmSubmodulesConfig() *GitScmSubmodulesConfig
type GitUserRemoteConfig ¶
type GitUserRemoteConfig struct { Id string `xml:"id,attr,omitempty"` Refspec string `xml:"refspec"` Url string `xml:"url"` CredentialsId string `xml:"credentialsId"` }
func NewGitUserRemoteConfig ¶
func NewGitUserRemoteConfig() *GitUserRemoteConfig
type GitUserRemoteConfigs ¶
type GitUserRemoteConfigs struct { XMLName xml.Name `xml:"userRemoteConfigs"` Items *[]*GitUserRemoteConfig `xml:"hudson.plugins.git.UserRemoteConfig"` }
func NewGitUserRemoteConfigs ¶
func NewGitUserRemoteConfigs() *GitUserRemoteConfigs
func (*GitUserRemoteConfigs) Append ¶
func (configs *GitUserRemoteConfigs) Append(config *GitUserRemoteConfig) *GitUserRemoteConfigs
type JenkinsError ¶
JenkinsError Error response from jenkins
func (*JenkinsError) UnmarshalXML ¶
func (jenkinsError *JenkinsError) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
type Job ¶
type Job struct { Id string Plugin string Name string Disabled bool Actions *JobActions `xml:"actions"` Description string KeepDependencies bool Properties *JobProperties Definition JobDefinition }
Job
func (*Job) DeleteAction ¶ added in v0.1.0
func (*Job) DeleteProperty ¶
func (*Job) GetProperty ¶
func (job *Job) GetProperty(propertyId string) (JobProperty, error)
func (*Job) UpdateAction ¶ added in v0.1.0
func (*Job) UpdateProperty ¶ added in v0.1.0
func (job *Job) UpdateProperty(property JobProperty) error
type JobActions ¶ added in v0.1.0
func NewJobActions ¶ added in v0.1.0
func NewJobActions() *JobActions
func (*JobActions) Append ¶ added in v0.1.0
func (actions *JobActions) Append(action JobAction) *JobActions
func (*JobActions) UnmarshalXML ¶ added in v0.1.0
func (actions *JobActions) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
type JobBuildDiscarderProperty ¶
type JobBuildDiscarderProperty struct { XMLName xml.Name `xml:"jenkins.model.BuildDiscarderProperty"` Id string `xml:"id,attr"` Strategy *JobBuildDiscarderPropertyStrategyXml `xml:"strategy"` }
func NewJobBuildDiscarderProperty ¶
func NewJobBuildDiscarderProperty() *JobBuildDiscarderProperty
func (*JobBuildDiscarderProperty) GetId ¶
func (p *JobBuildDiscarderProperty) GetId() string
func (*JobBuildDiscarderProperty) SetId ¶ added in v0.1.0
func (p *JobBuildDiscarderProperty) SetId(id string)
type JobBuildDiscarderPropertyStrategyLogRotator ¶
type JobBuildDiscarderPropertyStrategyLogRotator struct { Id string `xml:"id,attr,omitempty"` Class string `xml:"class,attr"` DaysToKeep int `xml:"daysToKeep"` NumToKeep int `xml:"numToKeep"` ArtifactDaysToKeep int `xml:"artifactDaysToKeep"` ArtifactNumToKeep int `xml:"artifactNumToKeep"` }
func NewJobBuildDiscarderPropertyStrategyLogRotator ¶
func NewJobBuildDiscarderPropertyStrategyLogRotator() *JobBuildDiscarderPropertyStrategyLogRotator
func (*JobBuildDiscarderPropertyStrategyLogRotator) GetId ¶ added in v0.1.0
func (s *JobBuildDiscarderPropertyStrategyLogRotator) GetId() string
func (*JobBuildDiscarderPropertyStrategyLogRotator) SetId ¶ added in v0.1.0
func (s *JobBuildDiscarderPropertyStrategyLogRotator) SetId(id string)
type JobBuildDiscarderPropertyStrategyXml ¶
type JobBuildDiscarderPropertyStrategyXml struct {
Item JobBuildDiscarderPropertyStrategy `xml:",any"`
}
func NewJobBuildDiscarderPropertyStrategyXml ¶
func NewJobBuildDiscarderPropertyStrategyXml() *JobBuildDiscarderPropertyStrategyXml
func (*JobBuildDiscarderPropertyStrategyXml) MarshalXML ¶
func (strategy *JobBuildDiscarderPropertyStrategyXml) MarshalXML(e *xml.Encoder, start xml.StartElement) error
func (*JobBuildDiscarderPropertyStrategyXml) UnmarshalXML ¶
func (strategy *JobBuildDiscarderPropertyStrategyXml) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
type JobDatadogJobProperty ¶ added in v0.1.0
type JobDatadogJobProperty struct { XMLName xml.Name `xml:"org.datadog.jenkins.plugins.datadog.DatadogJobProperty"` Id string `xml:"id,attr,omitempty"` Plugin string `xml:"plugin,attr,omitempty"` EmitOnCheckout bool `xml:"emitOnCheckout"` }
func NewJobDatadogJobProperty ¶ added in v0.1.0
func NewJobDatadogJobProperty() *JobDatadogJobProperty
func (*JobDatadogJobProperty) GetId ¶ added in v0.1.0
func (property *JobDatadogJobProperty) GetId() string
func (*JobDatadogJobProperty) SetId ¶ added in v0.1.0
func (p *JobDatadogJobProperty) SetId(id string)
type JobDeclarativeJobAction ¶ added in v0.1.0
type JobDeclarativeJobAction struct { XMLName xml.Name `xml:"org.jenkinsci.plugins.pipeline.modeldefinition.actions.DeclarativeJobAction"` Id string `xml:"id,attr,omitempty"` Plugin string `xml:"plugin,attr,omitempty"` }
func NewJobDeclarativeJobAction ¶ added in v0.1.0
func NewJobDeclarativeJobAction() *JobDeclarativeJobAction
func (*JobDeclarativeJobAction) GetId ¶ added in v0.1.0
func (action *JobDeclarativeJobAction) GetId() string
func (*JobDeclarativeJobAction) SetId ¶ added in v0.1.0
func (a *JobDeclarativeJobAction) SetId(id string)
type JobDeclarativeJobPropertyTrackerAction ¶ added in v0.1.0
type JobDeclarativeJobPropertyTrackerAction struct { XMLName xml.Name `xml:"org.jenkinsci.plugins.pipeline.modeldefinition.actions.DeclarativeJobPropertyTrackerAction"` Id string `xml:"id,attr,omitempty"` Plugin string `xml:"plugin,attr,omitempty"` JobProperties string `xml:"jobProperties"` Triggers string `xml:"triggers"` Parameters string `xml:"parameters"` Options string `xml:"options"` }
func NewJobDeclarativeJobPropertyTrackerAction ¶ added in v0.1.0
func NewJobDeclarativeJobPropertyTrackerAction() *JobDeclarativeJobPropertyTrackerAction
func (*JobDeclarativeJobPropertyTrackerAction) GetId ¶ added in v0.1.0
func (action *JobDeclarativeJobPropertyTrackerAction) GetId() string
func (*JobDeclarativeJobPropertyTrackerAction) SetId ¶ added in v0.1.0
func (a *JobDeclarativeJobPropertyTrackerAction) SetId(id string)
type JobDefinition ¶
type JobDefinitionXml ¶
type JobDefinitionXml struct {
Item JobDefinition
}
func (*JobDefinitionXml) MarshalXML ¶
func (jobDefinition *JobDefinitionXml) MarshalXML(e *xml.Encoder, start xml.StartElement) error
func (*JobDefinitionXml) UnmarshalXML ¶
func (jobDefinition *JobDefinitionXml) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
type JobDisableConcurrentBuildsJobProperty ¶ added in v0.3.0
type JobDisableConcurrentBuildsJobProperty struct { XMLName xml.Name `xml:"org.jenkinsci.plugins.workflow.job.properties.DisableConcurrentBuildsJobProperty"` Id string `xml:"id,attr,omitempty"` Plugin string `xml:"plugin,attr,omitempty"` }
func NewJobDisableConcurrentBuildsJobProperty ¶ added in v0.3.0
func NewJobDisableConcurrentBuildsJobProperty() *JobDisableConcurrentBuildsJobProperty
func (*JobDisableConcurrentBuildsJobProperty) GetId ¶ added in v0.3.0
func (property *JobDisableConcurrentBuildsJobProperty) GetId() string
func (*JobDisableConcurrentBuildsJobProperty) SetId ¶ added in v0.3.0
func (p *JobDisableConcurrentBuildsJobProperty) SetId(id string)
type JobGerritTrigger ¶
type JobGerritTrigger struct { XMLName xml.Name `xml:"com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger"` Id string `xml:"id,attr,omitempty"` Plugin string `xml:"plugin,attr,omitempty"` Spec string `xml:"spec"` Projects *JobGerritTriggerProjects `xml:"gerritProjects"` DynamicGerritProjects *DynamicGerritProjects `xml:"dynamicGerritProjects"` SkipVote *JobGerritTriggerSkipVote `xml:"skipVote"` SilentMode bool `xml:"silentMode"` NotificationLevel string `xml:"notificationLevel"` SilentStartMode bool `xml:"silentStartMode"` EscapeQuotes bool `xml:"escapeQuotes"` NameAndEmailParameterMode ParameterMode `xml:"nameAndEmailParameterMode"` DependencyJobsNames string `xml:"dependencyJobsNames"` CommitMessageParameterMode ParameterMode `xml:"commitMessageParameterMode"` ChangeSubjectParameterMode ParameterMode `xml:"changeSubjectParameterMode"` CommentTextParameterMode ParameterMode `xml:"commentTextParameterMode"` BuildStartMessage string `xml:"buildStartMessage"` BuildFailureMessage string `xml:"buildFailureMessage"` BuildSuccessfulMessage string `xml:"buildSuccessfulMessage"` BuildUnstableMessage string `xml:"buildUnstableMessage"` BuildNotBuiltMessage string `xml:"buildNotBuiltMessage"` BuildUnsuccessfulFilepath string `xml:"buildUnsuccessfulFilepath"` CustomUrl string `xml:"customUrl"` ServerName string `xml:"serverName"` TriggerOnEvents *JobGerritTriggerOnEvents `xml:"triggerOnEvents"` DynamicTriggerConfiguration bool `xml:"dynamicTriggerConfiguration"` TriggerConfigURL string `xml:"triggerConfigURL"` TriggerInformationAction string `xml:"triggerInformationAction"` }
func NewJobGerritTrigger ¶
func NewJobGerritTrigger() *JobGerritTrigger
func (*JobGerritTrigger) DeleteEvent ¶
func (trigger *JobGerritTrigger) DeleteEvent(eventId string) error
func (*JobGerritTrigger) DeleteProject ¶
func (trigger *JobGerritTrigger) DeleteProject(projectId string) error
func (*JobGerritTrigger) GetEvent ¶
func (trigger *JobGerritTrigger) GetEvent(eventId string) (JobGerritTriggerOnEvent, error)
func (*JobGerritTrigger) GetId ¶
func (trigger *JobGerritTrigger) GetId() string
func (*JobGerritTrigger) GetProject ¶
func (trigger *JobGerritTrigger) GetProject(projectId string) (*JobGerritTriggerProject, error)
func (*JobGerritTrigger) SetId ¶ added in v0.1.0
func (t *JobGerritTrigger) SetId(id string)
func (*JobGerritTrigger) UpdateEvent ¶
func (trigger *JobGerritTrigger) UpdateEvent(event JobGerritTriggerOnEvent) error
func (*JobGerritTrigger) UpdateProject ¶
func (trigger *JobGerritTrigger) UpdateProject(project *JobGerritTriggerProject) error
type JobGerritTriggerBranch ¶
type JobGerritTriggerBranch struct { Id string `xml:"id,attr,omitempty"` CompareType CompareType `xml:"compareType"` Pattern string `xml:"pattern"` }
func NewJobGerritTriggerBranch ¶
func NewJobGerritTriggerBranch() *JobGerritTriggerBranch
type JobGerritTriggerBranches ¶
type JobGerritTriggerBranches struct {
Items *[]*JobGerritTriggerBranch `xml:"com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch"`
}
func NewJobGerritTriggerBranches ¶
func NewJobGerritTriggerBranches() *JobGerritTriggerBranches
func (*JobGerritTriggerBranches) Append ¶
func (branches *JobGerritTriggerBranches) Append(branch *JobGerritTriggerBranch) *JobGerritTriggerBranches
type JobGerritTriggerFilePath ¶ added in v0.2.0
type JobGerritTriggerFilePath struct { Id string `xml:"id,attr,omitempty"` CompareType CompareType `xml:"compareType"` Pattern string `xml:"pattern"` }
func NewJobGerritTriggerFilePath ¶ added in v0.2.0
func NewJobGerritTriggerFilePath() *JobGerritTriggerFilePath
type JobGerritTriggerFilePaths ¶ added in v0.2.0
type JobGerritTriggerFilePaths struct {
Items *[]*JobGerritTriggerFilePath `xml:"com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath"`
}
func NewJobGerritTriggerFilePaths ¶ added in v0.2.0
func NewJobGerritTriggerFilePaths() *JobGerritTriggerFilePaths
func (*JobGerritTriggerFilePaths) Append ¶ added in v0.2.0
func (paths *JobGerritTriggerFilePaths) Append(path *JobGerritTriggerFilePath) *JobGerritTriggerFilePaths
type JobGerritTriggerOnEvent ¶
type JobGerritTriggerOnEvents ¶
type JobGerritTriggerOnEvents struct { XMLName xml.Name `xml:"triggerOnEvents"` Class string `xml:"class,attr"` Items *[]JobGerritTriggerOnEvent }
func NewJobGerritTriggerOnEvents ¶
func NewJobGerritTriggerOnEvents() *JobGerritTriggerOnEvents
func (*JobGerritTriggerOnEvents) Append ¶
func (events *JobGerritTriggerOnEvents) Append(event JobGerritTriggerOnEvent) *JobGerritTriggerOnEvents
func (*JobGerritTriggerOnEvents) UnmarshalXML ¶
func (events *JobGerritTriggerOnEvents) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
type JobGerritTriggerPluginChangeMergedEvent ¶ added in v0.2.0
type JobGerritTriggerPluginChangeMergedEvent struct { XMLName xml.Name `xml:"com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginChangeMergedEvent"` Id string `xml:"id,attr,omitempty"` }
func NewJobGerritTriggerPluginChangeMergedEvent ¶ added in v0.2.0
func NewJobGerritTriggerPluginChangeMergedEvent() *JobGerritTriggerPluginChangeMergedEvent
func (*JobGerritTriggerPluginChangeMergedEvent) GetId ¶ added in v0.2.0
func (event *JobGerritTriggerPluginChangeMergedEvent) GetId() string
func (*JobGerritTriggerPluginChangeMergedEvent) SetId ¶ added in v0.2.0
func (e *JobGerritTriggerPluginChangeMergedEvent) SetId(id string)
type JobGerritTriggerPluginDraftPublishedEvent ¶
type JobGerritTriggerPluginDraftPublishedEvent struct { XMLName xml.Name `xml:"com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginDraftPublishedEvent"` Id string `xml:"id,attr,omitempty"` }
func NewJobGerritTriggerPluginDraftPublishedEvent ¶
func NewJobGerritTriggerPluginDraftPublishedEvent() *JobGerritTriggerPluginDraftPublishedEvent
func (*JobGerritTriggerPluginDraftPublishedEvent) GetId ¶
func (event *JobGerritTriggerPluginDraftPublishedEvent) GetId() string
func (*JobGerritTriggerPluginDraftPublishedEvent) SetId ¶ added in v0.1.0
func (e *JobGerritTriggerPluginDraftPublishedEvent) SetId(id string)
type JobGerritTriggerPluginPatchsetCreatedEvent ¶
type JobGerritTriggerPluginPatchsetCreatedEvent struct { XMLName xml.Name `xml:"com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginPatchsetCreatedEvent"` Id string `xml:"id,attr,omitempty"` ExcludeDrafts bool `xml:"excludeDrafts"` ExcludeTrivialRebase bool `xml:"excludeTrivialRebase"` ExcludeNoCodeChange bool `xml:"excludeNoCodeChange"` ExcludePrivateState bool `xml:"excludePrivateState"` ExcludeWipState bool `xml:"excludeWipState"` }
func NewJobGerritTriggerPluginPatchsetCreatedEvent ¶
func NewJobGerritTriggerPluginPatchsetCreatedEvent() *JobGerritTriggerPluginPatchsetCreatedEvent
func (*JobGerritTriggerPluginPatchsetCreatedEvent) GetId ¶
func (event *JobGerritTriggerPluginPatchsetCreatedEvent) GetId() string
func (*JobGerritTriggerPluginPatchsetCreatedEvent) SetId ¶ added in v0.1.0
func (e *JobGerritTriggerPluginPatchsetCreatedEvent) SetId(id string)
type JobGerritTriggerProject ¶
type JobGerritTriggerProject struct { XMLName xml.Name `xml:"com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject"` Id string `xml:"id,attr,omitempty"` CompareType CompareType `xml:"compareType"` Pattern string `xml:"pattern"` Branches *JobGerritTriggerBranches `xml:"branches"` FilePaths *JobGerritTriggerFilePaths `xml:"filePaths"` DisableStrictForbiddenFileVerification bool `xml:"disableStrictForbiddenFileVerification"` }
func NewJobGerritTriggerProject ¶
func NewJobGerritTriggerProject() *JobGerritTriggerProject
func (*JobGerritTriggerProject) DeleteBranch ¶
func (project *JobGerritTriggerProject) DeleteBranch(branchId string) error
func (*JobGerritTriggerProject) DeleteFilePath ¶ added in v0.2.0
func (project *JobGerritTriggerProject) DeleteFilePath(filePathId string) error
func (*JobGerritTriggerProject) GetBranch ¶
func (project *JobGerritTriggerProject) GetBranch(branchId string) (*JobGerritTriggerBranch, error)
func (*JobGerritTriggerProject) GetFilePath ¶ added in v0.2.0
func (project *JobGerritTriggerProject) GetFilePath(filePathId string) (*JobGerritTriggerFilePath, error)
func (*JobGerritTriggerProject) UpdateBranch ¶
func (project *JobGerritTriggerProject) UpdateBranch(branch *JobGerritTriggerBranch) error
func (*JobGerritTriggerProject) UpdateFilePath ¶ added in v0.2.0
func (project *JobGerritTriggerProject) UpdateFilePath(filePath *JobGerritTriggerFilePath) error
type JobGerritTriggerProjects ¶
type JobGerritTriggerProjects struct {
Items *[]*JobGerritTriggerProject `xml:",any"`
}
func NewJobGerritTriggerProjects ¶
func NewJobGerritTriggerProjects() *JobGerritTriggerProjects
func (*JobGerritTriggerProjects) Append ¶
func (projects *JobGerritTriggerProjects) Append(project *JobGerritTriggerProject) *JobGerritTriggerProjects
type JobGerritTriggerSkipVote ¶
type JobGerritTriggerSkipVote struct { OnSuccessful bool `xml:"onSuccessful"` OnFailed bool `xml:"onFailed"` OnUnstable bool `xml:"onUnstable"` OnNotBuilt bool `xml:"onNotBuilt"` }
func NewJobGerritTriggerSkipVote ¶
func NewJobGerritTriggerSkipVote() *JobGerritTriggerSkipVote
type JobJiraProjectProperty ¶ added in v0.1.0
type JobJiraProjectProperty struct { XMLName xml.Name `xml:"hudson.plugins.jira.JiraProjectProperty"` Id string `xml:"id,attr,omitempty"` Plugin string `xml:"plugin,attr,omitempty"` }
func NewJobJiraProjectProperty ¶ added in v0.1.0
func NewJobJiraProjectProperty() *JobJiraProjectProperty
func (*JobJiraProjectProperty) GetId ¶ added in v0.1.0
func (property *JobJiraProjectProperty) GetId() string
func (*JobJiraProjectProperty) SetId ¶ added in v0.1.0
func (p *JobJiraProjectProperty) SetId(id string)
type JobParameterDefinition ¶ added in v0.3.0
type JobParameterDefinitionChoice ¶ added in v0.3.0
type JobParameterDefinitionChoice struct { Id string `xml:"id,attr,omitempty"` XMLName xml.Name `xml:"hudson.model.ChoiceParameterDefinition"` Name string `xml:"name"` Description string `xml:"description"` Choices *JobParameterDefinitionChoiceList `xml:"choices"` }
func NewJobParameterDefinitionChoice ¶ added in v0.3.0
func NewJobParameterDefinitionChoice() *JobParameterDefinitionChoice
func (*JobParameterDefinitionChoice) GetId ¶ added in v0.3.0
func (d *JobParameterDefinitionChoice) GetId() string
func (*JobParameterDefinitionChoice) SetId ¶ added in v0.3.0
func (d *JobParameterDefinitionChoice) SetId(id string)
type JobParameterDefinitionChoiceList ¶ added in v0.3.0
type JobParameterDefinitionChoiceList struct { XMLName xml.Name `xml:"choices"` Class string `xml:"class,attr,omitempty"` Items *JobParameterDefinitionChoiceListArray `xml:"a"` }
func NewJobParameterDefinitionChoiceList ¶ added in v0.3.0
func NewJobParameterDefinitionChoiceList() *JobParameterDefinitionChoiceList
func (*JobParameterDefinitionChoiceList) Append ¶ added in v0.3.0
func (choices *JobParameterDefinitionChoiceList) Append(choice string) *JobParameterDefinitionChoiceList
type JobParameterDefinitionChoiceListArray ¶ added in v0.3.0
type JobParameterDefinitionChoiceListArray struct { XMLName xml.Name `xml:"a"` Class string `xml:"class,attr,omitempty"` Items *[]string `xml:"string"` }
func NewJobParameterDefinitionChoiceListArray ¶ added in v0.3.0
func NewJobParameterDefinitionChoiceListArray() *JobParameterDefinitionChoiceListArray
func (*JobParameterDefinitionChoiceListArray) Append ¶ added in v0.3.0
func (choices *JobParameterDefinitionChoiceListArray) Append(choice string) *JobParameterDefinitionChoiceListArray
type JobParameterDefinitions ¶ added in v0.3.0
type JobParameterDefinitions struct { XMLName xml.Name `xml:"parameterDefinitions"` Items *[]JobParameterDefinition }
func NewJobParameterDefinitions ¶ added in v0.3.0
func NewJobParameterDefinitions() *JobParameterDefinitions
func (*JobParameterDefinitions) Append ¶ added in v0.3.0
func (defs *JobParameterDefinitions) Append(def JobParameterDefinition) *JobParameterDefinitions
func (*JobParameterDefinitions) UnmarshalXML ¶ added in v0.3.0
func (defs *JobParameterDefinitions) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
type JobParametersDefinitionProperty ¶ added in v0.3.0
type JobParametersDefinitionProperty struct { XMLName xml.Name `xml:"hudson.model.ParametersDefinitionProperty"` Id string `xml:"id,attr,omitempty"` Plugin string `xml:"plugin,attr,omitempty"` ParameterDefinitions *JobParameterDefinitions `xml:"parameterDefinitions"` }
func NewJobParametersDefinitionProperty ¶ added in v0.3.0
func NewJobParametersDefinitionProperty() *JobParametersDefinitionProperty
func (*JobParametersDefinitionProperty) DeleteParameterDefinition ¶ added in v0.3.0
func (property *JobParametersDefinitionProperty) DeleteParameterDefinition(definitionId string) error
func (*JobParametersDefinitionProperty) GetId ¶ added in v0.3.0
func (property *JobParametersDefinitionProperty) GetId() string
func (*JobParametersDefinitionProperty) GetParameterDefinition ¶ added in v0.3.0
func (property *JobParametersDefinitionProperty) GetParameterDefinition( definitionId string, ) (JobParameterDefinition, error)
func (*JobParametersDefinitionProperty) SetId ¶ added in v0.3.0
func (p *JobParametersDefinitionProperty) SetId(id string)
func (*JobParametersDefinitionProperty) UpdateParameterDefinition ¶ added in v0.3.0
func (property *JobParametersDefinitionProperty) UpdateParameterDefinition( newDefinition JobParameterDefinition, ) error
type JobPipelineTriggersProperty ¶
type JobPipelineTriggersProperty struct { XMLName xml.Name `xml:"org.jenkinsci.plugins.workflow.job.properties.PipelineTriggersJobProperty"` Id string `xml:"id,attr,omitempty"` Triggers *JobTriggers `xml:"triggers"` }
func NewJobPipelineTriggersProperty ¶
func NewJobPipelineTriggersProperty() *JobPipelineTriggersProperty
func (*JobPipelineTriggersProperty) DeleteTrigger ¶
func (property *JobPipelineTriggersProperty) DeleteTrigger(triggerId string) error
func (*JobPipelineTriggersProperty) GetId ¶
func (property *JobPipelineTriggersProperty) GetId() string
func (*JobPipelineTriggersProperty) GetTrigger ¶
func (property *JobPipelineTriggersProperty) GetTrigger(triggerId string) (JobTrigger, error)
func (*JobPipelineTriggersProperty) SetId ¶ added in v0.1.0
func (p *JobPipelineTriggersProperty) SetId(id string)
func (*JobPipelineTriggersProperty) UpdateTrigger ¶
func (property *JobPipelineTriggersProperty) UpdateTrigger(newTrigger JobTrigger) error
type JobProperties ¶
type JobProperties struct { XMLName xml.Name `xml:"properties"` Items *[]JobProperty `xml:",any"` }
func NewJobProperties ¶
func NewJobProperties() *JobProperties
func (*JobProperties) Append ¶
func (properties *JobProperties) Append(property JobProperty) *JobProperties
func (*JobProperties) UnmarshalXML ¶
func (properties *JobProperties) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
type JobProperty ¶
type JobService ¶
type JobService struct {
*Client
}
JobService for interacting with jenkins jobs
func (*JobService) CreateJob ¶
func (service *JobService) CreateJob(job *Job) error
func (*JobService) DeleteJob ¶
func (service *JobService) DeleteJob(jobFullName string) error
func (*JobService) GetJobs ¶
func (service *JobService) GetJobs(folder string) (*[]*Job, error)
GetJobs get all jobs
func (*JobService) UpdateJob ¶
func (service *JobService) UpdateJob(job *Job) error
type JobTrigger ¶
type JobTriggers ¶
type JobTriggers struct { XMLName xml.Name `xml:"triggers"` Items *[]JobTrigger }
func NewJobTriggers ¶
func NewJobTriggers() *JobTriggers
func (*JobTriggers) Append ¶
func (triggers *JobTriggers) Append(trigger JobTrigger) *JobTriggers
func (*JobTriggers) UnmarshalXML ¶
func (triggers *JobTriggers) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
type JobsResponse ¶
type JobsResponse struct {
Jobs *[]*jobDetails `xml:"job"`
}
type ParameterMode ¶
type ParameterMode int
const ( ParameterModeUnknown ParameterMode = iota ParameterModePlain ParameterModeBase64 )
func ParseParameterMode ¶
func ParseParameterMode(s string) (ParameterMode, error)
func (ParameterMode) MarshalXML ¶
func (t ParameterMode) MarshalXML(e *xml.Encoder, start xml.StartElement) error
func (ParameterMode) String ¶
func (t ParameterMode) String() string
func (*ParameterMode) UnmarshalXML ¶
func (t *ParameterMode) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
Source Files
¶
- client.go
- compare_type.go
- cps_scm_flow_definition.go
- git_scm.go
- git_scm_branch_spec.go
- git_scm_branches.go
- git_scm_clean_before_checkout_extension.go
- git_scm_extension.go
- git_scm_extensions.go
- git_scm_submodules_config.go
- git_user_remote_config.go
- git_user_remote_configs.go
- jenkins_error.go
- job.go
- job_action.go
- job_actions.go
- job_build_discarder_property.go
- job_build_discarder_property_strategy.go
- job_build_discarder_property_strategy_log_rotator.go
- job_build_discarder_property_strategy_xml.go
- job_config.go
- job_datadog_job_property.go
- job_declarative_job_action.go
- job_declarative_job_property_tracker_action.go
- job_definition.go
- job_details.go
- job_disable_concurrent_builds_job_property.go
- job_dynamic_gerrit_projects.go
- job_gerrit_trigger.go
- job_gerrit_trigger_branch.go
- job_gerrit_trigger_branches.go
- job_gerrit_trigger_file_path.go
- job_gerrit_trigger_file_paths.go
- job_gerrit_trigger_on_event.go
- job_gerrit_trigger_on_events.go
- job_gerrit_trigger_plugin_change_merged_event.go
- job_gerrit_trigger_plugin_draft_published_event.go
- job_gerrit_trigger_plugin_patchset_created_event.go
- job_gerrit_trigger_project.go
- job_gerrit_trigger_projects.go
- job_gerrit_trigger_skip_vote.go
- job_jira_project_property.go
- job_parameter_definition.go
- job_parameter_definition_choice.go
- job_parameter_definition_choice_list.go
- job_parameter_definition_choice_list_array.go
- job_parameters_definition_property.go
- job_parameters_definitions.go
- job_pipeline_triggers_property.go
- job_properties.go
- job_property.go
- job_service.go
- job_trigger.go
- job_triggers.go
- parameter_mode.go