codepipeline

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: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Source                                 = "aws.codepipeline"
	DetailTypePipelineExecutionStateChange = "CodePipeline Pipeline Execution State Change"
)
View Source
const (
	RetryModeFailedActions = "FAILED_ACTIONS"
	RetryModeAllActions    = "ALL_ACTIONS"
)
View Source
const (
	PayloadType = "aws.codepipeline.pipeline.finished"

	PassedOutputChannel = "passed"
	FailedOutputChannel = "failed"

	PipelineStatusInProgress = "InProgress"
	PipelineStatusSucceeded  = "Succeeded"
	PipelineStatusFailed     = "Failed"
	PipelineStatusStopped    = "Stopped"
	PipelineStatusStopping   = "Stopping"

	PollInterval = 5 * time.Minute
)
View Source
const TargetPrefix = "CodePipeline_20150709."

Variables

View Source
var AllPipelineExecutionStates = []configuration.FieldOption{
	{Label: "STARTED", Value: "STARTED"},
	{Label: "SUCCEEDED", Value: "SUCCEEDED"},
	{Label: "FAILED", Value: "FAILED"},
	{Label: "CANCELED", Value: "CANCELED"},
	{Label: "STOPPED", Value: "STOPPED"},
	{Label: "SUPERSEDED", Value: "SUPERSEDED"},
	{Label: "RESUMED", Value: "RESUMED"},
}

Functions

func ListPipelineExecutions added in v0.10.0

func ListPipelineExecutions(ctx core.ListResourcesContext, resourceType string) ([]core.IntegrationResource, error)

func ListPipelines

func ListPipelines(ctx core.ListResourcesContext, resourceType string) ([]core.IntegrationResource, error)

func ListStages added in v0.10.0

func ListStages(ctx core.ListResourcesContext, resourceType string) ([]core.IntegrationResource, error)

Types

type Client

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

func NewClient

func NewClient(httpCtx core.HTTPContext, credentials *aws.Credentials, region string) *Client

func (*Client) GetPipeline added in v0.10.0

func (c *Client) GetPipeline(name string) (*GetPipelineResponseBody, error)

func (*Client) GetPipelineExecution

func (c *Client) GetPipelineExecution(pipelineName, executionID string) (*PipelineExecution, error)

func (*Client) GetPipelineExecutionDetails added in v0.10.0

func (c *Client) GetPipelineExecutionDetails(pipelineName, executionID string) (*GetPipelineExecutionDetailsResponse, error)

func (*Client) ListPipelineExecutionSummaries added in v0.10.0

func (c *Client) ListPipelineExecutionSummaries(pipelineName string) ([]PipelineExecutionSummary, error)

func (*Client) ListPipelines

func (c *Client) ListPipelines() ([]PipelineSummary, error)

func (*Client) RetryStageExecution added in v0.10.0

func (c *Client) RetryStageExecution(pipelineName, stageName, executionID, retryMode string) (*RetryStageExecutionResponse, error)

func (*Client) StartPipelineExecution

func (c *Client) StartPipelineExecution(pipelineName string) (*StartPipelineExecutionResponse, error)

func (*Client) StopPipelineExecution

func (c *Client) StopPipelineExecution(pipelineName, executionID, reason string, abandon bool) error

type ExecutionMetadata

type ExecutionMetadata struct {
	ID     string `json:"id"`
	Status string `json:"status"`
}

type GetPipeline added in v0.10.0

type GetPipeline struct{}

func (*GetPipeline) Actions added in v0.10.0

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

func (*GetPipeline) Cancel added in v0.10.0

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

func (*GetPipeline) Cleanup added in v0.10.0

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

func (*GetPipeline) Color added in v0.10.0

func (c *GetPipeline) Color() string

func (*GetPipeline) Configuration added in v0.10.0

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

func (*GetPipeline) Description added in v0.10.0

func (c *GetPipeline) Description() string

func (*GetPipeline) Documentation added in v0.10.0

func (c *GetPipeline) Documentation() string

