circleci

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ResourceTypeProject  = "project"
	ResourceTypeWorkflow = "workflow"
)
View Source
const FailedOutputChannel = "failed"
View Source
const GetFlakyTestsPayloadType = "circleci.flakyTests"
View Source
const GetLastWorkflowPayloadType = "circleci.workflow"
View Source
const GetRecentWorkflowRunsPayloadType = "circleci.workflowRuns"
View Source
const GetTestMetricsPayloadType = "circleci.testMetrics"
View Source
const GetWorkflowPayloadType = "circleci.workflow"
View Source
const PayloadType = "circleci.workflow.completed"
View Source
const PollInterval = 5 * time.Minute
View Source
const ResourceTypePipelineDefinition = "pipeline-definition"
View Source
const SuccessOutputChannel = "success"
View Source
const WorkflowStatusCanceled = "canceled"
View Source
const WorkflowStatusFailed = "failed"
View Source
const WorkflowStatusSuccess = "success"

Variables

This section is empty.

Functions

func IsValidLocation

func IsValidLocation(location string) bool

func ListProjectSlugs added in v0.10.0

func ListProjectSlugs(ctx core.ListResourcesContext) ([]core.IntegrationResource, error)

func ListWorkflowNames added in v0.10.0

func ListWorkflowNames(ctx core.ListResourcesContext) ([]core.IntegrationResource, error)

Types

type CircleCI

type CircleCI struct{}

func (*CircleCI) Actions

func (c *CircleCI) Actions() []core.Action

func (*CircleCI) Cleanup

func (c *CircleCI) Cleanup(ctx core.IntegrationCleanupContext) error

func (*CircleCI) Components

func (c *CircleCI) Components() []core.Component

func (*CircleCI) Configuration

func (c *CircleCI) Configuration() []configuration.Field

func (*CircleCI) Description

func (c *CircleCI) Description() string

func (*CircleCI) HandleAction

func (c *CircleCI) HandleAction(ctx core.IntegrationActionContext) error

func (*CircleCI) HandleRequest

func (c *CircleCI) HandleRequest(ctx core.HTTPRequestContext)

func (*CircleCI) Icon

func (c *CircleCI) Icon() string

func (*CircleCI) Instructions

func (c *CircleCI) Instructions() string

func (*CircleCI) Label

func (c *CircleCI) Label() string

func (*CircleCI) ListResources

func (c *CircleCI) ListResources(resourceType string, ctx core.ListResourcesContext) ([]core.IntegrationResource, error)

func (*CircleCI) Name

func (c *CircleCI) Name() string

func (*CircleCI) Sync

func (c *CircleCI) Sync(ctx core.SyncContext) error

func (*CircleCI) Triggers

func (c *CircleCI) Triggers() []core.Trigger

type CircleCIWebhookHandler

type CircleCIWebhookHandler struct{}

func (*CircleCIWebhookHandler) Cleanup

func (*CircleCIWebhookHandler) CompareConfig

func (h *CircleCIWebhookHandler) CompareConfig(a, b any) (bool, error)

func (*CircleCIWebhookHandler) Merge

func (h *CircleCIWebhookHandler) Merge(current, requested any) (any, bool, error)

func (*CircleCIWebhookHandler) Setup

type Client

type Client struct {
	APIToken string
	// contains filtered or unexported fields
}

func NewClient

func NewClient(http core.HTTPContext, ctx core.IntegrationContext) (*Client, error)

func (*Client) CheckPipelineStatus

func (c *Client) CheckPipelineStatus(pipelineID string) (*PipelineStatusResult, error)

func (*Client) CreateWebhook

func (c *Client) CreateWebhook(name, webhookURL, secret, projectSlug string, events []string) (*WebhookResponse, error)

func (*Client) DeleteWebhook

func (c *Client) DeleteWebhook(webhookID string) error

func (*Client) GetCollaborations added in v0.10.0

