Documentation
¶
Index ¶
- func ConfigExists(rootDir string) bool
- func GetDefinitionByNameOrID(cfg *RunConfig, nameOrID string) (string, *string, string, error)
- func IsValidUUID(s string) bool
- func MapVcsTypeToOrgType(vcsType string) string
- func SaveRunConfig(workDir string, cfg *RunConfig) error
- func TriggerRun(ctx context.Context, client *circleci.Client, cfg *RunConfig, params RunParams) (*circleci.RunResponse, error)
- type RunConfig
- type RunDefinition
- type RunParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigExists ¶
ConfigExists checks whether .chunk/run.json exists at the given root directory.
func GetDefinitionByNameOrID ¶
GetDefinitionByNameOrID looks up a definition by name first, then checks if the input is a raw UUID. Returns the definition ID, the chunk environment ID, and the default branch.
func IsValidUUID ¶
IsValidUUID checks if a string is a valid UUID format.
func MapVcsTypeToOrgType ¶
MapVcsTypeToOrgType maps a VCS type string to the org type used in run config. "github" and "gh" map to "github"; everything else maps to "circleci".
func SaveRunConfig ¶
SaveRunConfig writes run config to .chunk/run.json.
Types ¶
type RunConfig ¶
type RunConfig struct {
OrgID string `json:"org_id"`
ProjectID string `json:"project_id"`
OrgType string `json:"org_type"`
Definitions map[string]RunDefinition `json:"definitions"`
}
func LoadRunConfig ¶
type RunDefinition ¶
Click to show internal directories.
Click to hide internal directories.