Documentation ¶
Index ¶
- Constants
- type AwsConfig
- type BuildDetail
- type DeployDetail
- func (d *DeployDetail) SetCluster(cluster *ecs.Cluster)
- func (d *DeployDetail) SetDone(done bool)
- func (d *DeployDetail) SetRevisionNumber(revisionNumber int)
- func (d *DeployDetail) SetService(service *ecs.Service)
- func (d *DeployDetail) SetTaskDefinition(taskDef *ecs.TaskDefinition)
- func (d *DeployDetail) SetTaskDefinitionFamilyName(TaskDefinitionFamilyName string)
- func (d *DeployDetail) TaskDefinitionFamily() string
- type Deployment
- func (d *Deployment) Services() string
- func (d *Deployment) SetBuildArgs(buildArgs []string)
- func (d *Deployment) SetBuildCacheFrom(cacheFrom []string)
- func (d *Deployment) SetCommitHash(commit string)
- func (d *Deployment) SetConfigBuildArgs(configBuildArgs []string)
- func (d *Deployment) SetDockerfile(dockerfile string)
- func (d *Deployment) SetRepo(repo string)
- func (d *Deployment) TaskDefinitions() string
- type GetLogsInput
- type LogLine
- type Outback
- func (u *Outback) AwaitServicesRunning(deployment *Deployment) chan *DeployDetail
- func (u *Outback) Clusters() ([]string, error)
- func (u *Outback) DeployAll(deploy *Deployment) <-chan error
- func (u *Outback) ECRLogin() error
- func (u *Outback) GetCluster(name string) (*ecs.Cluster, error)
- func (u *Outback) GetImages(t *ecs.TaskDefinition) ([]*ecr.ImageDetail, error)
- func (u *Outback) GetLastDeployedCommit(taskDefinition string) (string, error)
- func (u *Outback) GetLogs(i *GetLogsInput) ([]LogLine, error)
- func (u *Outback) GetRepoFromImage(image *string) string
- func (u *Outback) GetService(c *ecs.Cluster, service string) (*ecs.Service, error)
- func (u *Outback) GetTaskDefinition(c *ecs.Cluster, s *ecs.Service) (*ecs.TaskDefinition, error)
- func (u *Outback) GetTasks(c *ecs.Cluster, tasks []*string) ([]*ecs.Task, error)
- func (u *Outback) IsServiceRunning(detail *DeployDetail) bool
- func (u *Outback) IsTaskRunning(cluster *string, task *string) error
- func (u *Outback) LoginBuildPushImage(info BuildDetail) error
- func (u *Outback) LoginPullImage(repo string, tag string) error
- func (u *Outback) NewDeployDetail() *DeployDetail
- func (u *Outback) RegisterTaskDefinitionWithEnvVars(t *ecs.TaskDefinition) (*ecs.TaskDefinition, error)
- func (u *Outback) RegisterTaskDefinitionWithImage(c *ecs.Cluster, s *ecs.Service, repo string, tag string) (*ecs.TaskDefinition, error)
- func (u *Outback) RollbackAll(deploy *Deployment, deployDetail *DeployDetail) <-chan error
- func (u *Outback) RollbackService(c *ecs.Cluster, s *ecs.Service, t string) (*ecs.UpdateServiceOutput, error)
- func (u *Outback) RollbackTaskDefinition(c *ecs.Cluster, s *ecs.Service, t *ecs.TaskDefinition, n int) (string, error)
- func (u *Outback) RunTask(c *ecs.Cluster, t *ecs.TaskDefinition, cmd string) (*ecs.RunTaskOutput, error)
- func (u *Outback) RunningTasks(c *ecs.Cluster, s *ecs.Service) ([]*string, error)
- func (u *Outback) Services(c *ecs.Cluster) ([]string, error)
- func (u *Outback) UpdateContainerDefinitionEnvVars(t ecs.TaskDefinition, updates []*ecs.KeyValuePair, repo string) ecs.TaskDefinition
- func (u *Outback) UpdateService(c *ecs.Cluster, s *ecs.Service, t *ecs.TaskDefinition) (*ecs.UpdateServiceOutput, error)
- func (u *Outback) UpdateServiceWithNewTaskDefinition(c *ecs.Cluster, s *ecs.Service, repo string, tag string) (*ecs.TaskDefinition, error)
- func (u *Outback) UpdateTaskDefinitionImage(t ecs.TaskDefinition, repo string, tag string) ecs.TaskDefinition
Constants ¶
const DEPLOY_SHA_ENV_VAR = "OUTBACK_DEPLOY_GIT_SHA"
const DEPLOY_TIME_ENV_VAR = "OUTBACK_DEPLOY_TIME"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuildDetail ¶
type DeployDetail ¶
type DeployDetail struct { Cluster *ecs.Cluster Service *ecs.Service TaskDefinition *ecs.TaskDefinition TaskDefinitionFamilyName string RevisionNumber int Done bool }
func (*DeployDetail) SetCluster ¶
func (d *DeployDetail) SetCluster(cluster *ecs.Cluster)
func (*DeployDetail) SetDone ¶
func (d *DeployDetail) SetDone(done bool)
func (*DeployDetail) SetRevisionNumber ¶
func (d *DeployDetail) SetRevisionNumber(revisionNumber int)
func (*DeployDetail) SetService ¶
func (d *DeployDetail) SetService(service *ecs.Service)
func (*DeployDetail) SetTaskDefinition ¶
func (d *DeployDetail) SetTaskDefinition(taskDef *ecs.TaskDefinition)
func (*DeployDetail) SetTaskDefinitionFamilyName ¶
func (d *DeployDetail) SetTaskDefinitionFamilyName(TaskDefinitionFamilyName string)
func (*DeployDetail) TaskDefinitionFamily ¶
func (d *DeployDetail) TaskDefinitionFamily() string
type Deployment ¶
type Deployment struct { DeployDetails []*DeployDetail BuildDetail BuildDetail Err error }
func (*Deployment) Services ¶
func (d *Deployment) Services() string
func (*Deployment) SetBuildArgs ¶
func (d *Deployment) SetBuildArgs(buildArgs []string)
func (*Deployment) SetBuildCacheFrom ¶
func (d *Deployment) SetBuildCacheFrom(cacheFrom []string)
func (*Deployment) SetCommitHash ¶
func (d *Deployment) SetCommitHash(commit string)
func (*Deployment) SetConfigBuildArgs ¶
func (d *Deployment) SetConfigBuildArgs(configBuildArgs []string)
func (*Deployment) SetDockerfile ¶
func (d *Deployment) SetDockerfile(dockerfile string)
func (*Deployment) SetRepo ¶
func (d *Deployment) SetRepo(repo string)
func (*Deployment) TaskDefinitions ¶
func (d *Deployment) TaskDefinitions() string
type GetLogsInput ¶
type Outback ¶
type Outback struct { Config *AwsConfig ECS ecsiface.ECSAPI ECR ecriface.ECRAPI CWL cloudwatchlogsiface.CloudWatchLogsAPI }
func (*Outback) AwaitServicesRunning ¶
func (u *Outback) AwaitServicesRunning(deployment *Deployment) chan *DeployDetail
func (*Outback) DeployAll ¶
func (u *Outback) DeployAll(deploy *Deployment) <-chan error
func (*Outback) GetCluster ¶
GetCluster returns a clusters detail
func (*Outback) GetImages ¶
func (u *Outback) GetImages(t *ecs.TaskDefinition) ([]*ecr.ImageDetail, error)
GetImages gets images for a task definition @todo how does this handle multiple images in a task def?
func (*Outback) GetLastDeployedCommit ¶
GetLastDeployedCommit finds the most recent committed image for a taskDefinition
func (*Outback) GetRepoFromImage ¶
GetRepoFromImage parses an image URL:tag and reads its repo
func (*Outback) GetService ¶
GetService returns service details within a cluster by service name or ARN
func (*Outback) GetTaskDefinition ¶
GetTaskDefinition returns details of a task definition in a cluster and service by service's current task definition
func (*Outback) IsServiceRunning ¶
func (u *Outback) IsServiceRunning(detail *DeployDetail) bool
IsServiceRunning is meant to be called after a service update. This function checks if the newly started task has the status "RUNNING"
func (*Outback) IsTaskRunning ¶
func (*Outback) LoginBuildPushImage ¶
func (u *Outback) LoginBuildPushImage(info BuildDetail) error
func (*Outback) NewDeployDetail ¶
func (u *Outback) NewDeployDetail() *DeployDetail
func (*Outback) RegisterTaskDefinitionWithEnvVars ¶
func (u *Outback) RegisterTaskDefinitionWithEnvVars(t *ecs.TaskDefinition) (*ecs.TaskDefinition, error)
RegisterTaskDefinitionWithEnvVars takes a task definition as an argument and updates its ContainerDefinitions field which contains environment variables
func (*Outback) RegisterTaskDefinitionWithImage ¶
func (u *Outback) RegisterTaskDefinitionWithImage(c *ecs.Cluster, s *ecs.Service, repo string, tag string) (*ecs.TaskDefinition, error)
RegisterTaskDefinitionWithImage creates a new task definition with the provided tag This copies an existing task definition and only changes the tag used for the image
func (*Outback) RollbackAll ¶
func (u *Outback) RollbackAll(deploy *Deployment, deployDetail *DeployDetail) <-chan error
func (*Outback) RollbackService ¶
func (u *Outback) RollbackService(c *ecs.Cluster, s *ecs.Service, t string) (*ecs.UpdateServiceOutput, error)
RollbackService updates the ECS service with the desired rollback revision
func (*Outback) RollbackTaskDefinition ¶
func (u *Outback) RollbackTaskDefinition(c *ecs.Cluster, s *ecs.Service, t *ecs.TaskDefinition, n int) (string, error)
RollbackTaskDefinition updates the task definition to the desired revision number
func (*Outback) RunTask ¶
func (u *Outback) RunTask(c *ecs.Cluster, t *ecs.TaskDefinition, cmd string) (*ecs.RunTaskOutput, error)
RunTask runs a specified task in a cluster
func (*Outback) RunningTasks ¶
RunningTasks gets all running tasks in a cluster and service
func (*Outback) UpdateContainerDefinitionEnvVars ¶
func (u *Outback) UpdateContainerDefinitionEnvVars(t ecs.TaskDefinition, updates []*ecs.KeyValuePair, repo string) ecs.TaskDefinition
UpdateContainerDefinitionEnvVars copies a task definition and updates the container definition environment
func (*Outback) UpdateService ¶
func (u *Outback) UpdateService(c *ecs.Cluster, s *ecs.Service, t *ecs.TaskDefinition) (*ecs.UpdateServiceOutput, error)
UpdateService updates a service in a cluster with a new task definition
func (*Outback) UpdateServiceWithNewTaskDefinition ¶
func (u *Outback) UpdateServiceWithNewTaskDefinition(c *ecs.Cluster, s *ecs.Service, repo string, tag string) (*ecs.TaskDefinition, error)
UpdateServiceWithNewTaskDefinition registers a task definition with a tag and updates a service with the newly registered task definition
func (*Outback) UpdateTaskDefinitionImage ¶
func (u *Outback) UpdateTaskDefinitionImage(t ecs.TaskDefinition, repo string, tag string) ecs.TaskDefinition
UpdateTaskDefinitionImage copies a task definition and updates its image tag