jenkins

package
v0.0.0-...-7c3836c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	Class                string                 `json:"_class"`
	ParameterDefinitions []ParameterDefinitions `json:"parameterDefinitions"`
}

type Artifact

type Artifact struct {
	RelativePath string `xml:"relative_path"`
}

type Auth

type Auth struct {
	Username string
	ApiToken string
}

type BranchSpec

type BranchSpec struct {
	Name string `xml:"name"`
}

type Branches

type Branches struct {
	BranchSpec HudsonPluginsGitBranchSpec `xml:"hudson.plugins.git.BranchSpec"`
}

type Build

type Build struct {
	Id     string `json:"id"`
	Class  string `json:"_class"`
	Number int    `json:"number"`
	URL    string `json:"url"`

	FullDisplayName string `json:"fullDisplayName"`
	Description     string `json:"description"`

	Timestamp         int `json:"timestamp"`
	Duration          int `json:"duration"`
	EstimatedDuration int `json:"estimatedDuration"`

	Building bool   `json:"building"`
	KeepLog  bool   `json:"keepLog"`
	Result   string `json:"result"`

	Artifacts []Artifact `json:"artifacts"`
	Actions   []Action   `json:"actions"`
}

type Computer

type Computer struct {
}

type ComputerObject

type ComputerObject struct {
}

type DefaultParameterValue

type DefaultParameterValue struct {
	Class string `json:"_class"`
	Value string `json:"value"`
}

type GitUserRemoteConfig

type GitUserRemoteConfig struct {
	Url           string `xml:"url"`
	CredentialsId string `xml:"credentialsId"`
}

type HealthReport

type HealthReport struct {
	Description   string `json:"description"`
	IconClassName string `json:"iconClassName"`
	IconURL       string `json:"iconUrl"`
	Score         int    `json:"score"`
}

type HudsonModelParametersDefinitionProperty

type HudsonModelParametersDefinitionProperty struct {
	Text                 string               `xml:",chardata"`
	ParameterDefinitions ParameterDefinitions `xml:"parameterDefinitions"`
}

type HudsonModelTextParameterDefinition

type HudsonModelTextParameterDefinition struct {
	Text         string `xml:",chardata"`
	Name         string `xml:"name"`
	Description  string `xml:"description"`
	DefaultValue string `xml:"defaultValue"`
	Trim         string `xml:"trim"`
}

type HudsonPluginsGitBranchSpec

type HudsonPluginsGitBranchSpec struct {
	Text string `xml:",chardata"`
	Name string `xml:"name"`
}

type HudsonPluginsGitUserRemoteConfig

type HudsonPluginsGitUserRemoteConfig struct {
	Text          string `xml:",chardata"`
	URL           string `xml:"url"`
	CredentialsId string `xml:"credentialsId"`
}

type HudsonTasksShell

type HudsonTasksShell struct {
	Text    string `xml:",chardata"`
	Command string `xml:"command"`
}

type Jenkins

type Jenkins interface {
	SetHTTPClient(client *http.Client)
	SetApiVersion(apiVersion string)
	GetJobs() ([]Job, error)
	GetJob(name string) (job Job, err error)
	GetJobConfig(name string) (job MavenJobItem, err error)
	GetBuild(job Job, number int) (build Build, err error)
	GetLastBuild(job Job) (build Build, err error)
	GetBuildHistory(name string) (build []*Build, err error)
	CreateJob(mavenJobItem MavenJobItem, jobName string) error
	CreateFreeJob(jobName string, freeJobItem []byte) error
	DeleteJob(job Job) error
	AddJobToView(viewName string, job Job) error
	CreateView(listView ListView) error
	GetView(name string) (view ListView, err error)
	AbortJob(name string, buildId int) error
	Build(name string, params url.Values) error
	GetBuildConsoleOutput(build Build) ([]byte, error)
	GetQueue() (queue Queue, err error)
	GetArtifact(build Build, artifact Artifact) ([]byte, error)
	SetBuildDescription(build Build, description string) error
	GetComputerObject() (co ComputerObject, err error)
	GetComputers() ([]Computer, error)
	GetComputer(name string) (computer Computer, err error)
	CreateJobParams(params Params) error
	CreateJavaJobParams(params Params) error
}

func NewJenkins

func NewJenkins(cf *config.Config) (Jenkins, error)

func NewService

func NewService(auth *Auth, host string, apiVersion string) (Jenkins, error)

type JenkinsPluginsMaveninfoConfigMavenInfoJobConfig

