Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 3.0.7
- `--tag` option for `bootstrap` also was named `--optional` (whoops)

# 3.0.6
- `--tag` option is optional while bootstrapping if you already have a configured `task_definition`

Expand Down
2 changes: 1 addition & 1 deletion lib/broadside/ecs/ecs_deploy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def bootstrap
info "Task definition for #{family} already exists."
else
raise ConfigurationError, "No :task_definition_config for #{family}" unless @target.task_definition_config
raise ConfigurationError, 'Bootstrapping a task_definition requires a --tag option' unless @target.tag
raise ConfigurationError, 'Bootstrapping a task_definition requires a :tag for the image' unless @target.tag
info "Creating an initial task definition for '#{family}' from the config..."

EcsManager.ecs.register_task_definition(
Expand Down
20 changes: 9 additions & 11 deletions lib/broadside/gli/commands.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@ def add_command_flags(cmd)
add_target_flag(cmd)
end

def add_deploy_flags(cmd)
add_tag_flag(cmd)
add_target_flag(cmd)
end

desc 'Bootstrap your service and task definition from the configured definition.'
command :bootstrap do |bootstrap|
bootstrap.desc 'Optionally configured tag - without it you cannot bootstrap a task_definition'
bootstrap.arg_name 'TAG'
bootstrap.flag 'tag', :optional

add_target_flag(bootstrap)
add_deploy_flags(bootstrap)

bootstrap.action do |_, options, _|
Broadside::EcsDeploy.new(options).bootstrap
Expand Down Expand Up @@ -60,8 +61,7 @@ def add_command_flags(cmd)
run.arg_name 'COMMAND'
run.flag [:command], type: Array

add_tag_flag(run)
add_target_flag(run)
add_deploy_flags(run)

run.action do |_, options, _|
EcsDeploy.new(options).run_commands([options[:command]], started_by: 'run')
Expand Down Expand Up @@ -104,8 +104,7 @@ def add_command_flags(cmd)
command :deploy do |d|
d.desc 'Deploys WITHOUT running predeploy commands'
d.command :short do |short|
add_tag_flag(short)
add_target_flag(short)
add_deploy_flags(short)

short.action do |_, options, _|
Broadside::EcsDeploy.new(options).short
Expand All @@ -114,8 +113,7 @@ def add_command_flags(cmd)

d.desc 'Deploys WITH running predeploy commands'
d.command :full do |full|
add_tag_flag(full)
add_target_flag(full)
add_deploy_flags(full)

full.action do |_, options, _|
Broadside::EcsDeploy.new(options).full
Expand Down
2 changes: 1 addition & 1 deletion lib/broadside/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Broadside
VERSION = '3.0.6'.freeze
VERSION = '3.0.7'.freeze
end