func (*GetPipeline) ExampleOutput added in v0.10.0

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

func (*GetPipeline) Execute added in v0.10.0

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

func (*GetPipeline) HandleAction added in v0.10.0

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

func (*GetPipeline) HandleWebhook added in v0.10.0

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

func (*GetPipeline) Icon added in v0.10.0

func (c *GetPipeline) Icon() string

func (*GetPipeline) Label added in v0.10.0

func (c *GetPipeline) Label() string

func (*GetPipeline) Name added in v0.10.0

func (c *GetPipeline) Name() string

func (*GetPipeline) OutputChannels added in v0.10.0

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

func (*GetPipeline) ProcessQueueItem added in v0.10.0

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

func (*GetPipeline) Setup added in v0.10.0

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

type GetPipelineExecution added in v0.10.0

type GetPipelineExecution struct{}

func (*GetPipelineExecution) Actions added in v0.10.0

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

func (*GetPipelineExecution) Cancel added in v0.10.0

func (*GetPipelineExecution) Cleanup added in v0.10.0

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

func (*GetPipelineExecution) Color added in v0.10.0

func (c *GetPipelineExecution) Color() string

func (*GetPipelineExecution) Configuration added in v0.10.0

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

func (*GetPipelineExecution) Description added in v0.10.0

func (c *GetPipelineExecution) Description() string

func (*GetPipelineExecution) Documentation added in v0.10.0

func (c *GetPipelineExecution) Documentation() string

func (*GetPipelineExecution) ExampleOutput added in v0.10.0

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

func (*GetPipelineExecution) Execute added in v0.10.0

func (*GetPipelineExecution) HandleAction added in v0.10.0

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

func (*GetPipelineExecution) HandleWebhook added in v0.10.0

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

func (*GetPipelineExecution) Icon added in v0.10.0

func (c *GetPipelineExecution) Icon() string

func (*GetPipelineExecution) Label added in v0.10.0

func (c *GetPipelineExecution) Label() string

func (*GetPipelineExecution) Name added in v0.10.0

func (c *GetPipelineExecution) Name() string

func (*GetPipelineExecution) OutputChannels added in v0.10.0

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

func (*GetPipelineExecution) ProcessQueueItem added in v0.10.0

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

func (*GetPipelineExecution) Setup added in v0.10.0

type GetPipelineExecutionDetailsResponse added in v0.10.0

type GetPipelineExecutionDetailsResponse struct {
	PipelineExecution map[string]any `json:"pipelineExecution"`
}

type GetPipelineExecutionResponse

type GetPipelineExecutionResponse struct {
	PipelineExecution PipelineExecution `json:"pipelineExecution"`
}

type GetPipelineExecutionSpec added in v0.10.0

type GetPipelineExecutionSpec struct {
	Region    string `json:"region" mapstructure:"region"`
	Pipeline  string `json:"pipeline" mapstructure:"pipeline"`
	Execution string `json:"execution" mapstructure:"execution"`
}

type GetPipelineResponseBody added in v0.10.0

type GetPipelineResponseBody struct {
	Pipeline map[string]any             `json:"pipeline"`
	Metadata PipelineDefinitionMetadata `json:"metadata"`
}

type GetPipelineSpec added in v0.10.0

type GetPipelineSpec struct {
	Region   string `json:"region" mapstructure:"region"`
	Pipeline string `json:"pipeline" mapstructure:"pipeline"`
}

type ListPipelineExecutionsResponse added in v0.10.0

type ListPipelineExecutionsResponse struct {
	PipelineExecutionSummaries []PipelineExecutionSummary `json:"pipelineExecutionSummaries"`
	NextToken                  string                     `json:"nextToken"`
}

type ListPipelinesResponse

type ListPipelinesResponse struct {
	Pipelines []PipelineSummary `json:"pipelines"`
	NextToken string            `json:"nextToken"`
}

type OnPipeline added in v0.10.0

type OnPipeline struct{}

func (*OnPipeline) Actions added in v0.10.0

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

func (*OnPipeline) Cleanup added in v0.10.0

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

