diff --git a/bin/blue_green_switch b/bin/blue_green_switch index 36b2f89..781b9ef 100755 --- a/bin/blue_green_switch +++ b/bin/blue_green_switch @@ -6,6 +6,7 @@ REGION = "us-west-2".freeze tg_name = ARGV[0] color = ARGV[1] color_port = ARGV[2] +targets_list = ARGV[3] if color_port.nil? fail "Cannot detect current color_port. Color_port not passed in cli?" @@ -28,8 +29,15 @@ targets = AWSClient.elbv2.describe_target_health(target_group_arn: tg.target_gro .target_health_descriptions.map(&:target) targets_port = targets.map(&:port).uniq.first +if targets_list.nil? + targets_ids = targets.map(&:id) +else + targets_ids = targets_list.split(",") +end + new_targets = [] -targets.map(&:id).each do |i| + +targets_ids.each do |i| new_targets << { id: i, diff --git a/deploy-tools.gemspec b/deploy-tools.gemspec index f0ebfc4..2eb97e3 100644 --- a/deploy-tools.gemspec +++ b/deploy-tools.gemspec @@ -1,7 +1,7 @@ Gem::Specification.new do |s| s.name = 'deploy-tools' - s.version = '0.1.1' - s.date = '2022-02-01' + s.version = '0.1.2' + s.date = '2022-06-28' s.summary = "Deploy tools" s.description = "A set of script used for deployment" s.authors = ["Tony Nyurkin", "Serhii Voronoi"]