Skip to content

Commit

Permalink
ecs-deploy: Add --update-task-definition-only
Browse files Browse the repository at this point in the history
  • Loading branch information
hamstah committed Sep 18, 2023
1 parent e0b4e40 commit fd58910
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions ecs/deploy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@ import (
)

var (
taskName = kingpin.Flag("task-name", "ECS task name").String()
cluster = kingpin.Flag("cluster", "ECS cluster").Required().String()
services = kingpin.Flag("service", "ECS services").Required().Strings()
images = kingpin.Flag("image", "Change the images to the new ones. Format is container_name=image. Can be repeated.").StringMap()
timeout = kingpin.Flag("timeout", "Timeout when waiting for services to update").Default("300s").Duration()
taskJSON = kingpin.Flag("task-json", "Path to a JSON file with the task definition to use").String()
taskVariables = kingpin.Flag("task-variables", "Variables to be replaced in the task definition").StringMap()
overwriteAccountIDs = kingpin.Flag("overwrite-account-ids", "Overwrite account IDs in role ARN with the caller account ID").Default("false").Bool()
taskName = kingpin.Flag("task-name", "ECS task name").String()
cluster = kingpin.Flag("cluster", "ECS cluster").Required().String()
services = kingpin.Flag("service", "ECS services").Strings()
images = kingpin.Flag("image", "Change the images to the new ones. Format is container_name=image. Can be repeated.").StringMap()
timeout = kingpin.Flag("timeout", "Timeout when waiting for services to update").Default("300s").Duration()
taskJSON = kingpin.Flag("task-json", "Path to a JSON file with the task definition to use").String()
taskVariables = kingpin.Flag("task-variables", "Variables to be replaced in the task definition").StringMap()
overwriteAccountIDs = kingpin.Flag("overwrite-account-ids", "Overwrite account IDs in role ARN with the caller account ID").Default("false").Bool()
updateTaskDefinitionOnly = kingpin.Flag("update-task-definition-only", "Only update the task definition").Default("false").Bool()
)

func main() {
Expand Down Expand Up @@ -85,6 +86,9 @@ func main() {
common.FatalOnError(err)

fmt.Println(*newTaskDefinition.TaskDefinitionArn)
if *updateTaskDefinitionOnly {
return
}

pending := 0
for _, service := range *services {
Expand Down

0 comments on commit fd58910

Please sign in to comment.