func (c *Client) GetCollaborations() ([]CollaborationResponse, error)

func (*Client) GetCurrentUser

func (c *Client) GetCurrentUser() (*UserResponse, error)

func (*Client) GetFlakyTests added in v0.10.0

func (c *Client) GetFlakyTests(projectSlug string) (*FlakyTestsResponse, error)

func (*Client) GetPipeline

func (c *Client) GetPipeline(pipelineID string) (*PipelineResponse, error)

func (*Client) GetPipelineDefinitions

func (c *Client) GetPipelineDefinitions(projectID string) ([]PipelineDefinitionResponse, error)

func (*Client) GetPipelineWorkflows

func (c *Client) GetPipelineWorkflows(pipelineID string) ([]WorkflowResponse, error)

func (*Client) GetPipelinesByOrg added in v0.10.0

func (c *Client) GetPipelinesByOrg(orgSlug string) (*ProjectPipelinesResponse, error)

func (*Client) GetProject

func (c *Client) GetProject(projectSlug string) (*ProjectResponse, error)

func (*Client) GetProjectPipelinesWithPageToken added in v0.10.0

func (c *Client) GetProjectPipelinesWithPageToken(projectSlug, branch, pageToken string) (*ProjectPipelinesResponse, error)

func (*Client) GetTestMetrics added in v0.10.0

func (c *Client) GetTestMetrics(projectSlug, workflowName string) (*TestMetricsResponse, error)

func (*Client) GetWebhook

func (c *Client) GetWebhook(webhookID string) (*WebhookResponse, error)

func (*Client) GetWorkflow

func (c *Client) GetWorkflow(workflowID string) (*WorkflowResponse, error)

func (*Client) GetWorkflowJobs added in v0.10.0

func (c *Client) GetWorkflowJobs(workflowID string) ([]JobResponse, error)

func (*Client) GetWorkflowRuns added in v0.10.0

func (c *Client) GetWorkflowRuns(projectSlug, workflowName string, params WorkflowRunsParams) (*WorkflowRunsResponse, error)

func (*Client) ListWebhooks

func (c *Client) ListWebhooks(projectSlug string) ([]WebhookResponse, error)

func (*Client) ListWorkflowSummaries added in v0.10.0

func (c *Client) ListWorkflowSummaries(projectSlug string) (*WorkflowSummariesResponse, error)

func (*Client) RunPipeline

func (c *Client) RunPipeline(projectSlug string, params RunPipelineParams) (*RunPipelineResponse, error)

type CollaborationResponse added in v0.10.0

type CollaborationResponse struct {
	ID      string `json:"id"`
	Name    string `json:"name"`
	Slug    string `json:"slug"`
	VCSType string `json:"vcs-type"`
}

type Configuration

type Configuration struct {
	APIToken string `json:"apiToken"`
}

type CreateWebhookParams

type CreateWebhookParams struct {
	Name   string   `json:"name"`
	URL    string   `json:"url"`
	Events []string `json:"events"`
	Scope  struct {
		ID   string `json:"id"`
		Type string `json:"type"`
	} `json:"scope"`
	SigningSecret string `json:"signing-secret"`
	VerifyTLS     bool   `json:"verify-tls"`
}

type FlakyTest added in v0.10.0

type FlakyTest struct {
	TestName     string `json:"test-name"`
	Classname    string `json:"classname"`
	PipelineName string `json:"pipeline-name"`
	WorkflowName string `json:"workflow-name"`
	JobName      string `json:"job-name"`
	TimesFlaky   int    `json:"times-flaked"`
	Source       string `json:"source"`
	File         string `json:"file"`
}

type FlakyTestsResponse added in v0.10.0

type FlakyTestsResponse struct {
	FlakyTests      []FlakyTest `json:"flaky-tests"`
	TotalFlakyTests int         `json:"total-flaky-tests"`
}

type GetFlakyTests added in v0.10.0

type GetFlakyTests struct{}

