ecs_deploy 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 46cd3a758a49e3e59654736306345305eda8ce4f
4
- data.tar.gz: 659a92ed959768227f9522fa5b895cd8edbcb60c
3
+ metadata.gz: 6f73db4d410c3327f1df2cf645d62e9be95c2995
4
+ data.tar.gz: 8f0296f5046ffa43bd5e6f3a2ec1ab98cdbb2dfd
5
5
  SHA512:
6
- metadata.gz: d5f8c2d1309768c3791ca060a3f9723cc40e0940f4a3909f26287ccfc343698ad909a02c80eaae911756289f3090a7d8719fd89cd0938aa2e3cb98ba2628c8d4
7
- data.tar.gz: a944923cdfa09b775d1943c91978ebe3d3f7fe4509a2a8fe5ba16c87af7030a3845ca397d5c465e2a26583f09f7e5547cf9a0f3aff9fd418d4ff84ddded6902d
6
+ metadata.gz: a08753cf01846ea1f82c0532a44df97b13f4a338ac3c6e0baf1c0973345981a5ef6f85a5f4e7d3782840dc842ba722f33a9a50d4856a47f76bce55daccd4f28c
7
+ data.tar.gz: 78580a080cf36d910405bd0a46a4ce5c301951a4b004b38f4e16b3e0b6af4727e68644d9061050d190cb6abf32af63c9d4e9600eff0c87a011b8bde8ae97b2ca
data/README.md CHANGED
@@ -188,6 +188,8 @@ services:
188
188
  step: 1
189
189
  idle_time: 240
190
190
  max_task_count: [10, 25]
191
+ scheduled_min_task_count:
192
+ - {from: "1:45", to: "4:30", count: 8}
191
193
  cooldown_time_for_reach_max: 600
192
194
  min_task_count: 0
193
195
  upscale_triggers:
@@ -78,6 +78,8 @@ namespace :ecs do
78
78
  if fetch(:ecs_services)
79
79
  regions = Array(fetch(:ecs_region))
80
80
  regions = [nil] if regions.empty?
81
+
82
+ rollback_routes = {}
81
83
  regions.each do |r|
82
84
  services = fetch(:ecs_services).map do |service|
83
85
  if fetch(:target_cluster) && fetch(:target_cluster).size > 0
@@ -100,11 +102,15 @@ namespace :ecs do
100
102
  service_name: service[:name],
101
103
  ).current_task_definition_arn
102
104
 
103
- current_arn_index = task_definition_arns.index do |arn|
104
- arn == current_task_definition_arn
105
- end
105
+ unless (rollback_arn = rollback_routes[current_task_definition_arn])
106
+ current_arn_index = task_definition_arns.index do |arn|
107
+ arn == current_task_definition_arn
108
+ end
106
109
 
107
- rollback_arn = task_definition_arns[current_arn_index + rollback_step]
110
+ rollback_arn = task_definition_arns[current_arn_index + rollback_step]
111
+
112
+ rollback_routes[current_task_definition_arn] = rollback_arn
113
+ end
108
114
 
109
115
  EcsDeploy.logger.info "#{current_task_definition_arn} -> #{rollback_arn}"
110
116
 
@@ -1,3 +1,3 @@
1
1
  module EcsDeploy
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ecs_deploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - joker1007
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-07-03 00:00:00.000000000 Z
11
+ date: 2016-07-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk