git

package
v1.222.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package git registers the built-in `git` hook kind, which publishes component artifacts to a Git repository on Atmos lifecycle events (e.g. after.terraform.apply). See docs/prd/git-ops.md, "Terraform Lifecycle Git Publishing".

The kind targets the current repository by default; setting `repository` targets a managed repository under the top-level git.repositories config (cloned/reconciled via the shared Git service). It inherits standard hooks semantics: event binding, --skip-hooks, and on_failure modes. All Git operations go through the pkg/git provider registry (safety rules, auth env composition, and push retry included).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine struct {
	// contains filtered or unexported fields
}

Engine publishes commits through the shared Git service (pkg/git). It is a thin orchestrator: repository resolution, environment composition, path validation, commit, and push all delegate to pkg/git; failure semantics delegate to the hooks engine via hooks.ApplyOnFailure.

func NewEngine

func NewEngine() *Engine

NewEngine returns a git hook engine wired to the production Git service, process environment, and Atmos Auth manager.

func (*Engine) Run

func (e *Engine) Run(ctx *hooks.ExecContext) (*hooks.Output, error)

Run satisfies hooks.Engine. Resolution errors (unknown repository, path traversal, nil context) are configuration errors and propagate raw; operational errors (clone/commit/push) go through the hook's on_failure mode, mirroring the built-in command engine.

Jump to

Keyboard shortcuts

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