func (*OnPipeline) Color added in v0.10.0

func (p *OnPipeline) Color() string

func (*OnPipeline) Configuration added in v0.10.0

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

func (*OnPipeline) Description added in v0.10.0

func (p *OnPipeline) Description() string

func (*OnPipeline) Documentation added in v0.10.0

func (p *OnPipeline) Documentation() string

func (*OnPipeline) ExampleData added in v0.10.0

func (p *OnPipeline) ExampleData() map[string]any

func (*OnPipeline) HandleAction added in v0.10.0

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

func (*OnPipeline) HandleWebhook added in v0.10.0

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

func (*OnPipeline) Icon added in v0.10.0

func (p *OnPipeline) Icon() string

func (*OnPipeline) Label added in v0.10.0

func (p *OnPipeline) Label() string

func (*OnPipeline) Name added in v0.10.0

func (p *OnPipeline) Name() string

func (*OnPipeline) OnIntegrationMessage added in v0.10.0

func (p *OnPipeline) OnIntegrationMessage(ctx core.IntegrationMessageContext) error

func (*OnPipeline) Setup added in v0.10.0

func (p *OnPipeline) Setup(ctx core.TriggerContext) error

type OnPipelineConfiguration added in v0.10.0

type OnPipelineConfiguration struct {
	Region    string                    `json:"region" mapstructure:"region"`
	Pipelines []configuration.Predicate `json:"pipelines" mapstructure:"pipelines"`
	States    []string                  `json:"states" mapstructure:"states"`
}

type OnPipelineMetadata added in v0.10.0

type OnPipelineMetadata struct {
	Region         string `json:"region" mapstructure:"region"`
	SubscriptionID string `json:"subscriptionId" mapstructure:"subscriptionId"`
}

type PipelineDefinitionMetadata added in v0.10.0

type PipelineDefinitionMetadata struct {
	PipelineARN       string           `json:"pipelineArn"`
	Created           common.FloatTime `json:"created"`
	Updated           common.FloatTime `json:"updated"`
	PollingDisabledAt common.FloatTime `json:"pollingDisabledAt,omitempty"`
}

type PipelineExecution

type PipelineExecution struct {
	PipelineExecutionID string `json:"pipelineExecutionId"`
	Status              string `json:"status"`
	PipelineName        string `json:"pipelineName"`
}

type PipelineExecutionSummary added in v0.10.0

type PipelineExecutionSummary struct {
	PipelineExecutionID string `json:"pipelineExecutionId"`
	Status              string `json:"status"`
}

type PipelineMetadata

type PipelineMetadata struct {
	Name string `json:"name"`
}

type PipelineSummary

type PipelineSummary struct {
	Name string `json:"name"`
}

PipelineSummary uses Name as the identifier because AWS ListPipelines does not return ARN in the response.

type RetryStageExecution added in v0.10.0

type RetryStageExecution struct{}

func (*RetryStageExecution) Actions added in v0.10.0

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

func (*RetryStageExecution) Cancel added in v0.10.0

func (*RetryStageExecution) Cleanup added in v0.10.0

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

func (*RetryStageExecution) Color added in v0.10.0

func (c *RetryStageExecution) Color() string

func (*RetryStageExecution) Configuration added in v0.10.0

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

func (*RetryStageExecution) Description added in v0.10.0

func (c *RetryStageExecution) Description() string

func (*RetryStageExecution) Documentation added in v0.10.0

func (c *RetryStageExecution) Documentation() string

func (*RetryStageExecution) ExampleOutput added in v0.10.0

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

func (*RetryStageExecution) Execute added in v0.10.0

func (*RetryStageExecution) HandleAction added in v0.10.0

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

func (*RetryStageExecution) HandleWebhook added in v0.10.0

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

func (*RetryStageExecution) Icon added in v0.10.0

func (c *RetryStageExecution) Icon() string

func (*RetryStageExecution) Label added in v0.10.0

func (c *RetryStageExecution) Label() string

func (*RetryStageExecution) Name added in v0.10.0

