ufo 4.1.0 → 4.1.1

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
  SHA256:
3
- metadata.gz: 3e32cfe7ae9d1c54917cfca857b135fd1ad7dccc7f865ccc9f2b7187238c0b62
4
- data.tar.gz: 39a546c17315befed8fcc630f382a613556b756e3ccd74e11fe20dc3a768d4c1
3
+ metadata.gz: 33f1048c6f9c171330e61473ffa002d602bc0e133fa377c6e41fae8d4c2cbd88
4
+ data.tar.gz: 7ffd9cd2540acdd259378cd0913c61398fb956d10df64dcf4cae6a7ef675a2af
5
5
  SHA512:
6
- metadata.gz: ca820a40d91b2983413dfbf33d0a0ee31971f04e989711a827c413fa8708dc51c507e97bf5f889e094ab7b3d65a7dbc53001148fc59b716b6224e6a5ace17d73
7
- data.tar.gz: 89856c014555a1685b101c62da4ee7b585197da7dcfe2ee113a79a857ef98ad6933eb66802a903b7f48ed0429ecaf9a3276afeeaf087dedcc001d7c3926e030c
6
+ metadata.gz: 10401ec23bec1fc97a7d8191893b812cf51cdb39688d8ead07ae2cad2698bfcf35790b387aea8c3bfd0358eb908ede51df401e3cefa6635fe85c9526d86bbe3a
7
+ data.tar.gz: 70b8d718a779ff77a63037210b7113432e118e916786fe148a806e01153d30492abfbc1be9d2607a9c3a9df43db37b9647357b4df298773af4f99fb0fbd31b53
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  This project *tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
5
5
 
6
+ ## [4.1.1]
7
+ - add --no-register ability to ufo deploy command
8
+ - fixes: hide_time_took, ps_spec
9
+ - ufo destroy: improve error handling for in progress state
10
+ - ufo ps --extra: show shorter container instance arn id
11
+
6
12
  ## [4.1.0]
7
13
  - Merge pull request #46 from tongueroo/ufo-status
8
14
  - add ufo status command
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ufo (4.0.0)
4
+ ufo (4.1.0)
5
5
  aws-sdk-cloudformation
6
6
  aws-sdk-cloudwatchlogs
7
7
  aws-sdk-ec2
@@ -37,7 +37,7 @@ GEM
37
37
  aws-partitions (~> 1.0)
38
38
  aws-sigv4 (~> 1.0)
39
39
  jmespath (~> 1.0)
40
- aws-sdk-ec2 (1.37.0)
40
+ aws-sdk-ec2 (1.38.0)
41
41
  aws-sdk-core (~> 3)
42
42
  aws-sigv4 (~> 1.0)
43
43
  aws-sdk-ecr (1.4.0)
@@ -52,6 +52,8 @@ The `ufo ships`, `ufo ship`, `ufo deploy` command support the same options. The
52
52
  [--task=TASK] # ECS task name, to override the task name convention.
53
53
  [--wait], [--no-wait] # Wait for deployment to complete
54
54
  # Default: true
55
+ [--register], [--no-register] # Register task definition
56
+ # Default: true
55
57
  [--verbose], [--no-verbose]
56
58
  [--mute], [--no-mute]
57
59
  [--noop], [--no-noop]
