diff --git a/cli/sfconfig/cmd/bootstrap-tenant-config-repo/bootstrap-tenant-config-repo.go b/cli/sfconfig/cmd/bootstrap-tenant-config-repo/bootstrap-tenant-config-repo.go index 50ee93f1..9ce98ad9 100644 --- a/cli/sfconfig/cmd/bootstrap-tenant-config-repo/bootstrap-tenant-config-repo.go +++ b/cli/sfconfig/cmd/bootstrap-tenant-config-repo/bootstrap-tenant-config-repo.go @@ -7,7 +7,7 @@ import ( "os" "path/filepath" - "github.com/softwarefactory-project/sf-operator/cli/sfconfig/cmd/utils" + utils "github.com/softwarefactory-project/sf-operator/controllers/libs/zuulcf" "github.com/spf13/cobra" "gopkg.in/yaml.v3" ) diff --git a/cli/sfconfig/cmd/dev/run.go b/cli/sfconfig/cmd/dev/run.go index 698db341..6ec0f141 100644 --- a/cli/sfconfig/cmd/dev/run.go +++ b/cli/sfconfig/cmd/dev/run.go @@ -22,6 +22,7 @@ import ( "github.com/softwarefactory-project/sf-operator/cli/sfconfig/cmd/sfprometheus" "github.com/softwarefactory-project/sf-operator/cli/sfconfig/cmd/utils" "github.com/softwarefactory-project/sf-operator/cli/sfconfig/config" + "github.com/softwarefactory-project/sf-operator/controllers/libs/zuulcf" "github.com/spf13/cobra" ) @@ -84,11 +85,11 @@ func SetupTenant(configPath string, tenantName string) { } tenantFile := filepath.Join(tenantDir, "main.yaml") - tenantData := utils.TenantConfig{ + tenantData := zuulcf.TenantConfig{ { - Tenant: utils.TenantBody{ + Tenant: zuulcf.TenantBody{ Name: tenantName, - Source: utils.TenantConnectionSource{ + Source: zuulcf.TenantConnectionSource{ "gerrit": { ConfigProjects: []string{"config"}, UntrustedProjects: []string{"demo-project"}, diff --git a/cli/sfconfig/cmd/utils/utils.go b/cli/sfconfig/cmd/utils/utils.go index 529d4017..622a590b 100644 --- a/cli/sfconfig/cmd/utils/utils.go +++ b/cli/sfconfig/cmd/utils/utils.go @@ -121,7 +121,6 @@ func CreateKubernetesClientOrDie(contextName string) client.Client { // And the data structure to be applied to the template func ParseString(text string, data any) (string, error) { - template.New("StringtoParse").Parse(text) // Opening Template file template, err := template.New("StringtoParse").Parse(text) if err != nil { @@ -249,341 +248,3 @@ func GetKubernetesClientSet() (*rest.Config, *kubernetes.Clientset) { } return kubeConfig, kubeClientset } - -var TenantTemplate = `- tenant: - name: {{ .Name }} - source: - {{ .Source }}: - {{ if .Trusted }}config-projects: - {{ range .Trusted}}- {{ . }} - {{end}} - {{- end -}} - {{ if .Untrusted }}untrusted-projects: - {{ range .Untrusted}}- {{ . }} - {{ end -}} - {{- end }} -` - -type TenantTemplateStruct struct { - Name string - Source string - Trusted []string - Untrusted []string -} - -func GenerateZuulTemplateFile(tenant TenantTemplateStruct) (string, error) { - templateConfig, err := ParseString(TenantTemplate, tenant) - - if err != nil { - fmt.Print(err) - return "", err - } - return templateConfig, nil -} - -type TenantConnProjects struct { - ConfigProjects []string `yaml:"config-projects"` - UntrustedProjects []string `yaml:"untrusted-projects"` -} - -type TenantConnectionSource map[string]TenantConnProjects - -type TenantBody struct { - Name string `yaml:"name"` - Source TenantConnectionSource `yaml:"source,omitempty"` -} - -type Tenant struct { - Tenant TenantBody `yaml:"tenant"` -} - -type TenantConfig []Tenant - -func GetZuulProjectMergeMode(mergemode string) ZuulProjectMergeMode { - var mergemodestr ZuulProjectMergeMode - switch mergemode { - case "merge": - mergemodestr = Merge - case "merge-resolve": - mergemodestr = MergeResolve - case "cherry-pick": - mergemodestr = CherryPick - case "squash-merge": - mergemodestr = SquashMerge - case "rebase": - mergemodestr = Rebase - default: - mergemodestr = Empty - } - return mergemodestr -} - -type ZuulProjectPipeline struct { - Jobs []string `yaml:"jobs,omitempty"` - Debug bool `yaml:"debug,omitempty"` - FailFast bool `yaml:"fail-fast,omitempty"` -} - -type ZuulProjectPipelineMap map[string]ZuulProjectPipeline - -const ( - Merge ZuulProjectMergeMode = "merge" - MergeResolve ZuulProjectMergeMode = "merge-resolve" - CherryPick ZuulProjectMergeMode = "cherry-pick" - SquashMerge ZuulProjectMergeMode = "squash-merge" - Rebase ZuulProjectMergeMode = "rebase" - Empty ZuulProjectMergeMode = "" -) - -type ZuulProjectMergeMode string -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 Project struct { - Project ZuulProjectBody `yaml:"project"` -} - -type ProjectConfig []Project - -type JobSecrets struct { - Name string `yaml:"name"` - Secret string `yaml:"secret"` - PassToParent bool `yaml:"pass-to-parent,omitempty"` -} - -type JobRoles map[string]string - -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 JobSecrets `yaml:"secrets,omitempty"` - Timeout uint16 `yaml:"timeout,omitempty"` - Attempts uint8 `yaml:"attempts,omitempty"` -} -type Job struct { - Job JobBody `yaml:"job"` -} - -type JobConfig []Job - -func GetZuulPipelineManager(manager string) PipelineManager { - var managerstr PipelineManager - switch manager { - case "independent": - managerstr = Independent - case "dependent": - managerstr = Dependent - case "serial": - managerstr = Serial - case "supercedent": - managerstr = Supercedent - default: - managerstr = Independent - } - return managerstr -} - -func GetZuulPipelinePrecedence(precedence string) PipelinePrecedence { - var precedencestr PipelinePrecedence - switch precedence { - case "high": - precedencestr = High - case "low": - precedencestr = Low - case "normal": - default: - precedencestr = Normal - } - return precedencestr -} - -func GetZuulPipelineReporterVerified(verified string) GerritReporter { - var verifiedstr GerritReporter - switch verified { - case "2": - verifiedstr = VerifiedTwo - case "1": - verifiedstr = VerifiedOne - case "0": - verifiedstr = VerifiedZero - case "-1": - verifiedstr = VerifiedMinusOne - case "-2": - verifiedstr = VerifiedMinusTwo - default: - verifiedstr = VerifiedZero - } - return verifiedstr -} - -type GerritReporter int8 - -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 - VerifiedTwo = 2 - VerifiedOne = 1 - VerifiedZero = 0 - VerifiedMinusOne = -1 - VerifiedMinusTwo = -2 -) - -// This struct defines Trigger Configurations for Gerrit, Gitlab and GitHub -// The fields defined are common to all three configurations - -func GetGerritWorkflowValue(value string) GerritWorkflowColumn { - var workflowvalue GerritWorkflowColumn - switch value { - case "1": - workflowvalue = GerritWorkflowPlusOne - case "0": - workflowvalue = GerritWorkflowZero - case "-1": - workflowvalue = GerritWorkflowMinusOne - default: - workflowvalue = GerritWorkflowZero - } - return workflowvalue -} - -const ( - GerritWorkflowPlusOne = 1 - GerritWorkflowZero = 0 - GerritWorkflowMinusOne = -1 -) - -type GerritWorkflowColumn int8 - -func GetGerritCodeReviewValue(value string) GerritCodeReview { - var codereviewvalue GerritCodeReview - switch value { - case "2": - codereviewvalue = GerritCodeReviewPlusTwo - case "1": - codereviewvalue = GerritCodeReviewPlusOne - case "0": - codereviewvalue = GerritCodeReviewZero - case "-1": - codereviewvalue = GerritCodeReviewMinusOne - case "-2": - codereviewvalue = GerritCodeReviewMinusTwo - default: - codereviewvalue = GerritWorkflowZero - } - return codereviewvalue -} - -const ( - GerritCodeReviewPlusTwo = 2 - GerritCodeReviewPlusOne = 1 - GerritCodeReviewZero = 0 - GerritCodeReviewMinusOne = -1 - GerritCodeReviewMinusTwo = -2 -) - -type GerritCodeReview int8 - -type PipelineRequireGerritApproval struct { - Workflow GerritWorkflowColumn `yaml:"Workflow,omitempty"` - Verified GerritReporter `yaml:"Verified,omitempty,flow"` - CodeReview GerritCodeReview `yaml:"Code-Review,omitempty"` -} - -type PipelineRequireApproval struct { - Username string `yaml:"username,omitempty"` - Open bool `yaml:"open,omitempty"` - CurrentPatchset bool `yaml:"current-patchset,omitempty"` - Verified []GerritReporter `yaml:"Verified,omitempty,flow"` - GerritApproval []PipelineRequireGerritApproval `yaml:"approval,omitempty"` - Workflow GerritWorkflowColumn `yaml:"Workflow,omitempty"` -} - -type PipelineTriggerGitGerrit struct { - Approval []PipelineRequireApproval `yaml:"approval,omitempty"` -} - -type PipelineTriggerGit struct { - Event string `yaml:"event"` - Comment string `yaml:"comment,omitempty"` - Gerrit PipelineTriggerGitGerrit `yaml:"require,omitempty"` - Ref []string `yaml:"ref,omitempty"` - Approval []PipelineRequireGerritApproval `yaml:"approval,omitempty"` - Username string `yaml:"username,omitempty"` -} - -type PipelineTriggerGitArray []PipelineTriggerGit - -type PipelineGenericTrigger map[string]PipelineTriggerGitArray - -type PipelineGerritReporter struct { - Submit bool `yaml:"submit,omitempty"` - Verified GerritReporter `yaml:"Verified"` -} - -type GerritReporterMap map[string]PipelineGerritReporter -type PipelineReporter struct { - GerritReporter GerritReporterMap `yaml:",inline"` - SQLReporter []string `yaml:"sqlreporter,omitempty"` -} - -type PipelinePrecedence string - -const ( - High PipelinePrecedence = "high" - Low PipelinePrecedence = "low" - Normal PipelinePrecedence = "normal" -) - -type PipelineManager string - -const ( - Dependent PipelineManager = "dependent" - Independent PipelineManager = "independent" - Serial PipelineManager = "serial" - Supercedent PipelineManager = "supercedent" -) - -type PipelineRequire map[string]PipelineRequireApproval - -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"` -} - -type Pipeline struct { - Pipeline PipelineBody `yaml:"pipeline"` -} - -type PipelineConfig []Pipeline - -type AnsiblePlay struct { - Hosts string `yaml:"hosts"` - Roles []map[string]any `yaml:"roles,omitempty"` - Vars []map[string]any `yaml:"vars,omitempty"` - Tasks []map[string]any `yaml:"tasks,omitempty"` -} - -type AnsiblePlayBook []AnsiblePlay diff --git a/controllers/git_server.go b/controllers/git_server.go index a49250d0..23720fec 100644 --- a/controllers/git_server.go +++ b/controllers/git_server.go @@ -15,6 +15,8 @@ import ( "github.com/softwarefactory-project/sf-operator/controllers/libs/base" "github.com/softwarefactory-project/sf-operator/controllers/libs/conds" "github.com/softwarefactory-project/sf-operator/controllers/libs/utils" + "github.com/softwarefactory-project/sf-operator/controllers/libs/zuulcf" + "gopkg.in/yaml.v3" appsv1 "k8s.io/api/apps/v1" apiv1 "k8s.io/api/core/v1" ) @@ -51,6 +53,80 @@ func makeZuulConnectionConfig(spec *sfv1.ZuulSpec) string { } func (r *SFController) makePreInitScript() string { + + parentJobName := "base" + + semaphore := zuulcf.Semaphores{ + { + Semaphore: zuulcf.SemaphoreBody{ + Name: "semaphore-config-update", + Max: 1, + }, + }, + } + + jobs := zuulcf.JobConfig{ + { + Job: zuulcf.JobBody{ + Name: "base", + Parent: nil, + Description: "The base job.", + PreRun: []string{ + "playbooks/base/pre.yaml", + }, + PostRun: []string{ + "playbooks/base/post.yaml", + }, + Roles: []zuulcf.JobRoles{ + { + "zuul": "zuul/zuul-jobs", + }, + }, + Timeout: 1800, + Attempts: 3, + Secrets: []interface{}{ + "site_sflogs", + }, + }, + }, + { + Job: zuulcf.JobBody{ + Name: "config-check", + Parent: &parentJobName, + Final: true, + Description: "Validate the config repo.", + Run: []interface{}{ + "playbooks/config/check.yaml", + }, + }, + }, + { + Job: zuulcf.JobBody{ + Name: "config-update", + Parent: &parentJobName, + Final: true, + Description: "Deploy config repo update.", + Run: []interface{}{ + "playbooks/config/update.yaml", + }, + Secrets: []interface{}{ + "k8s_config", + }, + Semaphores: []zuulcf.JobRunNameAndSemaphore{ + { + Name: "semaphore-config-update", + }, + }, + }, + }, + } + + semaphoreOutput, _ := yaml.Marshal(semaphore) + jobbaseOutput, _ := yaml.Marshal(jobs) + + preInitScriptTemplate = strings.Replace(preInitScriptTemplate, "# Semaphore", string(semaphoreOutput), 1) + preInitScriptTemplate = strings.Replace(preInitScriptTemplate, "# JobBase", string(jobbaseOutput), 1) + return strings.Replace( preInitScriptTemplate, "# ZUUL_CONNECTIONS", diff --git a/controllers/libs/zuulcf/zuulcf.go b/controllers/libs/zuulcf/zuulcf.go new file mode 100644 index 00000000..cb1fde51 --- /dev/null +++ b/controllers/libs/zuulcf/zuulcf.go @@ -0,0 +1,396 @@ +// Package zuulcf provides a little library with utilities for Zuul Configurations +package zuulcf + +import ( + "fmt" + + "github.com/softwarefactory-project/sf-operator/controllers/libs/utils" +) + +var TenantTemplate = `- tenant: + name: {{ .Name }} + source: + {{ .Source }}: + {{ if .Trusted }}config-projects: + {{ range .Trusted}}- {{ . }} + {{end}} + {{- end -}} + {{ if .Untrusted }}untrusted-projects: + {{ range .Untrusted}}- {{ . }} + {{ end -}} + {{- end }} +` + +type TenantTemplateStruct struct { + Name string + Source string + Trusted []string + Untrusted []string +} + +func GenerateZuulTemplateFile(tenant TenantTemplateStruct) (string, error) { + templateConfig, err := utils.ParseString(TenantTemplate, tenant) + + if err != nil { + fmt.Print(err) + return "", err + } + return templateConfig, nil +} + +type TenantConnProjects struct { + ConfigProjects []string `yaml:"config-projects"` + UntrustedProjects []string `yaml:"untrusted-projects"` +} + +type TenantConnectionSource map[string]TenantConnProjects + +type TenantBody struct { + Name string `yaml:"name"` + Source TenantConnectionSource `yaml:"source,omitempty"` +} + +type Tenant struct { + Tenant TenantBody `yaml:"tenant"` +} + +type TenantConfig []Tenant + +func GetZuulProjectMergeMode(mergemode string) ZuulProjectMergeMode { + var mergemodestr ZuulProjectMergeMode + switch mergemode { + case "merge": + mergemodestr = Merge + case "merge-resolve": + mergemodestr = MergeResolve + case "cherry-pick": + mergemodestr = CherryPick + case "squash-merge": + mergemodestr = SquashMerge + case "rebase": + mergemodestr = Rebase + default: + mergemodestr = Empty + } + return mergemodestr +} + +type ZuulProjectPipeline struct { + Jobs []string `yaml:"jobs,omitempty"` + Debug bool `yaml:"debug,omitempty"` + FailFast bool `yaml:"fail-fast,omitempty"` +} + +type ZuulProjectPipelineMap map[string]ZuulProjectPipeline + +const ( + Merge ZuulProjectMergeMode = "merge" + MergeResolve ZuulProjectMergeMode = "merge-resolve" + CherryPick ZuulProjectMergeMode = "cherry-pick" + SquashMerge ZuulProjectMergeMode = "squash-merge" + Rebase ZuulProjectMergeMode = "rebase" + Empty ZuulProjectMergeMode = "" +) + +type ZuulProjectMergeMode string +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 Project struct { + Project ZuulProjectBody `yaml:"project"` +} + +type ProjectConfig []Project + +type JobSecrets struct { + Name string `yaml:"name"` + Secret string `yaml:"secret"` + PassToParent bool `yaml:"pass-to-parent,omitempty"` +} + +type JobRoles map[string]string + +type JobRunNameAndSemaphore struct { + Name string `yaml:"name"` + Semaphore string `yaml:"semaphore,omitempty"` +} + +type JobRunName struct { + Name string `yaml:",inline"` +} + +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 Job struct { + Job JobBody `yaml:"job"` +} + +type JobConfig []Job + +func GetZuulPipelineManager(manager string) PipelineManager { + var managerstr PipelineManager + switch manager { + case "independent": + managerstr = Independent + case "dependent": + managerstr = Dependent + case "serial": + managerstr = Serial + case "supercedent": + managerstr = Supercedent + default: + managerstr = Independent + } + return managerstr +} + +func GetZuulPipelinePrecedence(precedence string) PipelinePrecedence { + var precedencestr PipelinePrecedence + switch precedence { + case "high": + precedencestr = High + case "low": + precedencestr = Low + case "normal": + default: + precedencestr = Normal + } + return precedencestr +} + +func GetZuulPipelineReporterVerified(verified string) GerritReporter { + var verifiedstr GerritReporter + switch verified { + case "2": + verifiedstr = VerifiedTwo + case "1": + verifiedstr = VerifiedOne + case "0": + verifiedstr = VerifiedZero + case "-1": + verifiedstr = VerifiedMinusOne + case "-2": + verifiedstr = VerifiedMinusTwo + default: + verifiedstr = VerifiedZero + } + return verifiedstr +} + +type GerritReporter int8 + +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 + VerifiedTwo = 2 + VerifiedOne = 1 + VerifiedZero = 0 + VerifiedMinusOne = -1 + VerifiedMinusTwo = -2 +) + +// This struct defines Trigger Configurations for Gerrit, Gitlab and GitHub +// The fields defined are common to all three configurations + +func GetGerritWorkflowValue(value string) GerritWorkflowColumn { + var workflowvalue GerritWorkflowColumn + switch value { + case "1": + workflowvalue = GerritWorkflowPlusOne + case "0": + workflowvalue = GerritWorkflowZero + case "-1": + workflowvalue = GerritWorkflowMinusOne + default: + workflowvalue = GerritWorkflowZero + } + return workflowvalue +} + +const ( + GerritWorkflowPlusOne = 1 + GerritWorkflowZero = 0 + GerritWorkflowMinusOne = -1 +) + +type GerritWorkflowColumn int8 + +func GetGerritCodeReviewValue(value string) GerritCodeReview { + var codereviewvalue GerritCodeReview + switch value { + case "2": + codereviewvalue = GerritCodeReviewPlusTwo + case "1": + codereviewvalue = GerritCodeReviewPlusOne + case "0": + codereviewvalue = GerritCodeReviewZero + case "-1": + codereviewvalue = GerritCodeReviewMinusOne + case "-2": + codereviewvalue = GerritCodeReviewMinusTwo + default: + codereviewvalue = GerritWorkflowZero + } + return codereviewvalue +} + +const ( + GerritCodeReviewPlusTwo = 2 + GerritCodeReviewPlusOne = 1 + GerritCodeReviewZero = 0 + GerritCodeReviewMinusOne = -1 + GerritCodeReviewMinusTwo = -2 +) + +type GerritCodeReview int8 + +type PipelineRequireGerritApproval struct { + Workflow GerritWorkflowColumn `yaml:"Workflow,omitempty"` + Verified GerritReporter `yaml:"Verified,omitempty,flow"` + CodeReview GerritCodeReview `yaml:"Code-Review,omitempty"` +} + +type PipelineRequireApproval struct { + Username string `yaml:"username,omitempty"` + Open bool `yaml:"open,omitempty"` + CurrentPatchset bool `yaml:"current-patchset,omitempty"` + Verified []GerritReporter `yaml:"Verified,omitempty,flow"` + GerritApproval []PipelineRequireGerritApproval `yaml:"approval,omitempty"` + Workflow GerritWorkflowColumn `yaml:"Workflow,omitempty"` +} + +type PipelineTriggerGitGerrit struct { + Approval []PipelineRequireApproval `yaml:"approval,omitempty"` +} + +type PipelineTriggerGit struct { + Event string `yaml:"event"` + Comment string `yaml:"comment,omitempty"` + Gerrit PipelineTriggerGitGerrit `yaml:"require,omitempty"` + Ref []string `yaml:"ref,omitempty"` + Approval []PipelineRequireGerritApproval `yaml:"approval,omitempty"` + Username string `yaml:"username,omitempty"` +} + +type PipelineTriggerGitArray []PipelineTriggerGit + +type PipelineGenericTrigger map[string]PipelineTriggerGitArray + +type PipelineGerritReporter struct { + Submit bool `yaml:"submit,omitempty"` + Verified GerritReporter `yaml:"Verified"` +} + +type GerritReporterMap map[string]PipelineGerritReporter +type PipelineReporter struct { + GerritReporter GerritReporterMap `yaml:",inline"` + SQLReporter []string `yaml:"sqlreporter,omitempty"` +} + +type PipelinePrecedence string + +const ( + High PipelinePrecedence = "high" + Low PipelinePrecedence = "low" + Normal PipelinePrecedence = "normal" +) + +type PipelineManager string + +const ( + Dependent PipelineManager = "dependent" + Independent PipelineManager = "independent" + Serial PipelineManager = "serial" + Supercedent PipelineManager = "supercedent" +) + +type PipelineRequire map[string]PipelineRequireApproval + +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"` +} + +type Pipeline struct { + Pipeline PipelineBody `yaml:"pipeline"` +} + +type PipelineConfig []Pipeline + +type AnsiblePlay struct { + Hosts string `yaml:"hosts"` + Roles []map[string]any `yaml:"roles,omitempty"` + Vars []map[string]any `yaml:"vars,omitempty"` + Tasks []map[string]any `yaml:"tasks,omitempty"` +} + +type AnsiblePlayBook []AnsiblePlay + +type NodeSetNodesBody struct { + Name string `yaml:"name"` + Label string `yaml:"label"` +} + +type NodeSetNodesGroupBody struct { + Name string `yaml:"name"` + Label string `yaml:"label"` +} + +type NodesSetAlternatives string + +type NodeSetBody struct { + Name string `yaml:"name,omitempty"` + Nodes []NodeSetNodesBody `yaml:"nodes,omitempty"` + Groups []NodeSetNodesGroupBody `yaml:"groups,omitempty"` + Alternatives []NodesSetAlternatives `yaml:"alternatives,omitempty"` +} + +type NodeSet struct { + NodeSet NodeSetBody `yaml:"nodeset"` +} + +type NodeSets []NodeSet + +type SemaphoreBody struct { + Name string `yaml:"name"` + Max int8 `yaml:"max,omitempty"` +} + +type Semaphore struct { + Semaphore SemaphoreBody `yaml:"semaphore"` +} + +type Semaphores []Semaphore diff --git a/controllers/static/git-server/update-system-config.sh b/controllers/static/git-server/update-system-config.sh index 127f090d..e1f0f955 100755 --- a/controllers/static/git-server/update-system-config.sh +++ b/controllers/static/git-server/update-system-config.sh @@ -17,45 +17,8 @@ git config user.email "admin@${FQDN}" mkdir -p zuul.d playbooks/base playbooks/config cat << EOF > zuul.d/jobs-base.yaml -- job: - name: base - parent: null - description: The base job. - pre-run: playbooks/base/pre.yaml - post-run: - - playbooks/base/post.yaml - roles: - - zuul: zuul/zuul-jobs - timeout: 1800 - attempts: 3 - secrets: - - site_sflogs - -- semaphore: - name: semaphore-config-update - max: 1 - -- job: - name: config-check - parent: base - final: true - description: Validate the config repo. - run: playbooks/config/check.yaml - nodeset: - nodes: [] - -# TODO: setup allowed-project rules -- job: - name: config-update - parent: base - final: true - description: Deploy config repo update. - run: playbooks/config/update.yaml - semaphore: semaphore-config-update - secrets: - - k8s_config - nodeset: - nodes: [] +# Semaphore +# JobBase EOF diff --git a/go.sum b/go.sum index f0cce249..4cd02b45 100644 --- a/go.sum +++ b/go.sum @@ -36,9 +36,17 @@ cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RX cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= +github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= +github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= +github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apenella/go-ansible v1.1.8-0.20221119160419-71c1cdfab120 h1:YIAGT1T4eCfmOBcEW2iCO/v7YTH/I1eultcA1ENVheU= github.com/apenella/go-ansible v1.1.8-0.20221119160419-71c1cdfab120/go.mod h1:qHzq4E9gaJnEu5ewEHEJmT38/2zZELwHV4nT9XTagUs= @@ -47,6 +55,7 @@ github.com/apenella/go-common-utils/data v0.0.0-20220913191136-86daaa87e7df/go.m github.com/apenella/go-common-utils/error v0.0.0-20220913191136-86daaa87e7df h1:SvlYbjlsSQDS7hbVT1h012/zdgvcwWJ+Yd9XRiiY/8s= github.com/apenella/go-common-utils/error v0.0.0-20220913191136-86daaa87e7df/go.mod h1:+3dyIlHX350xJIUIffwMLswZXU+N2FwDE05VuKqxYdw= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -68,12 +77,14 @@ github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGX github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/emicklei/go-restful/v3 v3.10.2 h1:hIovbnmBTLjHXkqEBUz3HGpXZdM7ZrE9fJIZIqlJLqE= github.com/emicklei/go-restful/v3 v3.10.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -98,6 +109,7 @@ github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeME github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -148,6 +160,7 @@ github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= github.com/google/gnostic v0.6.9 h1:ZK/5VhkoX835RikCHpSUJV9a+S3e1zLh59YnyWeBW+0= github.com/google/gnostic v0.6.9/go.mod h1:Nm8234We1lq6iB9OmlgNv3nH91XLLVZHCDayfA3xq+E= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -186,7 +199,11 @@ github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -200,12 +217,15 @@ github.com/imdario/mergo v0.3.14/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+h github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= @@ -228,6 +248,8 @@ github.com/mattn/go-isatty v0.0.18 h1:DOKFKCQ7FNG2L1rbrmstDN4QVRdS89Nkh85u68Uwp9 github.com/mattn/go-isatty v0.0.18/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8= @@ -239,6 +261,8 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= @@ -257,6 +281,7 @@ github.com/operator-framework/api v0.17.6 h1:E6+vlvYUKafvoXYtCuHlDZrXX4vl8AT+r93 github.com/operator-framework/api v0.17.6/go.mod h1:l/cuwtPxkVUY7fzYgdust2m9tlmb8I4pOvbsUufRb24= github.com/pelletier/go-toml/v2 v2.0.6 h1:nrzqCb7j9cDFj2coyLNLaZuJTLjWjlaz6nvTvIwycIU= github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= +github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -280,6 +305,7 @@ github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjR github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.9.3 h1:41FoI0fD7OR7mGcKE/aOiLkGreyf8ifIOQmJANWogMk= github.com/spf13/afero v1.9.3/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= @@ -313,11 +339,13 @@ github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNG github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -367,6 +395,7 @@ golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRu golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -671,6 +700,7 @@ gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=