Documentation ¶
Index ¶
- 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) 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 UFO
- func (u *UFO) AwaitServicesRunning(deployment *Deployment) chan *DeployDetail
- func (u *UFO) Clusters() ([]string, error)
- func (u *UFO) DeployAll(deploy *Deployment) <-chan error
- func (u *UFO) ECRLogin() error
- func (u *UFO) GetCluster(name string) (*ecs.Cluster, error)
- func (u *UFO) GetImages(t *ecs.TaskDefinition) ([]*ecr.ImageDetail, error)
- func (u *UFO) GetLastDeployedCommit(taskDefinition string) (string, error)
- func (u *UFO) GetLogs(i *GetLogsInput) ([]LogLine, error)
- func (u *UFO) GetRepoFromImage(image *string) string
- func (u *UFO) GetService(c *ecs.Cluster, service string) (*ecs.Service, error)
- func (u *UFO) GetTaskDefinition(c *ecs.Cluster, s *ecs.Service) (*ecs.TaskDefinition, error)
- func (u *UFO) GetTasks(c *ecs.Cluster, tasks []*string) ([]*ecs.Task, error)
- func (u *UFO) IsServiceRunning(detail *DeployDetail) bool
- func (u *UFO) IsTaskRunning(cluster *string, task *string) error
- func (u *UFO) LoginBuildPushImage(info BuildDetail) error
- func (u *UFO) NewDeployDetail() *DeployDetail
- func (u *UFO) RegisterTaskDefinitionWithEnvVars(t *ecs.TaskDefinition) (*ecs.TaskDefinition, error)
- func (u *UFO) RegisterTaskDefinitionWithImage(c *ecs.Cluster, s *ecs.Service, tag string) (*ecs.TaskDefinition, error)
- func (u *UFO) RollbackAll(deploy *Deployment, deployDetail *DeployDetail) <-chan error
- func (u *UFO) RollbackService(c *ecs.Cluster, s *ecs.Service, t string) (*ecs.UpdateServiceOutput, error)
- func (u *UFO) RollbackTaskDefinition(c *ecs.Cluster, s *ecs.Service, t *ecs.TaskDefinition, n int) (string, error)
- func (u *UFO) RunTask(c *ecs.Cluster, t *ecs.TaskDefinition, cmd string) (*ecs.RunTaskOutput, error)
- func (u *UFO) RunningTasks(c *ecs.Cluster, s *ecs.Service) ([]*string, error)
- func (u *UFO) Services(c *ecs.Cluster) ([]string, error)
- func (u *UFO) UpdateService(c *ecs.Cluster, s *ecs.Service, t *ecs.TaskDefinition) (*ecs.UpdateServiceOutput, error)
- func (u *UFO) UpdateServiceWithNewTaskDefinition(c *ecs.Cluster, s *ecs.Service, tag string) (*ecs.TaskDefinition, error)
- func (u *UFO) UpdateTaskDefinitionImage(t ecs.TaskDefinition, tag string) ecs.TaskDefinition
Constants ¶
This section is empty.
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) 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 UFO ¶
type UFO struct { Config *AwsConfig ECS ecsiface.ECSAPI ECR ecriface.ECRAPI CWL cloudwatchlogsiface.CloudWatchLogsAPI }
func (*UFO) AwaitServicesRunning ¶
func (u *UFO) AwaitServicesRunning(deployment *Deployment) chan *DeployDetail
func (*UFO) DeployAll ¶
func (u *UFO) DeployAll(deploy *Deployment) <-chan error
func (*UFO) GetCluster ¶
GetCluster returns a clusters detail
func (*UFO) GetImages ¶
func (u *UFO) 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 (*UFO) GetLastDeployedCommit ¶
GetLastDeployedCommit finds the most recent committed image for a taskDefinition
func (*UFO) GetRepoFromImage ¶
GetRepoFromImage parses an image URL:tag and reads its repo
func (*UFO) GetService ¶
GetService returns service details within a cluster by service name or ARN
func (*UFO) GetTaskDefinition ¶
GetTaskDefinition returns details of a task definition in a cluster and service by service's current task definition
func (*UFO) IsServiceRunning ¶
func (u *UFO) 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 (*UFO) LoginBuildPushImage ¶
func (u *UFO) LoginBuildPushImage(info BuildDetail) error
func (*UFO) NewDeployDetail ¶
func (u *UFO) NewDeployDetail() *DeployDetail
func (*UFO) RegisterTaskDefinitionWithEnvVars ¶
func (u *UFO) 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 (*UFO) RegisterTaskDefinitionWithImage ¶
func (u *UFO) RegisterTaskDefinitionWithImage(c *ecs.Cluster, s *ecs.Service, 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 (*UFO) RollbackAll ¶
func (u *UFO) RollbackAll(deploy *Deployment, deployDetail *DeployDetail) <-chan error
func (*UFO) RollbackService ¶
func (u *UFO) RollbackService(c *ecs.Cluster, s *ecs.Service, t string) (*ecs.UpdateServiceOutput, error)
RollbackService updates the ECS service with the desired rollback revision
func (*UFO) RollbackTaskDefinition ¶
func (u *UFO) 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 (*UFO) RunTask ¶
func (u *UFO) RunTask(c *ecs.Cluster, t *ecs.TaskDefinition, cmd string) (*ecs.RunTaskOutput, error)
RunTask runs a specified task in a cluster
func (*UFO) RunningTasks ¶
RunningTasks gets all running tasks in a cluster and service
func (*UFO) UpdateService ¶
func (u *UFO) 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 (*UFO) UpdateServiceWithNewTaskDefinition ¶
func (u *UFO) UpdateServiceWithNewTaskDefinition(c *ecs.Cluster, s *ecs.Service, tag string) (*ecs.TaskDefinition, error)
UpdateServiceWithNewTaskDefinition registers a task definition with a tag and updates a service with the newly registered task definition
func (*UFO) UpdateTaskDefinitionImage ¶
func (u *UFO) UpdateTaskDefinitionImage(t ecs.TaskDefinition, tag string) ecs.TaskDefinition
UpdateTaskDefinitionImage copies a task definition and update its image tag