@@ -45,6 +45,7 @@ Skip the summary info:
45
45
  ```
46
46
  [--summary], [--no-summary] # Display summary header info.
47
47
  # Default: true
48
+ [--extra], [--no-extra] # Display extra debugging columns.
48
49
  [--verbose], [--no-verbose]
49
50
  [--mute], [--no-mute]
50
51
  [--noop], [--no-noop]
@@ -0,0 +1,23 @@
1
+ ---
2
+ title: ufo status
3
+ reference: true
4
+ ---
5
+
6
+ ## Usage
7
+
8
+ ufo status SERVICE
9
+
10
+ ## Description
11
+
12
+ Status of ECS service. Essentially, status of CloudFormation stack
13
+
14
+
15
+ ## Options
16
+
17
+ ```
18
+ [--verbose], [--no-verbose]
19
+ [--mute], [--no-mute]
20
+ [--noop], [--no-noop]
21
+ [--cluster=CLUSTER] # Cluster. Overrides .ufo/settings.yml.
22
+ ```
23
+
@@ -20,6 +20,7 @@ title: CLI Reference
20
20
  * [ufo scale]({% link _reference/ufo-scale.md %})
21
21
  * [ufo ship]({% link _reference/ufo-ship.md %})
22
22
  * [ufo ships]({% link _reference/ufo-ships.md %})
23
+ * [ufo status]({% link _reference/ufo-status.md %})
23
24
  * [ufo stop]({% link _reference/ufo-stop.md %})
24
25
  * [ufo task]({% link _reference/ufo-task.md %})
25
26
  * [ufo tasks]({% link _reference/ufo-tasks.md %})
@@ -46,10 +46,11 @@ module Ufo
46
46
  desc "deploy SERVICE", "Deploy task definition to ECS service without re-building the definition."
47
47
  long_desc Help.text(:deploy)
48
48
  ship_options.call
49
+ option :register, type: :boolean, desc: "Register task definition", default: true
49
50
  def deploy(service=:current)
50
51
  service = service == :current ? Current.service! : service
51
52
  task_definition = options[:task] || service # convention
52
- Tasks::Register.register(task_definition, options)
53
+ Tasks::Register.register(task_definition, options) if options[:register]
53
54
  ship = Ship.new(service, options.merge(task_definition: task_definition))
54
55
  ship.deploy
55
56
  end
@@ -8,10 +8,18 @@ module Ufo
8
8
 
9
9
  stack = find_stack(@stack_name)
10
10
  unless stack
11
- puts "Stack #{@stack_name} does not exist."
11
+ puts "Stack #{@stack_name.colorize(:green)} does not exist."
12
12
  exit
13
13
  end
14
14
 
15
+ if stack.stack_status =~ /_IN_PROGRESS$/
16
+ puts "Cannot destroy service #{@pretty_service_name.colorize(:green)}"
17
+ puts "Cannot delete stack #{@stack_name.colorize(:green)} in this state: #{stack.stack_status.colorize(:green)}"
18
+ puts "If the stack is taking a long time, you can cancel the current operation with:"
19
+ puts " ufo cancel #{@service}"
20
+ return
21
+ end
22
+
15
23
  cloudformation.delete_stack(stack_name: @stack_name)
16
24
  puts "Deleting CloudFormation stack with ECS resources: #{@stack_name}."
17
25
 
@@ -27,7 +27,7 @@ class Ufo::Ps
27
27
  end
28
28
 
29
29
  def container_instance_arn
30
- @task['container_instance_arn']
30
+ @task['container_instance_arn'].split('/').last
31
31
  end
32
32
 
33
33
  def release
@@ -65,7 +65,7 @@ class Ufo::Stack
65
65
  puts "Stack success status: #{last_event_status}".colorize(:green)
66
66
  end
67
67
 
68
- return unless @hide_time_took
68
+ return if @hide_time_took
69
69
  took = Time.now - start_time
70
70
  puts "Time took for stack deployment: #{pretty_time(took).green}."
71
71
  end
@@ -1,3 +1,3 @@
1
1
  module Ufo
2
- VERSION = "4.1.0"
2
+ VERSION = "4.1.1"
3
3
  end
@@ -7,8 +7,8 @@ describe Ufo::Ps do
7
7
  let(:describe_tasks_response) do
8
8
  JSON.load(IO.read("spec/fixtures/ps/describe_tasks.json"))
9
9
  end
10
- it "displays info" do
11
- ps.display_info(describe_tasks_response)
10
+ it "display_tasks" do
11
+ ps.display_tasks(describe_tasks_response)
12
12
  end
13
13
  end
14
14
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ufo
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.0
4
+ version: 4.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-07-12 00:00:00.000000000 Z
11
+ date: 2018-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-cloudformation
@@ -382,6 +382,7 @@ files:
382
382
  - docs/_reference/ufo-scale.md
383
383
  - docs/_reference/ufo-ship.md
384
384
  - docs/_reference/ufo-ships.md
385
+ - docs/_reference/ufo-status.md
385
386
  - docs/_reference/ufo-stop.md
386
387
  - docs/_reference/ufo-task.md
387
388
  - docs/_reference/ufo-tasks-build.md