func (*GetFlakyTests) Actions added in v0.10.0

func (c *GetFlakyTests) Actions() []core.Action

func (*GetFlakyTests) Cancel added in v0.10.0

func (c *GetFlakyTests) Cancel(ctx core.ExecutionContext) error

func (*GetFlakyTests) Cleanup added in v0.10.0

func (c *GetFlakyTests) Cleanup(ctx core.SetupContext) error

func (*GetFlakyTests) Color added in v0.10.0

func (c *GetFlakyTests) Color() string

func (*GetFlakyTests) Configuration added in v0.10.0

func (c *GetFlakyTests) Configuration() []configuration.Field

func (*GetFlakyTests) Description added in v0.10.0

func (c *GetFlakyTests) Description() string

func (*GetFlakyTests) Documentation added in v0.10.0

func (c *GetFlakyTests) Documentation() string

func (*GetFlakyTests) ExampleOutput added in v0.10.0

func (c *GetFlakyTests) ExampleOutput() map[string]any

func (*GetFlakyTests) Execute added in v0.10.0

func (c *GetFlakyTests) Execute(ctx core.ExecutionContext) error

func (*GetFlakyTests) HandleAction added in v0.10.0

func (c *GetFlakyTests) HandleAction(ctx core.ActionContext) error

func (*GetFlakyTests) HandleWebhook added in v0.10.0

func (c *GetFlakyTests) HandleWebhook(ctx core.WebhookRequestContext) (int, error)

func (*GetFlakyTests) Icon added in v0.10.0

func (c *GetFlakyTests) Icon() string

func (*GetFlakyTests) Label added in v0.10.0

func (c *GetFlakyTests) Label() string

func (*GetFlakyTests) Name added in v0.10.0

func (c *GetFlakyTests) Name() string

func (*GetFlakyTests) OutputChannels added in v0.10.0

func (c *GetFlakyTests) OutputChannels(configuration any) []core.OutputChannel

func (*GetFlakyTests) ProcessQueueItem added in v0.10.0

func (c *GetFlakyTests) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*GetFlakyTests) Setup added in v0.10.0

func (c *GetFlakyTests) Setup(ctx core.SetupContext) error

type GetFlakyTestsConfiguration added in v0.10.0

type GetFlakyTestsConfiguration struct {
	ProjectSlug string `json:"projectSlug" mapstructure:"projectSlug"`
}

type GetLastWorkflow added in v0.10.0

type GetLastWorkflow struct{}

func (*GetLastWorkflow) Actions added in v0.10.0

func (c *GetLastWorkflow) Actions() []core.Action

func (*GetLastWorkflow) Cancel added in v0.10.0

func (c *GetLastWorkflow) Cancel(ctx core.ExecutionContext) error

func (*GetLastWorkflow) Cleanup added in v0.10.0

func (c *GetLastWorkflow) Cleanup(ctx core.SetupContext) error

func (*GetLastWorkflow) Color added in v0.10.0

func (c *GetLastWorkflow) Color() string

func (*GetLastWorkflow) Configuration added in v0.10.0

func (c *GetLastWorkflow) Configuration() []configuration.Field

func (*GetLastWorkflow) Description added in v0.10.0

func (c *GetLastWorkflow) Description() string

func (*GetLastWorkflow) Documentation added in v0.10.0

func (c *GetLastWorkflow) Documentation() string

func (*GetLastWorkflow) ExampleOutput added in v0.10.0

func (c *GetLastWorkflow) ExampleOutput() map[string]any

func (*GetLastWorkflow) Execute added in v0.10.0

func (c *GetLastWorkflow) Execute(ctx core.ExecutionContext) error

func (*GetLastWorkflow) HandleAction added in v0.10.0

func (c *GetLastWorkflow) HandleAction(ctx core.ActionContext) error

func (*GetLastWorkflow) HandleWebhook added in v0.10.0

