ecs_deployer 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/example/sample.rb +1 -1
- data/lib/ecs_deployer/client.rb +14 -15
- data/lib/ecs_deployer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63e2ad46f9cab7f78fddf9952e32b456f798d039
|
4
|
+
data.tar.gz: 89501da0f01b0ef5a60314771142a18df880cde2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c7628b60938925607c4088061bef7e01b463080271e39b1cc443769860ee12393ff03d0208911d4a8c07940a3a03d528524f13bc02add8aea81463139cbad8a
|
7
|
+
data.tar.gz: e63fa09d2794e0d25fda1e3c1b9ed0a6ab5ba33204a22eb1cea65949193cdd3797ea5f4310a2b38a2d40366ebb2dc74fe3ea399a91583fab40d7985624a76104
|
data/example/sample.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'bundler/setup'
|
2
2
|
require 'ecs_deployer'
|
3
3
|
|
4
|
-
task_path = File.expand_path('./fixtures/
|
4
|
+
task_path = File.expand_path('./fixtures/task.yml', File.dirname(File.realpath(__FILE__)))
|
5
5
|
|
6
6
|
ecs_deployer = EcsDeployer::Client.new('sandbox-ecs-production')
|
7
7
|
ecs_deployer.register_task(task_path)
|
data/lib/ecs_deployer/client.rb
CHANGED
@@ -23,7 +23,20 @@ module EcsDeployer
|
|
23
23
|
# @return [String]
|
24
24
|
def register_task(task_path)
|
25
25
|
raise IOError.new("File does not exist. [#{task_path}]") if !File.exist?(task_path)
|
26
|
-
|
26
|
+
register_task_hash(YAML.load(File.read(task_path)))
|
27
|
+
end
|
28
|
+
|
29
|
+
# @param [Hash] task_hash
|
30
|
+
# @return [String]
|
31
|
+
def register_task_hash(task_hash)
|
32
|
+
result = @ecs_command.register_task_definition(
|
33
|
+
task_hash['family'],
|
34
|
+
task_hash['containerDefinitions']
|
35
|
+
)
|
36
|
+
|
37
|
+
@family_name = result['taskDefinition']['family']
|
38
|
+
@revision = result['taskDefinition']['revision']
|
39
|
+
@new_task_definition_arn = result['taskDefinition']['taskDefinitionArn']
|
27
40
|
end
|
28
41
|
|
29
42
|
# @param [String] service_name
|
@@ -115,19 +128,5 @@ module EcsDeployer
|
|
115
128
|
|
116
129
|
raise ServiceNotFoundError.new("'#{service_name}' service is not found.") unless detected_service
|
117
130
|
end
|
118
|
-
|
119
|
-
# @param [Hash] task_definition
|
120
|
-
# @return [String]
|
121
|
-
def register_task_process(task_definition)
|
122
|
-
result = @ecs_command.register_task_definition(
|
123
|
-
task_definition['family'],
|
124
|
-
task_definition['containerDefinitions']
|
125
|
-
)
|
126
|
-
|
127
|
-
@family_name = result['taskDefinition']['family']
|
128
|
-
@revision = result['taskDefinition']['revision']
|
129
|
-
@new_task_definition_arn = result['taskDefinition']['taskDefinitionArn']
|
130
|
-
end
|
131
131
|
end
|
132
|
-
|
133
132
|
end
|
data/lib/ecs_deployer/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ecs_deployer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- naomichi-y
|
@@ -122,7 +122,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
122
122
|
version: '0'
|
123
123
|
requirements: []
|
124
124
|
rubyforge_project:
|
125
|
-
rubygems_version: 2.
|
125
|
+
rubygems_version: 2.5.1
|
126
126
|
signing_key:
|
127
127
|
specification_version: 4
|
128
128
|
summary: Deploy application to ECS.
|