qops 1.4.10 → 1.5.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e5586500a7ffa8c37e58a2cd82253f2d63c12c71
4
- data.tar.gz: e2f90b3be2ea381ce63af219c10bad462a73130b
3
+ metadata.gz: dd70c30cc7c37b5ecd6518aed0f7a7acbb2f7674
4
+ data.tar.gz: a565c04736b4e3e6248a08093a4f72c29825a64a
5
5
  SHA512:
6
- metadata.gz: 810a202f62ae677c686f0284f11e97de8041506d8a92fb4db53c504ec542b29535cf39f59d5c99d1691e97870c2db32d1e0806f9b3827a5f8ac91c4f2c57dd5d
7
- data.tar.gz: a9149059f5b4a634e19b11cd3274136c374b13d9b718dcd494b28140454bc061a54554c484ea76d9a8dcc773c5266e702960a9bd394089d9fcee61fd9250abd7
6
+ metadata.gz: 3a665a0f24d8bd0870ea908baa0019f1edd3fd143d684c73282a6bc244c4fe421efc8c834746e151844860d7448dfffb4749dde4bb4ae4684ad6537caa536d72
7
+ data.tar.gz: 522219fb5a32b183826ab4655a13b13390e22e993d6bcaa5e654615a7f53236b27df410e72b4ad6b22d0a48413b08e4c4d6da12b15c3fe466d11bb2341e57262
data/README.md CHANGED
@@ -2,10 +2,10 @@
2
2
 
3
3
  ## Configuring Qops in your project
4
4
 
5
- 1. In your repo's config directory create a file called opsworks.yml. See sample.
6
- 2. Install gem `qops` to your system. Be sure to use gem install `qops`. Do not include it as part of the bundle of your repo as it is mean't to be run outside of the scope of your project.
7
- 3. Run `qops list` to get a list of commands you can run.
8
- 4. Run `qops help <command>` for more information on command argument options
5
+ 1. In your repo's config directory create a file called opsworks.yml. See sample.
6
+ 2. Install gem `qops` to your system. Be sure to use gem install `qops`. Do not include it as part of the bundle of your repo as it is mean't to be run outside of the scope of your project.
7
+ 3. Run `qops list` to get a list of commands you can run.
8
+ 4. Run `qops help <command>` for more information on command argument options
9
9
 
10
10
  ## FAQ:
11
11
 
@@ -25,7 +25,7 @@ You can use the custom json flag for this. Example:
25
25
 
26
26
  In this case the `wikiposit` is the opsworks app wikiposit. You will need to change this to whichever app you are deploying.
27
27
 
28
- See also: http://docs.aws.amazon.com/opsworks/latest/userguide/apps-environment-vars.html
28
+ See also: <http://docs.aws.amazon.com/opsworks/latest/userguide/apps-environment-vars.html>
29
29
 
30
30
  ## Sample Config (with all options)
31
31
 
@@ -5,11 +5,7 @@ class Qops::Deploy < Thor
5
5
  def app
6
6
  initialize_run
7
7
 
8
- instances = if config.deploy_type == 'staging'
9
- [retrieve_instance].compact
10
- else
11
- retrieve_instances
12
- end
8
+ instances = config.deploy_type == 'staging' ? [retrieve_instance].compact : retrieve_instances
13
9
  online_instances = instances.select { |instance| instance.status == 'online' }
14
10
 
15
11
  if online_instances.empty?
@@ -24,7 +20,9 @@ class Qops::Deploy < Thor
24
20
 
25
21
  base_deployment_params = {
26
22
  stack_id: config.stack_id,
27
- command: { name: 'deploy' }
23
+ command: {
24
+ name: 'deploy'
25
+ }
28
26
  }
29
27
 
30
28
  if !config.application_id
@@ -38,7 +36,9 @@ class Qops::Deploy < Thor
38
36
  base_deployment_params[:custom_json] = custom_json.to_json
39
37
  end
40
38
 
41
- manifest = { environment: config.deploy_type }
39
+ manifest = {
40
+ environment: config.deploy_type
41
+ }
42
42
 
43
43
  # Deploy the first instance with migration on
44
44
  first_instance = online_instances.first
@@ -70,9 +70,7 @@ class Qops::Deploy < Thor
70
70
  deployment_params = base_deployment_params.deep_dup
71
71
  run_opsworks_command(deployment_params)
72
72
 
73
- online_instances.each do |instance|
74
- tag_instance(instance)
75
- end
73
+ online_instances.each { |instance| tag_instance(instance) }
76
74
 
77
75
  ping_slack(
78
76
  'Quandl::Slack::Release',
@@ -106,6 +104,8 @@ class Qops::Deploy < Thor
106
104
  application_name = config.opsworks.describe_apps(app_ids: [config.application_id]).apps.first.name
107
105
 
108
106
  @_custom_json[:deploy] = {
107
+ revision: revision_used,
108
+ # the following is to be deprecated in favor of the former...
109
109
  application_name => {
110
110
  scm: {
111
111
  revision: revision_used
@@ -350,15 +350,15 @@ class Qops::Instance < Thor # rubocop:disable Metrics/ClassLength
350
350
 
351
351
  ping_slack(
352
352
  'Quandl::Slack::InstanceDown',
353
- 'Remove existing instance',
354
- 'success',
355
- manifest.merge(
356
- completed: Time.now,
357
- hostname: instance.hostname,
358
- instance_id: instance.instance_id,
359
- private_ip: instance.private_ip,
360
- public_ip: instance.public_ip
361
- )
353
+ 'Remove existing instance',
354
+ 'success',
355
+ manifest.merge(
356
+ completed: Time.now,
357
+ hostname: instance.hostname,
358
+ instance_id: instance.instance_id,
359
+ private_ip: instance.private_ip,
360
+ public_ip: instance.public_ip
361
+ )
362
362
  )
363
363
  end
364
364
  end
@@ -38,7 +38,7 @@ module Qops
38
38
 
39
39
  begin
40
40
  opsworks.config.credentials.credentials
41
- rescue => e
41
+ rescue => e # rubocop:disable Lint/RescueWithoutErrorClass
42
42
  raise "There may be a problem with your aws credentials. Please correct with `aws configure`. Error: #{e}"
43
43
  end
44
44
  end
data/lib/qops/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Qops
4
- VERSION = '1.4.10'.freeze
4
+ VERSION = '1.5.0'.freeze
5
5
  end
metadata CHANGED
@@ -1,17 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qops
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.10
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Basset
8
- - Clemeny Leung
8
+ - Clement Leung
9
9
  - Jason Byck
10
10
  - Jun Li
11
+ - Michael Fich
11
12
  autorequire:
12
13
  bindir: bin
13
14
  cert_chain: []
14
- date: 2017-06-01 00:00:00.000000000 Z
15
+ date: 2017-09-25 00:00:00.000000000 Z
15
16
  dependencies:
16
17
  - !ruby/object:Gem::Dependency
17
18
  name: qthor
@@ -135,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
135
136
  version: '0'
136
137
  requirements: []
137
138
  rubyforge_project:
138
- rubygems_version: 2.6.10
139
+ rubygems_version: 2.6.13
139
140
  signing_key:
140
141
  specification_version: 4
141
142
  summary: Helper commands for deployment of opsworks projects.