Documentation ¶
Index ¶
- Constants
- type JenkinsBuild
- type JenkinsBuildResponse
- type JenkinsJobResponse
- type Source
- func (s *Source) Chunks(ctx context.Context, chunksChan chan *sources.Chunk, ...) error
- func (s *Source) GetJenkinsBuilds(ctx context.Context, jobAbsolutePath string) (JenkinsBuildResponse, error)
- func (s *Source) GetJenkinsJobs(ctx context.Context) (JenkinsJobResponse, error)
- func (s *Source) GetJenkinsObjectsForPath(ctx context.Context, absolutePath string) (JenkinsJobResponse, error)
- func (s *Source) Init(aCtx context.Context, name string, jobId sources.JobID, ...) error
- func (s *Source) JobID() sources.JobID
- func (s *Source) NewRequest(method, url string, body io.Reader) (*http.Request, error)
- func (s *Source) RecursivelyGetJenkinsObjectsForPath(ctx context.Context, absolutePath string) (JenkinsJobResponse, error)
- func (s *Source) SourceID() sources.SourceID
- func (s *Source) Type() sourcespb.SourceType
Constants ¶
View Source
const (
SourceType = sourcespb.SourceType_SOURCE_TYPE_JENKINS
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JenkinsBuild ¶
type JenkinsBuildResponse ¶
type JenkinsBuildResponse struct {
Builds []JenkinsBuild `json:"builds"`
}
type JenkinsJobResponse ¶
type Source ¶
func (*Source) Chunks ¶
func (s *Source) Chunks(ctx context.Context, chunksChan chan *sources.Chunk, _ ...sources.ChunkingTarget) error
Chunks emits chunks of bytes over a channel.
func (*Source) GetJenkinsBuilds ¶
func (*Source) GetJenkinsJobs ¶
func (s *Source) GetJenkinsJobs(ctx context.Context) (JenkinsJobResponse, error)
GetJenkinsJobs traverses the tree to find all jobs. Example response from http://localhost:8080/api/json?tree=jobs[name,url]{0,100} on our Jenkins instance:
{ "_class": "hudson.model.Hudson", "jobs": [ { "_class": "com.cloudbees.hudson.plugins.folder.Folder", "name": "folder1", "url": "http://jenkins:8080/job/folder1/" }, { "_class": "org.jenkinsci.plugins.workflow.job.WorkflowJob", "name": "hon-test", "url": "http://jenkins:8080/job/hon-test/" }, { "_class": "hudson.model.FreeStyleProject", "name": "hon-test-project", "url": "http://jenkins:8080/job/hon-test-project/" }, { "_class": "hudson.model.FreeStyleProject", "name": "steeeve-freestyle-project", "url": "http://jenkins:8080/job/steeeve-freestyle-project/" } ] }
func (*Source) GetJenkinsObjectsForPath ¶
func (*Source) Init ¶
func (s *Source) Init(aCtx context.Context, name string, jobId sources.JobID, sourceId sources.SourceID, verify bool, connection *anypb.Any, _ int) error
Init returns an initialized Jenkins source.
func (*Source) NewRequest ¶
func (*Source) RecursivelyGetJenkinsObjectsForPath ¶
func (*Source) Type ¶
func (s *Source) Type() sourcespb.SourceType
Type returns the type of source. It is used for matching source types in configuration and job input.
Click to show internal directories.
Click to hide internal directories.