minimal_pipeline 0.3.1 → 0.3.2
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 +4 -4
- data/lib/minimal_pipeline/docker.rb +19 -9
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e633583b5092b2ea1fa64e202847265cb5110dd3d646abeb5db934160b821e53
|
4
|
+
data.tar.gz: c2e374fe91ca7278785021625214dfd8c8d32c054a122db6e61b1f9fa0fdf3cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 160f3a17a3cb7dac487ca574eb7731a3d357fa1c53b26ad22d7632a82314c183f74a2d3d44ba2e27cfee901a86f67d258fbdb7022004eb4e78db184ea75f2e89
|
7
|
+
data.tar.gz: 13fdaf4fb6e1d40a26539bbb1981938a2627cae2595d3c3dad6df2d777262ab2b0da2ea750b424f4ff89349e68b7d79974ea2918386d775db460b17d2ad287ef
|
@@ -15,7 +15,7 @@ class MinimalPipeline
|
|
15
15
|
# deploy_env = ENV['DEPLOY_ENV']
|
16
16
|
# docker_repo = keystore.retrieve("#{deploy_env}_EXAMPLE_ECR_REPO")
|
17
17
|
# docker_image = "#{docker_repo}/example:latest"
|
18
|
-
# docker.build_docker_image(docker_image, 'containers/example')
|
18
|
+
# docker.build_docker_image(docker_image, build_context: 'containers/example')
|
19
19
|
# docker.push_docker_image(docker_image)
|
20
20
|
# ```
|
21
21
|
class Docker
|
@@ -75,15 +75,13 @@ class MinimalPipeline
|
|
75
75
|
build_args[arg] = ENV[arg] if ENV[arg]
|
76
76
|
end
|
77
77
|
|
78
|
-
args =
|
79
|
-
'nocache' => 'true',
|
80
|
-
'pull' => 'true',
|
81
|
-
't' => image_id,
|
82
|
-
'dockerfile' => dockerfile,
|
83
|
-
'buildargs' => JSON.dump(build_args)
|
84
|
-
}
|
78
|
+
args = populate_args_hash(image_id, dockerfile, build_args)
|
85
79
|
puts "Build args: #{args.inspect}" if ENV['DEBUG']
|
86
|
-
::Docker.options
|
80
|
+
::Docker.options = {
|
81
|
+
timeout: timeout,
|
82
|
+
read_timeout: timeout,
|
83
|
+
write_timeout: timeout
|
84
|
+
}
|
87
85
|
::Docker::Image.build_from_dir(build_context, args) do |value|
|
88
86
|
build_output(value)
|
89
87
|
end
|
@@ -101,5 +99,17 @@ class MinimalPipeline
|
|
101
99
|
unless status.exitstatus.zero?
|
102
100
|
clean_up_image(image_id)
|
103
101
|
end
|
102
|
+
|
103
|
+
private
|
104
|
+
|
105
|
+
def populate_args_hash(image_id, dockerfile, build_args)
|
106
|
+
{
|
107
|
+
'nocache' => 'true',
|
108
|
+
'pull' => 'true',
|
109
|
+
't' => image_id,
|
110
|
+
'dockerfile' => dockerfile,
|
111
|
+
'buildargs' => JSON.dump(build_args)
|
112
|
+
}
|
113
|
+
end
|
104
114
|
end
|
105
115
|
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.3.
|
4
|
+
version: 0.3.2
|
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: 2019-
|
12
|
+
date: 2019-06-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: aws-sdk-cloudformation
|
@@ -189,7 +189,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
189
189
|
version: '0'
|
190
190
|
requirements: []
|
191
191
|
rubyforge_project:
|
192
|
-
rubygems_version: 2.7.6
|
192
|
+
rubygems_version: 2.7.6.2
|
193
193
|
signing_key:
|
194
194
|
specification_version: 4
|
195
195
|
summary: Helper gem to manage pipeline tasks
|