ci

package
v1.208.0-test.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CheckStatusStatePending indicates the check is pending or in progress.
	CheckStatusStatePending = provider.CheckStatusStatePending

	// CheckStatusStateSuccess indicates the check passed.
	CheckStatusStateSuccess = provider.CheckStatusStateSuccess

	// CheckStatusStateFailure indicates the check failed.
	CheckStatusStateFailure = provider.CheckStatusStateFailure

	// CheckStatusStateCancelled indicates the check was cancelled.
	CheckStatusStateCancelled = provider.CheckStatusStateCancelled

	// CheckStatusStateSkipped indicates the check was skipped.
	CheckStatusStateSkipped = provider.CheckStatusStateSkipped
)

Variables

This section is empty.

Functions

func ClearPlugins

func ClearPlugins()

ClearPlugins removes all registered plugins. This is primarily for testing.

func Detect

func Detect() provider.Provider

Detect returns a provider that detects it is active in the current environment.

func DetectOrError

func DetectOrError() (provider.Provider, error)

DetectOrError returns the detected provider or an error if none is detected.

func Execute

func Execute(opts ExecuteOptions) error

Execute runs all CI actions for a hook event. Returns nil if not in CI or if the event is not handled.

func Get

func Get(name string) (provider.Provider, error)

Get returns a provider by name.

func GetPlugin

func GetPlugin(componentType string) (plugin.Plugin, bool)

GetPlugin returns a CI plugin by component type.

func GetPluginForEvent

func GetPluginForEvent(event string) plugin.Plugin

GetPluginForEvent returns the plugin that handles a specific hook event. Returns nil if no plugin handles the event.

func IsCI

func IsCI() bool

IsCI returns true if any CI provider is detected.

func List

func List() []string

List returns all registered provider names.

func ListPlugins

func ListPlugins() []string

ListPlugins returns all registered plugin types.

func Register

func Register(p provider.Provider)

Register registers a CI provider. Providers should call this in their init() function.

func RegisterPlugin

func RegisterPlugin(p plugin.Plugin) error

RegisterPlugin registers a CI plugin for a component type. Plugins should call this in their init() function for self-registration.

Types

type BranchStatus

type BranchStatus = provider.BranchStatus

BranchStatus contains status information for a specific branch.

type CheckStatus

type CheckStatus = provider.CheckStatus

CheckStatus contains status information for a single check.

type CheckStatusState

type CheckStatusState = provider.CheckStatusState

CheckStatusState represents the simplified state for display.

type ExecuteOptions

type ExecuteOptions struct {
	// Event is the hook event (e.g., "after.terraform.plan").
	Event string

	// AtmosConfig is the Atmos configuration.
	AtmosConfig *schema.AtmosConfiguration

	// Info contains component and stack information.
	Info *schema.ConfigAndStacksInfo

	// Output is the command output to process.
	Output string

	// ComponentType overrides the component type detection.
	// If empty, it's extracted from the event.
	ComponentType string

	// ForceCIMode forces CI mode even if environment detection fails.
	// This is set when --ci flag is used.
	ForceCIMode bool

	// CommandError is the error from the command execution, if any.
	// When set, check runs are updated with failure status.
	CommandError error
}

ExecuteOptions contains options for executing CI hooks.

type PRStatus

type PRStatus = provider.PRStatus

PRStatus contains status information for a pull request.

type Provider

type Provider = provider.Provider

Provider represents a CI/CD provider (GitHub Actions, GitLab CI, etc.).

type Status

type Status = provider.Status

Status represents the CI status for display (like gh pr status).

type StatusOptions

type StatusOptions = provider.StatusOptions

StatusOptions contains options for fetching CI status.

Directories

Path Synopsis
internal
plugin
Package plugin defines the CI plugin interface and related types for component type abstractions.
Package plugin defines the CI plugin interface and related types for component type abstractions.
provider
Package provider defines the CI/CD provider interface and related types.
Package provider defines the CI/CD provider interface and related types.
plugins
terraform
Package terraform provides the CI provider implementation for Terraform.
Package terraform provides the CI provider implementation for Terraform.
providers
generic
Package generic provides a fallback CI provider for when --ci flag is used but no specific CI platform is detected.
Package generic provides a fallback CI provider for when --ci flag is used but no specific CI platform is detected.
github
Package github provides GitHub Actions CI provider implementation.
Package github provides GitHub Actions CI provider implementation.
Package templates provides CI summary template loading and rendering.
Package templates provides CI summary template loading and rendering.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL