minimal_pipeline 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/minimal_pipeline/crossing.rb +5 -4
- data/lib/minimal_pipeline/docker.rb +0 -14
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2fbef7a5fe784df8ff482b86cc27d4fc8640a4d660da61d7a151cc38ae0d1c36
|
4
|
+
data.tar.gz: ebf05b45d3aa4fe56c99f8de0d8941ba3662d4b32911cdd299f1d5d4fe97c867
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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:
|
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.
|
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-
|
12
|
+
date: 2018-09-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: aws-sdk
|