Documentation
¶
Overview ¶
Package zuulcf contains a library to build Zuul configurations.
Index ¶
- Constants
- Variables
- func GenerateZuulTemplateFile(tenant TenantTemplateStruct) (string, error)
- type AnsiblePlay
- type AnsiblePlayBook
- type GerritCodeReview
- type GerritReporterMap
- type GerritVotePoint
- type GerritWorkflow
- type GitGLMergeRequests
- type GitLabReporterMap
- type Job
- type JobBody
- type JobConfig
- type JobRoles
- type JobRunName
- type JobRunNameAndSemaphore
- type JobSecrets
- type NodeSet
- type NodeSetBody
- type NodeSetNodesBody
- type NodeSetNodesGroupBody
- type NodeSets
- type NodesSetAlternatives
- type Pipeline
- type PipelineBody
- type PipelineConfig
- type PipelineDriverReporter
- type PipelineGenericTrigger
- type PipelineGerritReporter
- type PipelineGerritRequirement
- type PipelineGitLabReporter
- type PipelineGitLabRequirement
- type PipelineManager
- type PipelinePrecedence
- type PipelineReporter
- type PipelineRequire
- type PipelineRequireApproval
- type PipelineRequireGerritApproval
- type PipelineTrigger
- type PipelineTriggerArray
- type PipelineTriggerGit
- type PipelineTriggerGitGerrit
- type PipelineTriggerGitLab
- type Project
- type ProjectConfig
- type ReporterMap
- type Semaphore
- type SemaphoreBody
- type Semaphores
- type Tenant
- type TenantBody
- type TenantConfig
- type TenantConnProjects
- type TenantConnectionSource
- type TenantTemplateStruct
- type ZuulProjectBody
- type ZuulProjectMergeMode
- type ZuulProjectPipeline
- type ZuulProjectPipelineMap
Constants ¶
View Source
const ( // This is needed due to https://go.dev/ref/spec#The_zero_value // Zero Values for int's will not show while printing the structure GerritVotePointTwo = 2 GerritVotePointOne = 1 GerritVotePointZero = 0 GerritVotePointMinusOne = -1 GerritVotePointMinusTwo = -2 )
Variables ¶
View Source
var TenantTemplate = `` /* 305-byte string literal not displayed */
Functions ¶
func GenerateZuulTemplateFile ¶
func GenerateZuulTemplateFile(tenant TenantTemplateStruct) (string, error)
Types ¶
type AnsiblePlay ¶
type AnsiblePlayBook ¶
type AnsiblePlayBook []AnsiblePlay
type GerritCodeReview ¶
type GerritCodeReview GerritVotePoint
func GetGerritCodeReviewValue ¶
func GetGerritCodeReviewValue(value string) GerritCodeReview
type GerritReporterMap ¶
type GerritReporterMap map[string]PipelineGerritReporter
type GerritVotePoint ¶
type GerritVotePoint int8
func GetZuulPipelineReporterVerified ¶
func GetZuulPipelineReporterVerified(verified string) GerritVotePoint
type GerritWorkflow ¶
type GerritWorkflow GerritVotePoint
func GetGerritWorkflowValue ¶
func GetGerritWorkflowValue(value string) GerritWorkflow
type GitGLMergeRequests ¶
type GitGLMergeRequests string
const ( Opened GitGLMergeRequests = "opened" Changed GitGLMergeRequests = "changed" Merged GitGLMergeRequests = "merged" Comment GitGLMergeRequests = "comment" Approved GitGLMergeRequests = "approved" Unapproved GitGLMergeRequests = "unapproved" Labeled GitGLMergeRequests = "labeled" )
type GitLabReporterMap ¶
type GitLabReporterMap map[string]PipelineGitLabReporter
type JobBody ¶
type JobBody struct {
Name string `yaml:"name"`
Description string `yaml:"description,omitempty"`
ExtraVars map[string]interface{} `yaml:"extra-vars,omitempty"`
Parent *string `yaml:"parent"`
PostRun []string `yaml:"post-run,omitempty"`
PreRun []string `yaml:"pre-run,omitempty"`
Roles []JobRoles `yaml:"roles,omitempty"`
Secrets []interface{} `yaml:"secrets,omitempty"`
Timeout uint16 `yaml:"timeout,omitempty"`
Attempts uint8 `yaml:"attempts,omitempty"`
Final bool `yaml:"final,omitempty"`
Run []interface{} `yaml:"run,omitempty"`
NodeSet NodeSetBody `yaml:"nodeset,omitempty"`
Semaphores []JobRunNameAndSemaphore `yaml:"semaphores,omitempty"`
}
type JobRunName ¶
type JobRunName struct {
Name string `yaml:",inline"`
}
type JobRunNameAndSemaphore ¶
type JobSecrets ¶
type NodeSet ¶
type NodeSet struct {
NodeSet NodeSetBody `yaml:"nodeset"`
}
type NodeSetBody ¶
type NodeSetBody struct {
Name string `yaml:"name,omitempty"`
Nodes []NodeSetNodesBody `yaml:"nodes,omitempty"`
Groups []NodeSetNodesGroupBody `yaml:"groups,omitempty"`
Alternatives []NodesSetAlternatives `yaml:"alternatives,omitempty"`
}
type NodeSetNodesBody ¶
type NodeSetNodesGroupBody ¶
type NodesSetAlternatives ¶
type NodesSetAlternatives string
type Pipeline ¶
type Pipeline struct {
Pipeline PipelineBody `yaml:"pipeline"`
}
type PipelineBody ¶
type PipelineBody struct {
Name string `yaml:"name"`
Description string `yaml:"description,omitempty"`
Manager PipelineManager `yaml:"manager"`
PostReview bool `yaml:"post-review,omitempty"`
Precedence PipelinePrecedence `yaml:"precedence,omitempty"`
Supercedes []string `yaml:"supercedes,omitempty"`
SuccessMessage string `yaml:"success-message,omitempty"`
FailureMessage string `yaml:"failure-message,omitempty"`
Require PipelineRequire `yaml:"require,omitempty"`
Start PipelineReporter `yaml:"start,omitempty"`
Success PipelineReporter `yaml:"success,omitempty"`
Failure PipelineReporter `yaml:"failure,omitempty"`
Trigger PipelineGenericTrigger `yaml:"trigger,omitempty"`
WindowFloor uint8 `yaml:"window-floor,omitempty"`
WindowIncreaseFactor uint8 `yaml:"window-increase-factor,omitempty"`
}
type PipelineConfig ¶
type PipelineConfig []Pipeline
type PipelineDriverReporter ¶
type PipelineDriverReporter struct {
Gitlab *PipelineGitLabReporter `yaml:",inline,omitempty"`
Gerrit *PipelineGerritReporter `yaml:",inline,omitempty"`
}
type PipelineGenericTrigger ¶
type PipelineGenericTrigger map[string]PipelineTriggerArray
func GetTriggerCheckByDriver ¶
func GetTriggerCheckByDriver(driver string, connection string) (PipelineGenericTrigger, error)
func GetTriggerGateByDriver ¶
func GetTriggerGateByDriver(driver string, connection string) (PipelineGenericTrigger, error)
func GetTriggerPostByDriver ¶
func GetTriggerPostByDriver(driver string, connection string) (PipelineGenericTrigger, error)
type PipelineGerritReporter ¶
type PipelineGerritReporter struct {
Submit bool `yaml:"submit,omitempty"`
Verified GerritVotePoint `yaml:"Verified"`
}
type PipelineGerritRequirement ¶
type PipelineGerritRequirement struct {
Username string `yaml:"username,omitempty"`
CurrentPatchset bool `yaml:"current-patchset,omitempty"`
Verified []GerritVotePoint `yaml:"Verified,omitempty,flow"`
GerritApproval []PipelineRequireGerritApproval `yaml:"approval,omitempty"`
Workflow GerritWorkflow `yaml:"Workflow,omitempty"`
}
type PipelineGitLabReporter ¶
type PipelineManager ¶
type PipelineManager string
const ( Dependent PipelineManager = "dependent" Independent PipelineManager = "independent" Serial PipelineManager = "serial" Supercedent PipelineManager = "supercedent" )
func GetZuulPipelineManager ¶
func GetZuulPipelineManager(manager string) PipelineManager
type PipelinePrecedence ¶
type PipelinePrecedence string
const ( High PipelinePrecedence = "high" Low PipelinePrecedence = "low" Normal PipelinePrecedence = "normal" )
func GetZuulPipelinePrecedence ¶
func GetZuulPipelinePrecedence(precedence string) PipelinePrecedence
type PipelineReporter ¶
type PipelineReporter struct {
Reporter ReporterMap `yaml:",inline"`
SQLReporter []string `yaml:"sqlreporter,omitempty"`
}
func GetReportersCheckByDriver ¶
func GetReportersCheckByDriver(driver string, connection string) ([]PipelineReporter, error)
func GetReportersGateByDriver ¶
func GetReportersGateByDriver(driver string, connection string) ([]PipelineReporter, error)
type PipelineRequire ¶
type PipelineRequire map[string]PipelineRequireApproval
func GetRequireCheckByDriver ¶
func GetRequireCheckByDriver(driver string, connection string) (PipelineRequire, error)
func GetRequireGateByDriver ¶
func GetRequireGateByDriver(driver string, connection string) (PipelineRequire, error)
type PipelineRequireApproval ¶
type PipelineRequireApproval struct {
Open bool `yaml:"open,omitempty"`
Gerrit PipelineGerritRequirement `yaml:",inline,omitempty"`
Gitlab PipelineGitLabRequirement `yaml:",inline,omitempty"`
}
type PipelineRequireGerritApproval ¶
type PipelineRequireGerritApproval struct {
Workflow GerritWorkflow `yaml:"Workflow,omitempty"`
Verified GerritVotePoint `yaml:"Verified,omitempty,flow"`
CodeReview GerritCodeReview `yaml:"Code-Review,omitempty"`
}
type PipelineTrigger ¶
type PipelineTrigger struct {
Event string `yaml:"event"`
Comment string `yaml:"comment,omitempty"`
Ref []string `yaml:"ref,omitempty"`
GitTrigger PipelineTriggerGit `yaml:",inline"`
GitLabTrigger PipelineTriggerGitLab `yaml:",inline"`
}
type PipelineTriggerArray ¶
type PipelineTriggerArray []PipelineTrigger
type PipelineTriggerGit ¶
type PipelineTriggerGit struct {
Gerrit PipelineTriggerGitGerrit `yaml:"require,omitempty"`
Approval []PipelineRequireGerritApproval `yaml:"approval,omitempty"`
Username string `yaml:"username,omitempty"`
}
type PipelineTriggerGitGerrit ¶
type PipelineTriggerGitGerrit struct {
Approval []PipelineRequireApproval `yaml:"approval,omitempty"`
}
type PipelineTriggerGitLab ¶
type PipelineTriggerGitLab struct {
Action []GitGLMergeRequests `yaml:"action,omitempty"`
Labels []string `yaml:"labels,omitempty"`
Unlabels []string `yaml:"unlabels,omitempty"`
}
type Project ¶
type Project struct {
Project ZuulProjectBody `yaml:"project"`
}
type ProjectConfig ¶
type ProjectConfig []Project
type ReporterMap ¶
type ReporterMap map[string]PipelineDriverReporter
type Semaphore ¶
type Semaphore struct {
Semaphore SemaphoreBody `yaml:"semaphore"`
}
type SemaphoreBody ¶
type Semaphores ¶
type Semaphores []Semaphore
type Tenant ¶
type Tenant struct {
Tenant TenantBody `yaml:"tenant"`
}
type TenantBody ¶
type TenantBody struct {
Name string `yaml:"name"`
Source TenantConnectionSource `yaml:"source,omitempty"`
}
type TenantConfig ¶
type TenantConfig []Tenant
type TenantConnProjects ¶
type TenantConnectionSource ¶
type TenantConnectionSource map[string]TenantConnProjects
type TenantTemplateStruct ¶
type ZuulProjectBody ¶
type ZuulProjectBody struct {
Name string `yaml:"name,omitempty"`
Templates []string `yaml:"templates,omitempty"`
DefaultBranch string `yaml:"default-branch,omitempty"`
MergeMode ZuulProjectMergeMode `yaml:"merge-mode,omitempty"`
Vars map[string]interface{} `yaml:"vars,omitempty"`
Queue string `yaml:"queue,omitempty"`
Pipeline ZuulProjectPipelineMap `yaml:",inline"`
}
type ZuulProjectMergeMode ¶
type ZuulProjectMergeMode string
const ( Merge ZuulProjectMergeMode = "merge" MergeResolve ZuulProjectMergeMode = "merge-resolve" CherryPick ZuulProjectMergeMode = "cherry-pick" SquashMerge ZuulProjectMergeMode = "squash-merge" Rebase ZuulProjectMergeMode = "rebase" Empty ZuulProjectMergeMode = "" )
func GetZuulProjectMergeMode ¶
func GetZuulProjectMergeMode(mergemode string) ZuulProjectMergeMode
type ZuulProjectPipeline ¶
type ZuulProjectPipelineMap ¶
type ZuulProjectPipelineMap map[string]ZuulProjectPipeline
Click to show internal directories.
Click to hide internal directories.