func (c *GetLastWorkflow) HandleWebhook(ctx core.WebhookRequestContext) (int, error)

func (*GetLastWorkflow) Icon added in v0.10.0

func (c *GetLastWorkflow) Icon() string

func (*GetLastWorkflow) Label added in v0.10.0

func (c *GetLastWorkflow) Label() string

func (*GetLastWorkflow) Name added in v0.10.0

func (c *GetLastWorkflow) Name() string

func (*GetLastWorkflow) OutputChannels added in v0.10.0

func (c *GetLastWorkflow) OutputChannels(configuration any) []core.OutputChannel

func (*GetLastWorkflow) ProcessQueueItem added in v0.10.0

func (c *GetLastWorkflow) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*GetLastWorkflow) Setup added in v0.10.0

func (c *GetLastWorkflow) Setup(ctx core.SetupContext) error

type GetLastWorkflowConfiguration added in v0.10.0

type GetLastWorkflowConfiguration struct {
	ProjectSlug string `json:"projectSlug" mapstructure:"projectSlug"`
	Branch      string `json:"branch" mapstructure:"branch"`
	Status      string `json:"status" mapstructure:"status"`
}

type GetRecentWorkflowRuns added in v0.10.0

type GetRecentWorkflowRuns struct{}

func (*GetRecentWorkflowRuns) Actions added in v0.10.0

func (c *GetRecentWorkflowRuns) Actions() []core.Action

func (*GetRecentWorkflowRuns) Cancel added in v0.10.0

func (*GetRecentWorkflowRuns) Cleanup added in v0.10.0

func (c *GetRecentWorkflowRuns) Cleanup(ctx core.SetupContext) error

func (*GetRecentWorkflowRuns) Color added in v0.10.0

func (c *GetRecentWorkflowRuns) Color() string

func (*GetRecentWorkflowRuns) Configuration added in v0.10.0

func (c *GetRecentWorkflowRuns) Configuration() []configuration.Field

func (*GetRecentWorkflowRuns) Description added in v0.10.0

func (c *GetRecentWorkflowRuns) Description() string

func (*GetRecentWorkflowRuns) Documentation added in v0.10.0

func (c *GetRecentWorkflowRuns) Documentation() string

func (*GetRecentWorkflowRuns) ExampleOutput added in v0.10.0

func (c *GetRecentWorkflowRuns) ExampleOutput() map[string]any

func (*GetRecentWorkflowRuns) Execute added in v0.10.0

func (*GetRecentWorkflowRuns) HandleAction added in v0.10.0

func (c *GetRecentWorkflowRuns) HandleAction(ctx core.ActionContext) error

func (*GetRecentWorkflowRuns) HandleWebhook added in v0.10.0

func (c *GetRecentWorkflowRuns) HandleWebhook(ctx core.WebhookRequestContext) (int, error)

func (*GetRecentWorkflowRuns) Icon added in v0.10.0

func (c *GetRecentWorkflowRuns) Icon() string

func (*GetRecentWorkflowRuns) Label added in v0.10.0

func (c *GetRecentWorkflowRuns) Label() string

func (*GetRecentWorkflowRuns) Name added in v0.10.0

func (c *GetRecentWorkflowRuns) Name() string

func (*GetRecentWorkflowRuns) OutputChannels added in v0.10.0

func (c *GetRecentWorkflowRuns) OutputChannels(configuration any) []core.OutputChannel

func (*GetRecentWorkflowRuns) ProcessQueueItem added in v0.10.0

func (c *GetRecentWorkflowRuns) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*GetRecentWorkflowRuns) Setup added in v0.10.0

type GetRecentWorkflowRunsConfiguration added in v0.10.0

type GetRecentWorkflowRunsConfiguration struct {
	ProjectSlug  string `json:"projectSlug" mapstructure:"projectSlug"`
	WorkflowName string `json:"workflowName" mapstructure:"workflowName"`
	Branch       string `json:"branch" mapstructure:"branch"`
}

