Documentation
¶
Overview ¶
Package generic provides a fallback CI provider for when --ci flag is used but no specific CI platform is detected.
Index ¶
- Constants
- type OutputWriter
- type Provider
- func (p *Provider) Context() (*provider.Context, error)
- func (p *Provider) CreateCheckRun(_ context.Context, opts *provider.CreateCheckRunOptions) (*provider.CheckRun, error)
- func (p *Provider) Detect() bool
- func (p *Provider) GetStatus(_ context.Context, _ provider.StatusOptions) (*provider.Status, error)
- func (p *Provider) Name() string
- func (p *Provider) OutputWriter() provider.OutputWriter
- func (p *Provider) UpdateCheckRun(_ context.Context, opts *provider.UpdateCheckRunOptions) (*provider.CheckRun, error)
Constants ¶
const (
// ProviderName is the name of the generic CI provider.
ProviderName = "generic"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OutputWriter ¶
type OutputWriter struct {
// contains filtered or unexported fields
}
OutputWriter writes CI outputs for the generic provider.
func (*OutputWriter) WriteOutput ¶
func (w *OutputWriter) WriteOutput(key, value string) error
WriteOutput writes a key-value pair to CI outputs.
func (*OutputWriter) WriteSummary ¶
func (w *OutputWriter) WriteSummary(content string) error
WriteSummary writes content to the job summary.
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider is a fallback CI provider for when --ci flag is used but no specific CI platform is detected. It writes summaries to stdout and outputs to environment file or stdout.
func NewProvider ¶
func NewProvider() *Provider
NewProvider creates a new generic CI provider. It checks for ATMOS_CI_OUTPUT and ATMOS_CI_SUMMARY environment variables to determine where to write outputs.
func (*Provider) CreateCheckRun ¶
func (p *Provider) CreateCheckRun(_ context.Context, opts *provider.CreateCheckRunOptions) (*provider.CheckRun, error)
CreateCheckRun writes check run status to stderr and returns a synthetic CheckRun.
func (*Provider) Detect ¶
Detect returns false - this provider is never auto-detected. It's only used when CI mode is forced via --ci flag.
func (*Provider) OutputWriter ¶
func (p *Provider) OutputWriter() provider.OutputWriter
OutputWriter returns an OutputWriter for the generic provider.
func (*Provider) UpdateCheckRun ¶
func (p *Provider) UpdateCheckRun(_ context.Context, opts *provider.UpdateCheckRunOptions) (*provider.CheckRun, error)
UpdateCheckRun writes check run status to stderr and returns an updated CheckRun.