extension

package
v1.0.48773 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package extension implements the circleci plugin mechanism.

Any executable named "circleci-<name>" found in PATH is treated as an extension and can be invoked transparently as "circleci <name>". The extension receives CIRCLE_TOKEN, CIRCLE_HOST, and best-effort project metadata via environment variables so it can call the CircleCI API without reimplementing authentication.

Index

Constants

View Source
const (
	// Testsuite is the official extension for running tests.
	Testsuite = "testsuite"
)

Variables

This section is empty.

Functions

func NewExtensionCmd

func NewExtensionCmd() *cobra.Command

func ParseRootFlags

func ParseRootFlags(cmd *cobra.Command) (extArgs []string)

ParseRootFlags populates the root command's persistent flags from os.Args for a command that sets DisableFlagParsing. Cobra never calls ParseFlags for such commands, so without this --theme, --debug, --quiet, --config, etc. would still hold their defaults when the root PersistentPreRunE sets up streams and loads config.

Parsing is non-interspersed, so it stops at the first positional argument (the extension name); flags after it belong to the extension and are returned verbatim along with any other trailing args.

func RegisterExtensions

func RegisterExtensions(rootCmd *cobra.Command)

RegisterExtensions registers extensions in the following order:

  • Managed extensions found in the extensions directory.
  • Official uninstalled extensions.
  • Unmanaged extensions found in PATH.

Types

This section is empty.

Jump to

Keyboard shortcuts

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