type GetTestMetrics added in v0.10.0

type GetTestMetrics struct{}

func (*GetTestMetrics) Actions added in v0.10.0

func (c *GetTestMetrics) Actions() []core.Action

func (*GetTestMetrics) Cancel added in v0.10.0

func (c *GetTestMetrics) Cancel(ctx core.ExecutionContext) error

func (*GetTestMetrics) Cleanup added in v0.10.0

func (c *GetTestMetrics) Cleanup(ctx core.SetupContext) error

func (*GetTestMetrics) Color added in v0.10.0

func (c *GetTestMetrics) Color() string

func (*GetTestMetrics) Configuration added in v0.10.0

func (c *GetTestMetrics) Configuration() []configuration.Field

func (*GetTestMetrics) Description added in v0.10.0

func (c *GetTestMetrics) Description() string

func (*GetTestMetrics) Documentation added in v0.10.0

func (c *GetTestMetrics) Documentation() string

func (*GetTestMetrics) ExampleOutput added in v0.10.0

func (c *GetTestMetrics) ExampleOutput() map[string]any

func (*GetTestMetrics) Execute added in v0.10.0

func (c *GetTestMetrics) Execute(ctx core.ExecutionContext) error

func (*GetTestMetrics) HandleAction added in v0.10.0

func (c *GetTestMetrics) HandleAction(ctx core.ActionContext) error

func (*GetTestMetrics) HandleWebhook added in v0.10.0

func (c *GetTestMetrics) HandleWebhook(ctx core.WebhookRequestContext) (int, error)

func (*GetTestMetrics) Icon added in v0.10.0

func (c *GetTestMetrics) Icon() string

func (*GetTestMetrics) Label added in v0.10.0

func (c *GetTestMetrics) Label() string

func (*GetTestMetrics) Name added in v0.10.0

func (c *GetTestMetrics) Name() string

func (*GetTestMetrics) OutputChannels added in v0.10.0

func (c *GetTestMetrics) OutputChannels(configuration any) []core.OutputChannel

func (*GetTestMetrics) ProcessQueueItem added in v0.10.0

func (c *GetTestMetrics) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*GetTestMetrics) Setup added in v0.10.0

func (c *GetTestMetrics) Setup(ctx core.SetupContext) error

type GetTestMetricsConfiguration added in v0.10.0

type GetTestMetricsConfiguration struct {
	ProjectSlug  string `json:"projectSlug" mapstructure:"projectSlug"`
	WorkflowName string `json:"workflowName" mapstructure:"workflowName"`
}

type GetWorkflow added in v0.10.0

type GetWorkflow struct{}

func (*GetWorkflow) Actions added in v0.10.0

func (c *GetWorkflow) Actions() []core.Action

func (*GetWorkflow) Cancel added in v0.10.0

func (c *GetWorkflow) Cancel(ctx core.ExecutionContext) error

func (*GetWorkflow) Cleanup added in v0.10.0

func (c *GetWorkflow) Cleanup(ctx core.SetupContext) error

func (*GetWorkflow) Color added in v0.10.0

func (c *GetWorkflow) Color() string

func (*GetWorkflow) Configuration added in v0.10.0

func (c *GetWorkflow) Configuration() []configuration.Field

func (*GetWorkflow) Description added in v0.10.0

func (c *GetWorkflow) Description() string

func (*GetWorkflow) Documentation added in v0.10.0

func (c *GetWorkflow) Documentation() string

func (*GetWorkflow) ExampleOutput added in v0.10.0

func (c *GetWorkflow) ExampleOutput() map[string]any

func (*GetWorkflow) Execute added in v0.10.0

func (c *GetWorkflow) Execute(ctx core.ExecutionContext) error

func (*GetWorkflow) HandleAction added in v0.10.0

func (c *GetWorkflow) HandleAction(ctx core.ActionContext) error

