minimal_pipeline 0.0.6 → 0.0.7

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
  SHA256:
3
- metadata.gz: 17d79644fe79f09ff0d0f5d62c5b3b6eb5e13c89432f1a01abf118563fdb65a1
4
- data.tar.gz: 960d4874a391d625b06fe6885659d2acb5319e3cc23ca5069e3d7ac3bffa5b05
3
+ metadata.gz: 2fbef7a5fe784df8ff482b86cc27d4fc8640a4d660da61d7a151cc38ae0d1c36
4
+ data.tar.gz: ebf05b45d3aa4fe56c99f8de0d8941ba3662d4b32911cdd299f1d5d4fe97c867
5
5
  SHA512:
6
- metadata.gz: 58d374917e12f55fe2bafba8db72e39358f3752e251d494fb3cdd629aec930e6b7c93734fcc8ca4fbd32aa5abed33365fc069b8819bc0b6bcdf4ec968d0b437b
7
- data.tar.gz: fc3edde7ecd4b302fbcec0d06967b8577a4c6f3e3232e5fde737bad9370fb5e37575c743921b6a071e831d822e729fac5992d350bb20e119afd48c610465c53c
6
+ metadata.gz: e1543410703abd71b9b2f44a2dff03a193ba51c5d330d1460995d208b273b32b1449e7f3b179cab5de43f6adf930c45e48f7e95532d94661ba929e8017b72460
7
+ data.tar.gz: b6f1d8c7a2741ca90e03ef9e3a698bf33b2342c0f22692f98223fbfb1cc10be65e9bf344ea0c92cccfb4fc08b11567f7d22d25275068c6af2e4422289d22df56
@@ -25,13 +25,14 @@ class MinimalPipeline
25
25
  class Crossing
26
26
  def initialize
27
27
  raise 'You must set env variable AWS_REGION or region.' \
28
- if ENV['AWS_REGION'].nil?
28
+ if ENV['AWS_REGION'].nil? && ENV['region'].nil?
29
29
  raise 'You must set env variable keystore_kms_id.' \
30
- if ENV['keystore_kms_id'].nil?
30
+ if ENV['inventory_store_key'].nil? && ENV['keystore_kms_id'].nil?
31
31
 
32
- region = ENV['AWS_REGION']
32
+ region = ENV['AWS_REGION'] || ENV['region']
33
+ keystore_kms_id = ENV['keystore_kms_id'] || ENV['inventory_store_key']
33
34
  kms = Aws::KMS::Client.new(region: region)
34
- s3 = Aws::S3::Encryption::Client.new(kms_key_id: ENV['keystore_kms_id'],
35
+ s3 = Aws::S3::Encryption::Client.new(kms_key_id: keystore_kms_id,
35
36
  kms_client: kms,
36
37
  region: region)
37
38
  @crossing = ::Crossing.new(s3)
@@ -51,12 +51,6 @@ class MinimalPipeline
51
51
  $stdout.puts build_output
52
52
  end
53
53
 
54
- # Logs in to AWS ECR
55
- def ecr_login
56
- region = ENV['AWS_REGION'] || ENV['region']
57
- `$(aws ecr get-login --region #{region})`
58
- end
59
-
60
54
  # Cleans up docker images
61
55
  #
62
56
  # @param image_id [String] The Docker container ID to delete
@@ -100,13 +94,5 @@ class MinimalPipeline
100
94
  unless status.exitstatus.zero?
101
95
  clean_up_image(image_id)
102
96
  end
103
-
104
- # List all containers in the `containers` directory
105
- # @return [Array] List of container names
106
- def list_containers
107
- containers = Dir.glob('containers/*')
108
- # Grab container name from containers/name/Dockerfile
109
- containers.map { |container| container.split('/')[1] }
110
- end
111
97
  end
112
98
  end
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.6
4
+ version: 0.0.7
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-09-13 00:00:00.000000000 Z
12
+ date: 2018-09-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: aws-sdk