func (c *RetryStageExecution) Name() string

func (*RetryStageExecution) OutputChannels added in v0.10.0

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

func (*RetryStageExecution) ProcessQueueItem added in v0.10.0

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

func (*RetryStageExecution) Setup added in v0.10.0

type RetryStageExecutionResponse added in v0.10.0

type RetryStageExecutionResponse struct {
	PipelineExecutionID string `json:"pipelineExecutionId"`
}

type RetryStageExecutionSpec added in v0.10.0

type RetryStageExecutionSpec struct {
	Region            string `json:"region" mapstructure:"region"`
	Pipeline          string `json:"pipeline" mapstructure:"pipeline"`
	Stage             string `json:"stage" mapstructure:"stage"`
	PipelineExecution string `json:"pipelineExecution" mapstructure:"pipelineExecution"`
	RetryMode         string `json:"retryMode" mapstructure:"retryMode"`
}

type RunPipeline

type RunPipeline struct{}

func (*RunPipeline) Actions

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

func (*RunPipeline) Cancel

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

func (*RunPipeline) Cleanup

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

func (*RunPipeline) Color

func (r *RunPipeline) Color() string

func (*RunPipeline) Configuration

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

func (*RunPipeline) Description

func (r *RunPipeline) Description() string

func (*RunPipeline) Documentation

func (r *RunPipeline) Documentation() string

func (*RunPipeline) ExampleOutput

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

func (*RunPipeline) Execute

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

func (*RunPipeline) HandleAction

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

func (*RunPipeline) HandleWebhook

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

func (*RunPipeline) Icon

func (r *RunPipeline) Icon() string

func (*RunPipeline) Label

func (r *RunPipeline) Label() string

func (*RunPipeline) Name

func (r *RunPipeline) Name() string

func (*RunPipeline) OnIntegrationMessage

func (r *RunPipeline) OnIntegrationMessage(ctx core.IntegrationMessageContext) error

OnIntegrationMessage receives EventBridge events routed through the AWS integration's shared /events endpoint. Unlike triggers, where each message starts a new event chain, this component needs to resolve an existing execution that is waiting for pipeline completion.

The flow is:

  1. EventBridge fires a CodePipeline Pipeline Execution State Change event.
  2. The AWS integration receives it and routes it here via the subscription.
  3. We match the event to our pipeline, then look up the waiting execution by the pipeline_execution_id KV set during Execute().
  4. For terminal states (SUCCEEDED/FAILED/CANCELLED), we emit to the appropriate output channel, finishing the execution in near real-time instead of waiting for the next poll cycle.

func (*RunPipeline) OutputChannels

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

func (*RunPipeline) ProcessQueueItem

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

func (*RunPipeline) Setup

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

type RunPipelineExecutionMetadata

type RunPipelineExecutionMetadata struct {
	Pipeline  *PipelineMetadata  `json:"pipeline" mapstructure:"pipeline"`
	Execution *ExecutionMetadata `json:"execution" mapstructure:"execution"`
	Extra     map[string]any     `json:"extra,omitempty" mapstructure:"extra,omitempty"`
}

RunPipelineExecutionMetadata tracks per-execution state.

type RunPipelineNodeMetadata

type RunPipelineNodeMetadata struct {
	Region         string            `json:"region,omitempty" mapstructure:"region,omitempty"`
	Pipeline       *PipelineMetadata `json:"pipeline" mapstructure:"pipeline"`
	SubscriptionID string            `json:"subscriptionId,omitempty" mapstructure:"subscriptionId,omitempty"`
}

RunPipelineNodeMetadata is cached during Setup() to avoid repeated API calls.

type RunPipelineSpec

type RunPipelineSpec struct {
	Region   string `json:"region" mapstructure:"region"`
	Pipeline string `json:"pipeline" mapstructure:"pipeline"`
}

type StartPipelineExecutionResponse

type StartPipelineExecutionResponse struct {
	PipelineExecutionID string `json:"pipelineExecutionId"`
}

Jump to

Keyboard shortcuts

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