func (*GetWorkflow) HandleWebhook added in v0.10.0

func (c *GetWorkflow) HandleWebhook(ctx core.WebhookRequestContext) (int, error)

func (*GetWorkflow) Icon added in v0.10.0

func (c *GetWorkflow) Icon() string

func (*GetWorkflow) Label added in v0.10.0

func (c *GetWorkflow) Label() string

func (*GetWorkflow) Name added in v0.10.0

func (c *GetWorkflow) Name() string

func (*GetWorkflow) OutputChannels added in v0.10.0

func (c *GetWorkflow) OutputChannels(configuration any) []core.OutputChannel

func (*GetWorkflow) ProcessQueueItem added in v0.10.0

func (c *GetWorkflow) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*GetWorkflow) Setup added in v0.10.0

func (c *GetWorkflow) Setup(ctx core.SetupContext) error

type GetWorkflowConfiguration added in v0.10.0

type GetWorkflowConfiguration struct {
	WorkflowID string `json:"workflowId" mapstructure:"workflowId"`
}

type JobResponse added in v0.10.0

type JobResponse struct {
	ID            string `json:"id"`
	Name          string `json:"name"`
	Type          string `json:"type"`
	Status        string `json:"status"`
	StartedAt     string `json:"started_at"`
	StoppedAt     string `json:"stopped_at"`
	JobNumber     int    `json:"job_number"`
	ProjectSlug   string `json:"project_slug"`
	ApprovalReqID string `json:"approval_request_id,omitempty"`
}

type Metadata

type Metadata struct {
	Projects []string `json:"projects"`
}

type OnWorkflowCompleted

type OnWorkflowCompleted struct{}

func (*OnWorkflowCompleted) Actions

func (p *OnWorkflowCompleted) Actions() []core.Action

func (*OnWorkflowCompleted) Cleanup

func (p *OnWorkflowCompleted) Cleanup(ctx core.TriggerContext) error

func (*OnWorkflowCompleted) Color

func (p *OnWorkflowCompleted) Color() string

func (*OnWorkflowCompleted) Configuration

func (p *OnWorkflowCompleted) Configuration() []configuration.Field

func (*OnWorkflowCompleted) Description

func (p *OnWorkflowCompleted) Description() string

func (*OnWorkflowCompleted) Documentation

func (p *OnWorkflowCompleted) Documentation() string

func (*OnWorkflowCompleted) ExampleData

func (t *OnWorkflowCompleted) ExampleData() map[string]any

func (*OnWorkflowCompleted) HandleAction

func (p *OnWorkflowCompleted) HandleAction(ctx core.TriggerActionContext) (map[string]any, error)

func (*OnWorkflowCompleted) HandleWebhook

func (p *OnWorkflowCompleted) HandleWebhook(ctx core.WebhookRequestContext) (int, error)

func (*OnWorkflowCompleted) Icon

func (p *OnWorkflowCompleted) Icon() string

func (*OnWorkflowCompleted) Label

func (p *OnWorkflowCompleted) Label() string

func (*OnWorkflowCompleted) Name

func (p *OnWorkflowCompleted) Name() string

func (*OnWorkflowCompleted) Setup

type OnWorkflowCompletedConfiguration

type OnWorkflowCompletedConfiguration struct {
	ProjectSlug string `json:"projectSlug"`
}

type OnWorkflowCompletedMetadata

type OnWorkflowCompletedMetadata struct {
	Project *Project `json:"project"`
}

type Parameter

type Parameter struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type PipelineDefinitionResponse

type PipelineDefinitionResponse struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
	CreatedAt   string `json:"created_at"`
}

type PipelineInfo

type PipelineInfo struct {
	ID          string `json:"id"`
	Number      int    `json:"number"`
	CreatedAt   string `json:"created_at"`
	PipelineURL string `json:"pipeline_url"`
}

type PipelineResponse

