codepipeline

package
v0.9.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

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

This section is empty.

Functions

func ListPipelines

func ListPipelines(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) GetPipelineExecution

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

func (*Client) ListPipelines

func (c *Client) ListPipelines() ([]PipelineSummary, 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 GetPipelineExecutionResponse

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

type ListPipelinesResponse

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

type PipelineExecution

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

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 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