minimal_pipeline 0.2.4 → 0.2.5
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/docker.rb +10 -3
- 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: 4404c5ba6b5e7a0e6ca440eb763c1a5880d58e7a84b2c2cec632a3de80a48179
|
4
|
+
data.tar.gz: 91333e935dd41252f53fc5377007f7c8cc3c896b635142955a19ce07e40c8766
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eba49be07a7bd94e5228cd92886399048e1a97e6eac8a27e947dbde09e9da28924b58810a38502090cdf372b1a29e0c76fb52d2b139c12a058780dffd972d2e4
|
7
|
+
data.tar.gz: c4160819401a3be1b626ecdd5161e9e6a6d71a39cbd0984bafbfe7802951ce083c9731eea300c64df972bd37f48498a6032609e9507dc8a269679ea3d1ecdf19
|
@@ -62,10 +62,14 @@ class MinimalPipeline
|
|
62
62
|
# Builds a docker image from a Dockerfile
|
63
63
|
#
|
64
64
|
# @param image_id [String] The name of the docker image
|
65
|
-
# @param
|
65
|
+
# @param build_context [String] The build context for Dockerfile
|
66
|
+
# @param dockerfile [String] The path to Dockerfile
|
66
67
|
# @param build_args [Hash] Additional build args to pass to Docker
|
67
68
|
# @param timeout [Integer] The Docker build timeout
|
68
|
-
def build_docker_image(image_id,
|
69
|
+
def build_docker_image(image_id, build_context = '.',
|
70
|
+
dockerfile = 'Dockerfile',
|
71
|
+
build_args: {},
|
72
|
+
timeout: 600)
|
69
73
|
%w[HTTP_PROXY HTTPS_PROXY NO_PROXY http_proxy https_proxy
|
70
74
|
no_proxy].each do |arg|
|
71
75
|
build_args[arg] = ENV[arg] if ENV[arg]
|
@@ -75,11 +79,14 @@ class MinimalPipeline
|
|
75
79
|
'nocache' => 'true',
|
76
80
|
'pull' => 'true',
|
77
81
|
't' => image_id,
|
82
|
+
'dockerfile' => dockerfile,
|
78
83
|
'buildargs' => JSON.dump(build_args)
|
79
84
|
}
|
80
85
|
puts "Build args: #{args.inspect}" if ENV['DEBUG']
|
81
86
|
::Docker.options[:read_timeout] = timeout
|
82
|
-
::Docker::Image.build_from_dir(
|
87
|
+
::Docker::Image.build_from_dir(build_context, args) do |value|
|
88
|
+
build_output(value)
|
89
|
+
end
|
83
90
|
end
|
84
91
|
|
85
92
|
# Pushes a docker image from local to AWS ECR.
|
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.2.
|
4
|
+
version: 0.2.5
|
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-12-
|
12
|
+
date: 2018-12-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: aws-sdk-cloudformation
|