type PipelineResponse struct {
	ID          string                 `json:"id"`
	Number      int                    `json:"number"`
	State       string                 `json:"state"`
	ProjectSlug string                 `json:"project_slug"`
	CreatedAt   string                 `json:"created_at"`
	UpdatedAt   string                 `json:"updated_at"`
	VCS         map[string]interface{} `json:"vcs"`
}

type PipelineStatusResult

type PipelineStatusResult struct {
	AllDone      bool
	AnyFailed    bool
	Workflows    []WorkflowResponse
	IsErrorState bool
}

type Project

type Project struct {
	ID   string `json:"id"`
	Name string `json:"name"`
	Slug string `json:"slug"`
}

type ProjectPipelinesResponse added in v0.10.0

type ProjectPipelinesResponse struct {
	Items         []PipelineResponse `json:"items"`
	NextPageToken string             `json:"next_page_token"`
}

type ProjectResponse

type ProjectResponse struct {
	ID               string `json:"id"`
	Name             string `json:"name"`
	Slug             string `json:"slug"`
	OrganizationName string `json:"organization_name"`
}

type RunPipeline

type RunPipeline struct{}

func (*RunPipeline) Actions

func (t *RunPipeline) Actions() []core.Action

func (*RunPipeline) Cancel

func (t *RunPipeline) Cancel(ctx core.ExecutionContext) error

func (*RunPipeline) Cleanup

func (t *RunPipeline) Cleanup(ctx core.SetupContext) error

func (*RunPipeline) Color

func (t *RunPipeline) Color() string

func (*RunPipeline) Configuration

func (t *RunPipeline) Configuration() []configuration.Field

func (*RunPipeline) Description

func (t *RunPipeline) Description() string

func (*RunPipeline) Documentation

func (t *RunPipeline) Documentation() string

func (*RunPipeline) ExampleOutput

func (c *RunPipeline) ExampleOutput() map[string]any

func (*RunPipeline) Execute

func (t *RunPipeline) Execute(ctx core.ExecutionContext) error

func (*RunPipeline) HandleAction

func (t *RunPipeline) HandleAction(ctx core.ActionContext) error

func (*RunPipeline) HandleWebhook

func (t *RunPipeline) HandleWebhook(ctx core.WebhookRequestContext) (int, error)

func (*RunPipeline) Icon

func (t *RunPipeline) Icon() string

func (*RunPipeline) Label

func (t *RunPipeline) Label() string

func (*RunPipeline) Name

func (t *RunPipeline) Name() string

func (*RunPipeline) OutputChannels

func (t *RunPipeline) OutputChannels(configuration any) []core.OutputChannel

func (*RunPipeline) ProcessQueueItem

func (t *RunPipeline) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*RunPipeline) Setup

func (t *RunPipeline) Setup(ctx core.SetupContext) error

type RunPipelineExecutionMetadata

type RunPipelineExecutionMetadata struct {
	Pipeline PipelineInfo `json:"pipeline" mapstructure:"pipeline"`
}

type RunPipelineNodeMetadata

type RunPipelineNodeMetadata struct {
	ProjectID              string `json:"projectId" mapstructure:"projectId"`
	ProjectSlug            string `json:"projectSlug" mapstructure:"projectSlug"`
	ProjectName            string `json:"projectName" mapstructure:"projectName"`
	PipelineDefinitionID   string `json:"pipelineDefinitionId" mapstructure:"pipelineDefinitionId"`
	PipelineDefinitionName string `json:"pipelineDefinitionName" mapstructure:"pipelineDefinitionName"`
}

type RunPipelineParams

type RunPipelineParams struct {
	DefinitionID string            `json:"definition_id"`
	Config       map[string]string `json:"config"`   // e.g. {"branch": "main"} or {"tag": "v1.0"}
	Checkout     map[string]string `json:"checkout"` // same as config
	Parameters   map[string]string `json:"parameters,omitempty"`
}

type RunPipelineResponse