type JenkinsPluginsMaveninfoConfigMavenInfoJobConfig struct {
	Text                string `xml:",chardata"`
	Plugin              string `xml:"plugin,attr"`
	MainModulePattern   string `xml:"mainModulePattern"`
	DependenciesPattern string `xml:"dependenciesPattern"`
	AssignName          string `xml:"assignName"`
	NameTemplate        string `xml:"nameTemplate"`
	AssignDescription   string `xml:"assignDescription"`
	DescriptionTemplate string `xml:"descriptionTemplate"`
}

mavenjob

type Job

type Job struct {
	Actions               []Action       `json:"actions" xml:"actions"`
	Buildable             bool           `json:"buildable" xml:"buildable"`
	Builds                []Build        `json:"builds" xml:"builds"`
	Color                 string         `json:"color" xml:"color"`
	ConcurrentBuild       bool           `json:"concurrentBuild" xml:"concurrentBuild"`
	Description           string         `json:"description" xml:"description"`
	DisplayName           string         `json:"displayName" xml:"displayName"`
	DisplayNameOrNull     interface{}    `json:"displayNameOrNull" xml:"displayNameOrNull"`
	DownstreamProjects    []interface{}  `json:"downstreamProjects" xml:"downstreamProjects"`
	FirstBuild            Build          `json:"firstBuild" xml:"firstBuild"`
	FullDisplayName       string         `json:"fullDisplayName" xml:"fullDisplayName"`
	FullName              string         `json:"fullName" xml:"fullName"`
	HealthReport          []HealthReport `json:"healthReport" xml:"healthReport"`
	InQueue               bool           `json:"inQueue" xml:"inQueue"`
	KeepDependencies      bool           `json:"keepDependencies" xml:"keepDependencies"`
	LabelExpression       interface{}    `json:"labelExpression" xml:"labelExpression"`
	LastBuild             Build          `json:"lastBuild" xml:"lastBuild"`
	LastCompletedBuild    Build          `json:"lastCompletedBuild" xml:"lastCompletedBuild"`
	LastFailedBuild       interface{}    `json:"lastFailedBuild" xml:"lastFailedBuild"`
	LastStableBuild       Build          `json:"lastStableBuild" xml:"lastStableBuild"`
	LastSuccessfulBuild   Build          `json:"lastSuccessfulBuild" xml:"lastSuccessfulBuild"`
	LastUnstableBuild     interface{}    `json:"lastUnstableBuild" xml:"lastUnstableBuild"`
	LastUnsuccessfulBuild interface{}    `json:"lastUnsuccessfulBuild" xml:"lastUnsuccessfulBuild"`
	Name                  string         `json:"name" xml:"name"`
	NextBuildNumber       int            `json:"nextBuildNumber" xml:"nextBuildNumber"`
	Property              []Property     `json:"property" xml:"property"`
	QueueItem             interface{}    `json:"queueItem" xml:"queueItem"`
	Scm                   Scm            `json:"scm" xml:"scm"`
	UpstreamProjects      []interface{}  `json:"upstreamProjects" xml:"upstreamProjects"`
	URL                   string         `json:"url" xml:"url"`
}

type ListView

type ListView struct {
	Name            string         `xml:"name"`
	XMLName         xml.Name       `xml:"hudson.model.MyView"`
	Text            string         `xml:",chardata"`
	FilterExecutors string         `xml:"filterExecutors"`
	FilterQueue     string         `xml:"filterQueue"`
	Properties      ViewProperties `xml:"properties"`
}

type MavenJobItem

type MavenJobItem struct {
	XMLName                          xml.Name             `xml:"project"`
	Text                             string               `xml:",chardata"`
	Plugin                           string               `xml:"plugin,attr"`
	Description                      string               `xml:"description"`
	KeepDependencies                 string               `xml:"keepDependencies"`
	Properties                       Properties           `xml:"properties"`
	Scm                              Scm                  `xml:"scm"`
	CanRoam                          string               `xml:"canRoam"`
	Disabled                         string               `xml:"disabled"`
	BlockBuildWhenDownstreamBuilding string               `xml:"blockBuildWhenDownstreamBuilding"`
	BlockBuildWhenUpstreamBuilding   string               `xml:"blockBuildWhenUpstreamBuilding"`
	Triggers                         string               `xml:"triggers"`
	ConcurrentBuild                  string               `xml:"concurrentBuild"`
	RootPOM                          string               `xml:"rootPOM"`
	Goals                            string               `xml:"goals"`
	AggregatorStyleBuild             string               `xml:"aggregatorStyleBuild"`
	IncrementalBuild                 string               `xml:"incrementalBuild"`
	IgnoreUpstremChanges             string               `xml:"ignoreUpstremChanges"`
	IgnoreUnsuccessfulUpstreams      string               `xml:"ignoreUnsuccessfulUpstreams"`
	ArchivingDisabled                string               `xml:"archivingDisabled"`
	SiteArchivingDisabled            string               `xml:"siteArchivingDisabled"`
	FingerprintingDisabled           string               `xml:"fingerprintingDisabled"`
	ResolveDependencies              string               `xml:"resolveDependencies"`
	ProcessPlugins                   string               `xml:"processPlugins"`
	MavenValidationLevel             string               `xml:"mavenValidationLevel"`
	RunHeadless                      string               `xml:"runHeadless"`
	DisableTriggerDownstreamProjects string               `xml:"disableTriggerDownstreamProjects"`
	BlockTriggerWhenBuilding         string               `xml:"blockTriggerWhenBuilding"`
	Settings                         Settings             `xml:"settings"`
	GlobalSettings                   Settings             `xml:"globalSettings"`
	Reporters                        string               `xml:"reporters"`
	Publishers                       string               `xml:"publishers"`
	BuildWrappers                    string               `xml:"buildWrappers"`
	Prebuilders                      string               `xml:"prebuilders"`
	Postbuilders                     Postbuilders         `xml:"postbuilders"`
	Builders                         Postbuilders         `xml:"builders"`
	RunPostStepsIfResult             RunPostStepsIfResult `xml:"runPostStepsIfResult"`
}

