ecs_compose 0.1.0.pre15 → 0.1.0.pre16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/ecs-compose +6 -1
- data/lib/ecs_compose/ecs.rb +4 -1
- data/lib/ecs_compose/task_definition.rb +2 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c3e4f3ccc99a0058063dd94efb2b1567baa4b6c
|
4
|
+
data.tar.gz: c20b758d78610e4108790dd58e5d30957d1e21b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4caf0247d2a2b03380dd80ccffc0bcf71ef9807d5ba4ffcdd6026749c4e5e8b52c43608e335ec11651c259396495acbb5c7ede70d1047a00fc5b4acc5181ece2
|
7
|
+
data.tar.gz: 8d78cada8a34a01db18499b71d9ea5bf02a031ac4120db3989d9252b711341e6d168540403226928b6293172be2401e239d36f106782c1ac1bf306cdcfdabb81
|
data/exe/ecs-compose
CHANGED
@@ -11,7 +11,7 @@ Usage:
|
|
11
11
|
ecs-compose --version
|
12
12
|
ecs-compose [options] register [<task_def>...]
|
13
13
|
ecs-compose [options] up [<service>...]
|
14
|
-
ecs-compose [options] run [-e <name>=<value>]... [--entrypoint <entrypoint>] <task> [-- [<arg>...]]
|
14
|
+
ecs-compose [options] run [-e <name>=<value>]... [--entrypoint <entrypoint>] [--started-by <started-by>] <task> [-- [<arg>...]]
|
15
15
|
ecs-compose [options] scale (all=<n> | <service>=<m>)...
|
16
16
|
ecs-compose [options] json [<task_def>]
|
17
17
|
|
@@ -31,6 +31,9 @@ Options:
|
|
31
31
|
--entrypoint <entrypoint>
|
32
32
|
Override the container's regular entrypoint (NOT CURRENTLY
|
33
33
|
SUPPORTED BY ECS)
|
34
|
+
--started-by <started-by>
|
35
|
+
Indicate who started an ECS task, for display on the AWS
|
36
|
+
console and elsewhere
|
34
37
|
|
35
38
|
Commands:
|
36
39
|
register Registers the specified ECS task definitions (defaults to all)
|
@@ -110,7 +113,9 @@ class App
|
|
110
113
|
command = options.fetch('<arg>')
|
111
114
|
command = nil if command.empty?
|
112
115
|
|
116
|
+
# The flatten[0] works around a strange docopt.rb bug.
|
113
117
|
arn = task.run(cluster,
|
118
|
+
started_by: options.fetch('--started-by').flatten[0],
|
114
119
|
environment: env,
|
115
120
|
entrypoint: options.fetch('--entrypoint').flatten[0],
|
116
121
|
command: command)
|
data/lib/ecs_compose/ecs.rb
CHANGED
@@ -64,9 +64,12 @@ module EcsCompose
|
|
64
64
|
|
65
65
|
# Run a one-off task. Sample args: `"migrator:1"`. The overrides may
|
66
66
|
# be specified in the JSON format used by `aws ecs run-task`.
|
67
|
-
def self.run_task(cluster, task_definition,
|
67
|
+
def self.run_task(cluster, task_definition,
|
68
|
+
started_by: nil,
|
69
|
+
overrides_json: nil)
|
68
70
|
extra_args = []
|
69
71
|
extra_args.concat(["--overrides", overrides_json]) if overrides_json
|
72
|
+
extra_args.concat(["--started-by", started_by]) if started_by
|
70
73
|
run("run-task",
|
71
74
|
"--cluster", cluster,
|
72
75
|
"--task-definition", task_definition,
|
@@ -52,9 +52,10 @@ module EcsCompose
|
|
52
52
|
|
53
53
|
# Run this task definition as a one-shot ECS task, with the specified
|
54
54
|
# overrides.
|
55
|
-
def run(cluster, **args)
|
55
|
+
def run(cluster, started_by: nil, **args)
|
56
56
|
overrides_json = json_generator.generate_override_json(**args)
|
57
57
|
info = Ecs.run_task(cluster.name, register,
|
58
|
+
started_by: started_by,
|
58
59
|
overrides_json: overrides_json)
|
59
60
|
info.fetch("tasks")[0].fetch("taskArn")
|
60
61
|
end
|