Help us shape the future of Go! Take the 2026 Go Developer Survey

circleciconfig

package
v8.153.2 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package circleciconfig reads a repository's CircleCI configuration for the jobs CircleCI runs on a branch or a tag, so a wait that reads CircleCI only through the commit statuses it posts to GitHub knows the jobs that have posted nothing yet: a job behind requires: posts its first status when it starts, after the jobs it requires have finished.

The configuration is read as CircleCI reads it: devctl's generated setup workflow continues with .circleci/workflows.yml deep-merged with the optional .circleci/custom.yml (yq's *+: maps merge, lists append), any other configuration is its own. A job's status context is "ci/circleci: <name>", the name its workflow entry gives it or else the job's own.

Index

Constants

View Source
const (
	ConfigPath    = ".circleci/config.yml"
	WorkflowsPath = ".circleci/workflows.yml"
	CustomPath    = ".circleci/custom.yml"
)

The files the configuration is read from.

Variables

This section is empty.

Functions

This section is empty.

Types

type Jobs

type Jobs struct {
	// Names are the names the jobs post their statuses under, sorted.
	Names []string
	// Warnings name what the configuration holds that Names cannot account
	// for: a workflow whose condition is not known before the pipeline runs,
	// a matrix job, a continuation devctl does not generate.
	Warnings []string
}

Jobs are the jobs CircleCI runs for one revision.

func List

func List(ctx context.Context, read Reader, run Run) (Jobs, bool, error)

List lists the jobs CircleCI runs for run from the configuration read reads: found is false when the revision carries no ConfigPath.

type Reader

type Reader func(ctx context.Context, path string) (content []byte, found bool, err error)

Reader reads a file of the revision the jobs are listed for; found is false when the revision has no such file.

type Run

type Run struct {
	Branch string
	Tag    string
}

Run is what a pipeline runs for: a branch, or a tag.

func (Run) String

func (r Run) String() string

Jump to

Keyboard shortcuts

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