minimal_pipeline 0.2.4 → 0.2.5

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: 80704d7d13d62a58a13a017e5f242eb80906b05b3b7157949951ea517efb5aa8
4
- data.tar.gz: 505337f7502811f804f59161f5b3394a9304baf0b770d5ff01b487228f359425
3
+ metadata.gz: 4404c5ba6b5e7a0e6ca440eb763c1a5880d58e7a84b2c2cec632a3de80a48179
4
+ data.tar.gz: 91333e935dd41252f53fc5377007f7c8cc3c896b635142955a19ce07e40c8766
5
5
  SHA512:
6
- metadata.gz: 38f5fed90b82c12bc0623b15d54b0b60d860eb53dac6e9e09584abe4053250f75ada61e7c6cd1580c180ab5bc885ab2e039abbc8c1f1348ba0e2a59ed1c1cb8c
7
- data.tar.gz: f3f2ab864e9f30c8f1634f1b602ea60c0c5a15ba3879f4a17752c8c81641057db67b269f2380c32b9f943a49b05024847c3faefc83dcd0f912c9d18a18841426
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 dir [String] The path to the Dockerfile
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, dir = '.', build_args: {}, timeout: 600)
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(dir, args) { |v| build_output(v) }
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
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-18 00:00:00.000000000 Z
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