codepipeline

package
v1.33.3 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package codepipeline provides a client to make API requests to Amazon Elastic Container Service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CodePipeline

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

CodePipeline wraps the AWS CodePipeline client.

func New

func New(s *session.Session) *CodePipeline

New returns a CodePipeline client configured against the input session.

func (*CodePipeline) GetPipeline

func (c *CodePipeline) GetPipeline(name string) (*Pipeline, error)

GetPipeline retrieves information from a given pipeline.

func (*CodePipeline) GetPipelineState

func (c *CodePipeline) GetPipelineState(name string) (*PipelineState, error)

GetPipelineState retrieves status information from a given pipeline.

func (*CodePipeline) RetryStageExecution added in v1.3.0

func (c *CodePipeline) RetryStageExecution(pipelineName, stageName string) error

RetryStageExecution tries to re-initiate a failed stage for the given pipeline.

type Pipeline

type Pipeline struct {
	// Name is the resource name of the pipeline in CodePipeline, e.g. myapp-mypipeline-RANDOMSTRING.
	Name      string    `json:"pipelineName"`
	Region    string    `json:"region"`
	AccountID string    `json:"accountId"`
	Stages    []*Stage  `json:"stages"`
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
}

Pipeline represents an existing CodePipeline resource.

type PipelineState

type PipelineState struct {
	PipelineName string        `json:"pipelineName"`
	StageStates  []*StageState `json:"stageStates"`
	UpdatedAt    time.Time     `json:"updatedAt"`
}

PipelineState represents a Pipeline's status.

type Stage

type Stage struct {
	Name     string `json:"name"`
	Category string `json:"category"`
	Provider string `json:"provider"`
	Details  string `json:"details"`
}

Stage wraps the codepipeline pipeline stage.

func (*Stage) HumanString

func (s *Stage) HumanString() string

HumanString returns the stringified Stage struct with human readable format. Example output:

DeployTo-test	Deploy	Cloudformation	stackname: dinder-test-test

type StageAction

type StageAction struct {
	Name   string `json:"name"`
	Status string `json:"status"`
}

StageAction wraps a CodePipeline stage action.

type StageState

type StageState struct {
	StageName  string        `json:"stageName"`
	Actions    []StageAction `json:"actions,omitempty"`
	Transition string        `json:"transition"`
}

StageState wraps a CodePipeline stage state.

func (StageState) AggregateStatus

func (ss StageState) AggregateStatus() string

AggregateStatus returns the collective status of a stage by looking at each individual action's status. It returns "InProgress" if there are any actions that are in progress. It returns "Failed" if there are actions that failed or were abandoned. It returns "Succeeded" if all actions succeeded. It returns "" if there is no prior execution.

func (*StageState) HumanString

func (ss *StageState) HumanString() string

HumanString returns the stringified PipelineState struct with human readable format. Example output:

DeployTo-test	Deploy	Cloudformation	stackname: dinder-test-test

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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