type ParameterDefinitions

type ParameterDefinitions struct {
	Class                              string                               `json:"_class"`
	DefaultParameterValue              DefaultParameterValue                `json:"defaultParameterValue"`
	Description                        string                               `json:"description"`
	Name                               string                               `json:"name"`
	Type                               string                               `json:"type"`
	HudsonModelTextParameterDefinition []HudsonModelTextParameterDefinition `xml:"hudson.model.TextParameterDefinition"`
}

type Params

type Params struct {
	Name       string `json:"name"`
	Namespace  string `json:"namespace"`
	GitAddr    string `json:"git_addr"`
	GitType    string `json:"git_type"`
	GitVersion string `json:"git_version"`
	Command    string `json:"command"`
}

type Postbuilders

type Postbuilders struct {
	Text             string           `xml:",chardata"`
	HudsonTasksShell HudsonTasksShell `xml:"hudson.tasks.Shell"`
}

type Properties

type Properties struct {
	Text                                            string                                          `xml:",chardata"`
	JenkinsPluginsMaveninfoConfigMavenInfoJobConfig JenkinsPluginsMaveninfoConfigMavenInfoJobConfig `xml:"jenkins.plugins.maveninfo.config.MavenInfoJobConfig"`
	HudsonModelParametersDefinitionProperty         HudsonModelParametersDefinitionProperty         `xml:"hudson.model.ParametersDefinitionProperty"`
}

type Property

type Property struct {
	Class string `json:"_class"`
}

type Queue

type Queue struct {
}

type RunPostStepsIfResult

type RunPostStepsIfResult struct {
	Text          string `xml:",chardata"`
	Name          string `xml:"name"`
	Ordinal       string `xml:"ordinal"`
	Color         string `xml:"color"`
	CompleteBuild string `xml:"completeBuild"`
}

type Scm

type Scm struct {
	ConfigVersion                     string            `xml:"configVersion"`
	SubmoduleCfg                      SubmoduleCfg      `xml:"submoduleCfg"`
	DoGenerateSubmoduleConfigurations string            `xml:"doGenerateSubmoduleConfigurations"`
	UserRemoteConfigs                 UserRemoteConfigs `xml:"userRemoteConfigs"`
	Branches                          Branches          `xml:"branches"`
	Class                             string            `xml:"class,attr"`
	Plugin                            string            `xml:"plugin,attr"`
	Text                              string            `xml:",chardata"`
	Extensions                        string            `xml:"extensions"`
}

type Settings

type Settings struct {
	Text  string `xml:",chardata"`
	Class string `xml:"class,attr"`
}

type SubmoduleCfg

type SubmoduleCfg struct {
	Text  string `xml:",chardata"`
	Class string `xml:"class,attr"`
}

type UserRemoteConfigs

type UserRemoteConfigs struct {
	GitUserRemoteConfig GitUserRemoteConfig `xml:"hudson.plugins.git.UserRemoteConfig"`
	Text                string              `xml:",chardata"`
}

type View

type View struct {
	Name            string   `json:"name"`
	URL             string   `json:"url"`
	XMLName         xml.Name `xml:"hudson.model.MyView"`
	Text            string   `xml:",chardata"`
	FilterExecutors string   `xml:"filterExecutors"`
	FilterQueue     string   `xml:"filterQueue"`
	Properties      struct {
		Text  string `xml:",chardata"`
		Class string `xml:"class,attr"`
	} `xml:"properties"`
}

type ViewProperties

type ViewProperties struct {
	Text  string `xml:",chardata"`
	Class string `xml:"class,attr"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL