Documentation
¶
Overview ¶
Package gitlab provides the GitLab CI plugin for TerraCi. It registers a pipeline generator and MR comment service.
Index ¶
- type Plugin
- func (p *Plugin) BuildInitConfig(state *initwiz.StateMap) *initwiz.InitContribution
- func (p *Plugin) CommitSHA() string
- func (p *Plugin) DetectEnv() bool
- func (p *Plugin) InitGroups() []*initwiz.InitGroupSpec
- func (p *Plugin) NewCommentService(_ *plugin.AppContext) ci.CommentService
- func (p *Plugin) NewGenerator(ctx *plugin.AppContext, depGraph *graph.DependencyGraph, ...) pipeline.Generator
- func (p *Plugin) PipelineID() string
- func (p *Plugin) Preflight(_ context.Context, _ *plugin.AppContext) error
- func (p *Plugin) ProviderName() string
- func (p *Plugin) SetAutoApprove(v bool)
- func (p *Plugin) SetPlanOnly(v bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Plugin ¶
type Plugin struct {
plugin.BasePlugin[*configpkg.Config]
}
Plugin is the GitLab CI plugin.
func (*Plugin) BuildInitConfig ¶
func (p *Plugin) BuildInitConfig(state *initwiz.StateMap) *initwiz.InitContribution
BuildInitConfig builds the GitLab CI init contribution.
func (*Plugin) InitGroups ¶ added in v0.7.5
func (p *Plugin) InitGroups() []*initwiz.InitGroupSpec
InitGroups returns the init wizard group specs for GitLab CI.
func (*Plugin) NewCommentService ¶
func (p *Plugin) NewCommentService(_ *plugin.AppContext) ci.CommentService
NewCommentService creates a new MR comment service.
func (*Plugin) NewGenerator ¶
func (p *Plugin) NewGenerator(ctx *plugin.AppContext, depGraph *graph.DependencyGraph, modules []*discovery.Module) pipeline.Generator
NewGenerator creates a new GitLab CI pipeline generator.
func (*Plugin) PipelineID ¶ added in v0.7.4
PipelineID returns the GitLab CI pipeline ID.
func (*Plugin) Preflight ¶ added in v0.9.0
Preflight detects MR context when running inside GitLab CI.
func (*Plugin) ProviderName ¶
ProviderName returns the provider name.
func (*Plugin) SetAutoApprove ¶ added in v0.7.5
SetAutoApprove sets auto-approve mode directly on the typed config.
func (*Plugin) SetPlanOnly ¶ added in v0.7.5
SetPlanOnly sets plan-only mode directly on the typed config.