Documentation ¶
Index ¶
- Constants
- func BranchPattern(gitKind string) string
- func CheckHealth(url string) error
- func CreateFolderXML(folderURL string, name string) string
- func CreateMultiBranchProjectXml(info *gits.GitRepository, gitProvider gits.GitProvider, credentials string, ...) string
- func CreatePipelineXML(gitURL string, branch string, jenksinsfileName string) string
- func EditUserAuth(url string, configService jenkauth.ConfigService, config *jenkauth.AuthConfig, ...) (jenkauth.UserAuth, error)
- func GetJenkinsClient(url string, batch bool, configService jenkauth.ConfigService, ...) (gojenkins.JenkinsClient, error)
- func IsMultiBranchProject(job *gojenkins.Job) bool
- func IsPipeline(j *gojenkins.Job) bool
- func JenkinsApiURL(url string) string
- func JenkinsLoginURL(url string) string
- func JenkinsTokenURL(url string) string
- func JobName(prefix string, j *gojenkins.Job) string
- func LoadAllJenkinsJobs(jenkinsClient gojenkins.JenkinsClient) ([]*gojenkins.Job, error)
- func PrintGetTokenFromURL(out io.Writer, tokenUrl string) (int, error)
- type CoreVersion
- type Dependency
- type Developer
- type PluginRelease
- type Signature
- type UpdateCenter
- type Warning
- type WarningVersion
Constants ¶
const ( // DefaultJenkinsCredentialsPrefix prefix for jenkins credentials DefaultJenkinsCredentialsPrefix = "jenkins-x-" // Chartmuseum name for chartmuseum Chartmuseum = "chartmuseum" // BranchPatternMasterPRsAndFeatures only match master, PRs and features BranchPatternMasterPRsAndFeatures = "master|PR-.*|feature.*" // BranchPatternMatchEverything matches everything BranchPatternMatchEverything = ".*" )
const (
// DefaultUpdateCenterURL the LTS update center metadata URL
DefaultUpdateCenterURL = "https://updates.jenkins.io/current/update-center.json"
)
Variables ¶
This section is empty.
Functions ¶
func BranchPattern ¶
func CheckHealth ¶ added in v1.3.845
CheckHealth checks the health of Jenkins server using the login URL
func CreateFolderXML ¶ added in v1.3.926
CreateFolderXML creates a Jenkins Folder XML
func CreateMultiBranchProjectXml ¶
func CreateMultiBranchProjectXml(info *gits.GitRepository, gitProvider gits.GitProvider, credentials string, branches string, jenkinsfile string) string
func CreatePipelineXML ¶ added in v1.3.926
CreatePipelineXML creates the XML for a stand alone pipeline that is not using the Multi Branch Project
func EditUserAuth ¶
func EditUserAuth(url string, configService jenkauth.ConfigService, config *jenkauth.AuthConfig, auth *jenkauth.UserAuth, tokenUrl string, batchMode bool, in terminal.FileReader, out terminal.FileWriter, outErr io.Writer) (jenkauth.UserAuth, error)
func GetJenkinsClient ¶
func GetJenkinsClient(url string, batch bool, configService jenkauth.ConfigService, in terminal.FileReader, out terminal.FileWriter, outErr io.Writer) (gojenkins.JenkinsClient, error)
func IsMultiBranchProject ¶
func IsMultiBranchProject(job *gojenkins.Job) bool
IsMultiBranchProject returns true if this job is a multi branch project
func IsPipeline ¶ added in v1.3.883
func IsPipeline(j *gojenkins.Job) bool
IsPipeline checks if the job is a pipeline job
func JenkinsApiURL ¶
func JenkinsLoginURL ¶ added in v1.3.845
JenkinsLoginURL returns the Jenkins login URL
func JenkinsTokenURL ¶
func JobName ¶ added in v1.3.883
JobName returns the Jenkins job name starting with the given prefix
func LoadAllJenkinsJobs ¶
func LoadAllJenkinsJobs(jenkinsClient gojenkins.JenkinsClient) ([]*gojenkins.Job, error)
LoadAllJenkinsJobs Loads all the jobs in full from the Jenkins client
Types ¶
type CoreVersion ¶ added in v1.3.932
type CoreVersion struct { BuildDate string `json:"buildDate"` Name string `json:"name"` Sha1 string `json:"sha1"` Sha256 string `json:"sha256"` URL string `json:"url"` Version string `json:"version"` }
CoreVersion represents the version of Core
type Dependency ¶ added in v1.3.932
type Dependency struct { Name string `json:"name"` Optional bool `json:"optional"` Version string `json:"version"` }
Dependency a dependency of a plugin
type Developer ¶ added in v1.3.932
type Developer struct { DeveloperID string `json:"developerId"` Email string `json:"email"` Name string `json:"name"` }
Developer a developer on a plugin
type PluginRelease ¶ added in v1.3.932
type PluginRelease struct { BuildDate string `json:"buildDate"` Dependencies []Dependency `json:"dependencies"` Developers []Developer `json:"developers"` Excerpt string `json:"excerpt"` Gav string `json:"gav"` Labels []string `json:"labels"` Name string `json:"name"` PreviousTimestamp string `json:"previousTimestamp"` PreviousVersion string `json:"previousVersion"` ReleaseTimestamp string `json:"releaseTimestamp"` RequiredCore string `json:"requiredCore"` Scm string `json:"scm"` Sha1 string `json:"sha1"` Sha256 string `json:"sha256"` Title string `json:"title"` URL string `json:"url"` Version string `json:"version"` Wiki string `json:"wiki"` }
PluginRelease represets the data for a plugin
type Signature ¶ added in v1.3.932
type Signature struct { Certificates []string `json:"certificates"` CorrectDigest string `json:"correct_digest"` CorrectDigest512 string `json:"correct_digest512"` CorrectSignature string `json:"correct_signature"` CorrectSignature512 string `json:"correct_signature512"` Digest string `json:"digest"` Digest512 string `json:"digest512"` Signature string `json:"signature"` Signature512 string `json:"signature512"` }
Signature signature metadata
type UpdateCenter ¶ added in v1.3.932
type UpdateCenter struct { ConnectionCheckURL string `json:"connectionCheckUrl"` Core CoreVersion `json:"core"` ID string `json:"id"` Plugins map[string]PluginRelease `json:"plugins"` Signature Signature `json:"signature"` UpdateCenterVersion string `json:"updateCenterVersion"` Warnings []Warning `json:"warnings"` }
UpdateCenter represents the Update Center metadata returned from URLs like https://updates.jenkins.io/current/update-center.json
func LoadUpdateCenterData ¶ added in v1.3.932
func LoadUpdateCenterData(data []byte) (*UpdateCenter, error)
LoadUpdateCenterData loads the given UpdateCenter data
func LoadUpdateCenterFile ¶ added in v1.3.932
func LoadUpdateCenterFile(fileName string) (*UpdateCenter, error)
LoadUpdateCenterFile loads the given UpdateCenter JSON file
func LoadUpdateCenterURL ¶ added in v1.3.932
func LoadUpdateCenterURL(u string) (*UpdateCenter, error)
LoadUpdateCenterURL loads the given UpdateCenter URL
func (*UpdateCenter) PickPlugins ¶ added in v1.3.932
func (u *UpdateCenter) PickPlugins(currentValues []string, in terminal.FileReader, out terminal.FileWriter, outErr io.Writer) ([]string, error)
PickPlugins provides the user with a list of plugins that can be added to a Jenkins App
type Warning ¶ added in v1.3.932
type Warning struct { ID string `json:"id"` Message string `json:"message"` Name string `json:"name"` Type string `json:"type"` URL string `json:"url"` Versions []WarningVersion `json:"versions"` }
Warning a warning message
type WarningVersion ¶ added in v1.3.932
type WarningVersion struct { FirstVersion string `json:"firstVersion"` LastVersion string `json:"lastVersion"` Pattern string `json:"pattern"` }
WarningVersion warning versions