rake_docker 0.10.0 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 70941f2c33fa30e4f4894080ef9e871361c1c1e2
4
- data.tar.gz: ea0a0c347a27136eec74269dab59baaf7f40d048
3
+ metadata.gz: fb7cf212021cf6f2ead7bd614929152dfd09a615
4
+ data.tar.gz: 9a035bb8c14627c1399fff9d948fdae86e17ea71
5
5
  SHA512:
6
- metadata.gz: 66d7cf4dd4fbd6fd1bf3aad59c2ff5b28730df63713384129a126c624e7e14fd2fbdf00c20d1bd6bce54c12bc263a76984f4e1f3b8d1fb6a48b2ebc36149136b
7
- data.tar.gz: fb8d586987274ee45e267725ec4bc67cc5bc9737ce3574a5efd627821d164144dc9a3e4b861df57ef0ae3042a26957cc77a72afe832f2117b94942acd8c4d59c
6
+ metadata.gz: 68ccf8cdfd1c92f47b1d6d2a4ac39830afb9e077732e2ea7bc0c4a68120ff07da39c68ce9c8ef83751fecf80a86aae4f534efa65ec56ac49d8dcb24d7613ef9d
7
+ data.tar.gz: 5bf3502515949746b9be2827a18db6fb8d664ee8ea6652a04434ba4b58ee301bb687f8d1e7375bc05781124823c198290342badcd4782836e16e92c9a054a7f4
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## 0.11.0 (January 9th, 2018)
2
+
3
+ IMPROVEMENTS:
4
+
5
+ * If credentials are provided, the build task will now authenticate prior to
6
+ building to allow images to be built with private base images.
7
+
1
8
  ## 0.10.0 (October 24th, 2017)
2
9
 
3
10
  BACKWARDS INCOMPATIBILITIES / NOTES:
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rake_docker (0.10.0)
4
+ rake_docker (0.11.0)
5
5
  aws-sdk (~> 2.10)
6
6
  docker-api (~> 1.33)
7
7
 
@@ -13,26 +13,27 @@ GEM
13
13
  minitest (~> 5.1)
14
14
  thread_safe (~> 0.3, >= 0.3.4)
15
15
  tzinfo (~> 1.1)
16
- aws-sdk (2.10.70)
17
- aws-sdk-resources (= 2.10.70)
18
- aws-sdk-core (2.10.70)
16
+ aws-sdk (2.10.114)
17
+ aws-sdk-resources (= 2.10.114)
18
+ aws-sdk-core (2.10.114)
19
19
  aws-sigv4 (~> 1.0)
20
20
  jmespath (~> 1.0)
21
- aws-sdk-resources (2.10.70)
22
- aws-sdk-core (= 2.10.70)
21
+ aws-sdk-resources (2.10.114)
22
+ aws-sdk-core (= 2.10.114)
23
23
  aws-sigv4 (1.0.2)
24
24
  diff-lcs (1.3)
25
25
  docile (1.1.5)
26
- docker-api (1.33.6)
27
- excon (>= 0.38.0)
28
- json
29
- excon (0.59.0)
26
+ docker-api (1.34.0)
27
+ excon (>= 0.47.0)
28
+ multi_json
29
+ excon (0.60.0)
30
30
  gem-release (0.7.4)
31
31
  i18n (0.8.4)
32
32
  jmespath (1.3.1)
33
33
  json (2.1.0)
34
34
  memfs (1.0.0)
35
35
  minitest (5.10.2)
36
+ multi_json (1.13.0)
36
37
  rake (10.5.0)
37
38
  rspec (3.6.0)
38
39
  rspec-core (~> 3.6.0)
@@ -61,9 +61,11 @@ module RakeDocker
61
61
  end
62
62
  Build.new do |t|
63
63
  t.name = build_task_name
64
+ t.argument_names = argument_names
64
65
  t.image_name = image_name
65
66
  t.repository_name = repository_name
66
67
  t.work_directory = work_directory
68
+ t.credentials = credentials
67
69
  t.prepare_task = prepare_task_name
68
70
  end
69
71
  Tag.new do |t|
@@ -5,10 +5,13 @@ module RakeDocker
5
5
  module Tasks
6
6
  class Build < TaskLib
7
7
  parameter :name, :default => :build
8
+ parameter :argument_names, :default => []
8
9
 
9
10
  parameter :image_name, :required => true
10
11
  parameter :repository_name, :required => true
11
12
 
13
+ parameter :credentials
14
+
12
15
  parameter :work_directory, :required => true
13
16
 
14
17
  parameter :prepare_task, :default => :prepare
@@ -23,7 +26,20 @@ module RakeDocker
23
26
  []
24
27
 
25
28
  desc "Build #{image_name} image"
26
- task name => prerequisites do
29
+ task name, argument_names => prerequisites do |_, args|
30
+ params = OpenStruct.new(
31
+ image_name: image_name,
32
+ repository_name: repository_name,
33
+ credentials: credentials,
34
+ work_directory: work_directory
35
+ )
36
+
37
+ derived_credentials = credentials.respond_to?(:call) ?
38
+ credentials.call(*[args, params].slice(0, credentials.arity)) :
39
+ credentials
40
+
41
+ Docker.authenticate!(derived_credentials) if derived_credentials
42
+
27
43
  Docker::Image.build_from_dir(
28
44
  File.join(work_directory, image_name),
29
45
  {t: repository_name}) do |chunk|
@@ -1,3 +1,3 @@
1
1
  module RakeDocker
2
- VERSION = '0.10.0'
2
+ VERSION = '0.11.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rake_docker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Toby Clemson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-10-24 00:00:00.000000000 Z
11
+ date: 2018-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: docker-api