minimal_pipeline 0.0.5 → 0.0.6

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: d92c6a5fbc6d0e9ac93c04bc391a3e9323c1e122d37c2ca75bfe25b23a5ebb2b
4
- data.tar.gz: 5107a182700974a80340fd8127c6a507c342081d55181c53aa2efa9e139b29a0
3
+ metadata.gz: 17d79644fe79f09ff0d0f5d62c5b3b6eb5e13c89432f1a01abf118563fdb65a1
4
+ data.tar.gz: 960d4874a391d625b06fe6885659d2acb5319e3cc23ca5069e3d7ac3bffa5b05
5
5
  SHA512:
6
- metadata.gz: 8e3cfbf357326070b7e8a94577bada709dff67f428b8a586ea1674a9a8c2b8934897fa8f77e2211735658adce94f7590b6f007b448f0cfeddf9a90ea7c3c99ea
7
- data.tar.gz: 91e8ff6aa0af6f3da90b271ee9849874d50deec7e35f01188b5d1e49ec47fbdfe46cea13432120249c20c10813fba7b704a3c3a4bb0c189a4a8f21ac1272a385
6
+ metadata.gz: 58d374917e12f55fe2bafba8db72e39358f3752e251d494fb3cdd629aec930e6b7c93734fcc8ca4fbd32aa5abed33365fc069b8819bc0b6bcdf4ec968d0b437b
7
+ data.tar.gz: fc3edde7ecd4b302fbcec0d06967b8577a4c6f3e3232e5fde737bad9370fb5e37575c743921b6a071e831d822e729fac5992d350bb20e119afd48c610465c53c
@@ -86,7 +86,7 @@ class MinimalPipeline
86
86
  end
87
87
  rescue Aws::CloudFormation::Errors::ValidationError => error
88
88
  if error.to_s.include? 'No updates are to be performed.'
89
- puts "Nothing to do."
89
+ puts 'Nothing to do.'
90
90
  elsif error.to_s.include? 'Template error'
91
91
  raise error
92
92
  else
@@ -24,8 +24,9 @@ class MinimalPipeline
24
24
  # For more information on Crossing see https://github.com/stelligent/crossing
25
25
  class Crossing
26
26
  def initialize
27
- raise 'You must set env variable AWS_REGION.' if ENV['AWS_REGION'].nil?
28
- raise '`keystore_kms_id` in environment!' \
27
+ raise 'You must set env variable AWS_REGION or region.' \
28
+ if ENV['AWS_REGION'].nil?
29
+ raise 'You must set env variable keystore_kms_id.' \
29
30
  if ENV['keystore_kms_id'].nil?
30
31
 
31
32
  region = ENV['AWS_REGION']
@@ -19,10 +19,7 @@ class MinimalPipeline
19
19
  # docker.push_docker_image(docker_image)
20
20
  # ```
21
21
  class Docker
22
- include Rake::DSL
23
-
24
- def initialize
25
- end
22
+ def initialize; end
26
23
 
27
24
  # Finds the absolute path to a given executable
28
25
  #
@@ -96,7 +93,6 @@ class MinimalPipeline
96
93
  #
97
94
  # @param image_id [String] The name of the docker image
98
95
  def push_docker_image(image_id)
99
- ecr_login
100
96
  docker_bin = which('docker')
101
97
  raise "docker_push: no docker binary: #{image_id}" unless docker_bin
102
98
  stdout, stderr, status = Open3.capture3(docker_bin, 'push', image_id)
@@ -110,7 +106,7 @@ class MinimalPipeline
110
106
  def list_containers
111
107
  containers = Dir.glob('containers/*')
112
108
  # Grab container name from containers/name/Dockerfile
113
- containers.map{ |container| container.split('/')[1] }
109
+ containers.map { |container| container.split('/')[1] }
114
110
  end
115
111
  end
116
112
  end
@@ -31,9 +31,9 @@ class MinimalPipeline
31
31
  def initialize
32
32
  raise 'You must set env variable AWS_REGION or region.' \
33
33
  if ENV['AWS_REGION'].nil? && ENV['region'].nil?
34
- raise 'Missing keystore_table in environment!' \
34
+ raise 'You must set env variable keystore_table.' \
35
35
  if ENV['inventory_store'].nil? && ENV['keystore_table'].nil?
36
- raise 'Missing keystore_kms_id in environment!' \
36
+ raise 'You must set env variable keystore_kms_id.' \
37
37
  if ENV['inventory_store_key'].nil? && ENV['keystore_kms_id'].nil?
38
38
 
39
39
  region = ENV['AWS_REGION'] || ENV['region']
@@ -42,9 +42,9 @@ class MinimalPipeline
42
42
  kms = Aws::KMS::Client.new(region: region)
43
43
  dynamo = Aws::DynamoDB::Client.new(region: region)
44
44
  @keystore = ::Keystore.new(dynamo: dynamo,
45
- table_name: keystore_table,
46
- kms: kms,
47
- key_id: keystore_kms_id)
45
+ table_name: keystore_table,
46
+ kms: kms,
47
+ key_id: keystore_kms_id)
48
48
  end
49
49
 
50
50
  # Retrieves a value from the Keystore
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minimal_pipeline
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mayowa Aladeojebi
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-08-27 00:00:00.000000000 Z
12
+ date: 2018-09-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: aws-sdk