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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3dc8bf5ed177981cdbfc662042cd9e67a5e2c9b1
4
- data.tar.gz: 8d297607c1bdb1fc442832e1c64c8bf896cc053a
3
+ metadata.gz: 1c3e4f3ccc99a0058063dd94efb2b1567baa4b6c
4
+ data.tar.gz: c20b758d78610e4108790dd58e5d30957d1e21b7
5
5
  SHA512:
6
- metadata.gz: d7b7e7285cd236537a5869df7274b55f964ab16eb753b087dd58a6b00a871c2212bbf324e143830a42f587f03262a8a612727ab745af060515392cf7277566f0
7
- data.tar.gz: ee6b648d01d48a55cb93cf7a2f2574510c33ad97acb5d13b993aeb02312643c5537ca45840e14ace98c5c2b5a15bea279c1ddd88baee5c09de59a3d99a9d01e3
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)
@@ -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, overrides_json: nil)
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ecs_compose
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.pre15
4
+ version: 0.1.0.pre16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Kidd