Documentation
¶
Index ¶
- Constants
- func ListPipelines(ctx core.ListResourcesContext, resourceType string) ([]core.IntegrationResource, error)
- type Client
- func (c *Client) GetPipelineExecution(pipelineName, executionID string) (*PipelineExecution, error)
- func (c *Client) ListPipelines() ([]PipelineSummary, error)
- func (c *Client) StartPipelineExecution(pipelineName string) (*StartPipelineExecutionResponse, error)
- func (c *Client) StopPipelineExecution(pipelineName, executionID, reason string, abandon bool) error
- type ExecutionMetadata
- type GetPipelineExecutionResponse
- type ListPipelinesResponse
- type PipelineExecution
- type PipelineMetadata
- type PipelineSummary
- type RunPipeline
- func (r *RunPipeline) Actions() []core.Action
- func (r *RunPipeline) Cancel(ctx core.ExecutionContext) error
- func (r *RunPipeline) Cleanup(ctx core.SetupContext) error
- func (r *RunPipeline) Color() string
- func (r *RunPipeline) Configuration() []configuration.Field
- func (r *RunPipeline) Description() string
- func (r *RunPipeline) Documentation() string
- func (r *RunPipeline) ExampleOutput() map[string]any
- func (r *RunPipeline) Execute(ctx core.ExecutionContext) error
- func (r *RunPipeline) HandleAction(ctx core.ActionContext) error
- func (r *RunPipeline) HandleWebhook(ctx core.WebhookRequestContext) (int, error)
- func (r *RunPipeline) Icon() string
- func (r *RunPipeline) Label() string
- func (r *RunPipeline) Name() string
- func (r *RunPipeline) OnIntegrationMessage(ctx core.IntegrationMessageContext) error
- func (r *RunPipeline) OutputChannels(configuration any) []core.OutputChannel
- func (r *RunPipeline) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
- func (r *RunPipeline) Setup(ctx core.SetupContext) error
- type RunPipelineExecutionMetadata
- type RunPipelineNodeMetadata
- type RunPipelineSpec
- type StartPipelineExecutionResponse
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)
type ExecutionMetadata ¶
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 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:
- EventBridge fires a CodePipeline Pipeline Execution State Change event.
- The AWS integration receives it and routes it here via the subscription.
- We match the event to our pipeline, then look up the waiting execution by the pipeline_execution_id KV set during Execute().
- 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 StartPipelineExecutionResponse ¶
type StartPipelineExecutionResponse struct {
PipelineExecutionID string `json:"pipelineExecutionId"`
}
Click to show internal directories.
Click to hide internal directories.