type RunPipelineResponse struct {
	ID        string `json:"id"`
	Number    int    `json:"number"`
	State     string `json:"state"`
	CreatedAt string `json:"created_at"`
}

type RunPipelineSpec

type RunPipelineSpec struct {
	ProjectSlug          string      `json:"projectSlug"`
	Location             string      `json:"location"`
	PipelineDefinitionID string      `json:"pipelineDefinitionId"`
	Parameters           []Parameter `json:"parameters"`
}

type TestMetric added in v0.10.0

type TestMetric struct {
	TestName   string  `json:"test_name"`
	Classname  string  `json:"classname"`
	FailedRuns int     `json:"failed_runs"`
	TotalRuns  int     `json:"total_runs"`
	Flaky      bool    `json:"flaky"`
	P50Secs    float64 `json:"p50_duration_secs,omitempty"`
	Source     string  `json:"source,omitempty"`
	File       string  `json:"file,omitempty"`
}

type TestMetricsResponse added in v0.10.0

type TestMetricsResponse struct {
	MostFailedTests []TestMetric `json:"most_failed_tests"`
	SlowestTests    []TestMetric `json:"slowest_tests"`
	TotalTestRuns   int          `json:"total_test_runs"`
	TestRuns        []TestRun    `json:"test_runs"`
}

type TestRun added in v0.10.0

type TestRun struct {
	PipelineNumber int     `json:"pipeline_number"`
	WorkflowID     string  `json:"workflow_id"`
	SuccessRate    float64 `json:"success_rate"`
	TestCounts     struct {
		Error   int `json:"error"`
		Failure int `json:"failure"`
		Skipped int `json:"skipped"`
		Success int `json:"success"`
		Total   int `json:"total"`
	} `json:"test_counts"`
}

type UserResponse

type UserResponse struct {
	ID    string `json:"id"`
	Login string `json:"login"`
	Name  string `json:"name"`
}

type WebhookConfiguration

type WebhookConfiguration struct {
	ProjectSlug string   `json:"projectSlug"`
	Events      []string `json:"events"`
}

type WebhookMetadata

type WebhookMetadata struct {
	WebhookID string `json:"webhookId"`
	Name      string `json:"name"`
}

type WebhookResponse

type WebhookResponse struct {
	ID   string `json:"id"`
	Name string `json:"name"`
	URL  string `json:"url"`
}

type WorkflowInfo

type WorkflowInfo struct {
	ID     string `json:"id"`
	Name   string `json:"name"`
	Status string `json:"status"`
}

type WorkflowResponse

type WorkflowResponse struct {
	ID        string `json:"id"`
	Name      string `json:"name"`
	Status    string `json:"status"`
	CreatedAt string `json:"created_at"`
	StoppedAt string `json:"stopped_at"`
}

type WorkflowRunItem added in v0.10.0

type WorkflowRunItem struct {
	ID          string `json:"id"`
	Branch      string `json:"branch"`
	Duration    int    `json:"duration"`
	CreatedAt   string `json:"created_at"`
	StoppedAt   string `json:"stopped_at"`
	CreditsUsed int    `json:"credits_used"`
	Status      string `json:"status"`
	IsApproval  bool   `json:"is_approval"`
}

type WorkflowRunsParams added in v0.10.0

type WorkflowRunsParams struct {
	Branch    string
	StartDate string
	EndDate   string
}

type WorkflowRunsResponse added in v0.10.0

type WorkflowRunsResponse struct {
	Items         []WorkflowRunItem `json:"items"`
	NextPageToken string            `json:"next_page_token"`
}

type WorkflowSummariesResponse added in v0.10.0

type WorkflowSummariesResponse struct {
	Items         []WorkflowSummary `json:"items"`
	NextPageToken string            `json:"next_page_token"`
}

type WorkflowSummary added in v0.10.0

type WorkflowSummary struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

Jump to

Keyboard shortcuts

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