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 ¶
const (
// Testsuite is the official extension for running tests.
Testsuite = "testsuite"
)
Variables ¶
This section is empty.
Functions ¶
func NewExtensionCmd ¶
func ParseRootFlags ¶
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 ¶
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.