dockerhelper 0.0.5 → 0.0.6

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: 9178187c9e138e25855fd94d4d748f3ec5ba8b23
4
- data.tar.gz: 87f038059e71d699b79c678cc9f581f22141b625
3
+ metadata.gz: 2228c259d41777858a09d19b98deea20ecf88a66
4
+ data.tar.gz: a01c70e80fd1e0f68b4af19c8399628b3fe8be35
5
5
  SHA512:
6
- metadata.gz: e5cb7334b53cc21763ea48a91bcc05237e67d65708e9210071f5a73d8a739f96873a2afa9a6ce79e3a91e4eb5c5281ca421c7dd7f027c7fb28124e697a61c5df
7
- data.tar.gz: 02744ba8492b5ba8aa96f2218fd6b0d9e5258ea9c43793118ef07f611d7fc52ffc6268e8dc7371103710c582c056b1d570a350527e65c90d876979dad6c426b5
6
+ metadata.gz: 1e4ac342bf6f1643d17423ff77bc40c4d39b1d97777d1e47f46c95b6279b0938862c0c53b33b0f3fbe28cbf8e7b35ab7304155d32b9be5d14b420e1788b1d67b
7
+ data.tar.gz: 2a5baf203532eedb24ec9c85cd1404e987d9f115ac40bd725da81d17d42a26fe56e1ab9a788a5f91c75a76074c9024bac88aa92167a75a463b337f5514266fd6
data/Rakefile CHANGED
@@ -1 +1,11 @@
1
1
  require "bundler/gem_tasks"
2
+
3
+ desc 'Inline update the version file'
4
+ task :version, [:version] do |t, args|
5
+ version = args[:version]
6
+ fail "Error: Version not set\nUsage: rake version[x.y.z]" unless version
7
+ fail "Error: Version should be x.y.z format" unless version =~ /\d+\.\d+\.\d+/
8
+ version_file = File.expand_path('../lib/dockerhelper/version.rb', __FILE__)
9
+ status = system(%~sed -i -e "s/^ VERSION.*/ VERSION = '#{version}'/" #{version_file}~)
10
+ fail "Update version failed" unless status
11
+ end
@@ -9,9 +9,22 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["Josh McDade"]
10
10
  spec.email = ["josh.ncsu@gmail.com"]
11
11
 
12
- spec.summary = %q{Docker and Kubernetes helper scripts}
13
- spec.description = %q{Docker and Kubernetes helper scripts}
12
+ spec.summary = %q{Docker and Kubernetes helper tasks}
13
+ spec.description = %q{
14
+ This project was mainly created to automate the build, tag, and push
15
+ process of docker via rake tasks and reuse these across multiple projects.
16
+ It also provides tasks for generating Kubernetes replication controllers,
17
+ creating them in Kubernetes, and running rolling-update on Kubernetes.
18
+
19
+ I recognize the code is not high quality and I expect there are many bugs.
20
+ Hell, there are no unit tests!
21
+
22
+ Use with extreme caution! This gem is currently in active development with a high
23
+ risk of breaking changes every release (hence a <1 version).
24
+ }
25
+
14
26
  spec.homepage = "https://github.com/joshm1/dockerhelper"
27
+ spec.licenses = "MIT"
15
28
 
16
29
  # Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
17
30
  # delete this section to allow pushing this gem to any host.
@@ -5,14 +5,23 @@ module Dockerhelper
5
5
  extend ::Rake::DSL
6
6
 
7
7
  def self.init(config)
8
- build_tasks = [:pull, :docker_build, :repo_tag, :push]
8
+ build_tasks = [:pull, :prebuild, :docker_build, :repo_tag, :push]
9
9
  build_tasks << :'kube:gen_rc' if config.kubernetes?
10
10
 
11
11
  namespace :docker do
12
12
  namespace(config.environment) do
13
13
  desc 'Print config info'
14
14
  task :info do
15
- puts config.inspect
15
+ keys = %i(app_name git_root git_branch git_repo_url docker_repo
16
+ docker_image docker_tag rev_length dockerfile
17
+ docker_repo_tag_prefix environment kube_rc_template
18
+ kube_rc_dest_dir kube_rc_version env_vars prebuild_command
19
+ docker_repo_tag)
20
+ key_values = Hash[keys.map { |k| [k, config.send(k)] }]
21
+ max_key_length = keys.map(&:size).sort[-1]
22
+ key_values.each do |key, value|
23
+ puts sprintf("%#{max_key_length}s %s\n", key, value)
24
+ end
16
25
  end
17
26
 
18
27
  desc 'Prepare to build docker image'
@@ -58,7 +67,7 @@ module Dockerhelper
58
67
  end
59
68
 
60
69
  desc 'Run replication controller rolling-update'
61
- task :rolling_update => [:gen_rc] do
70
+ task :rolling_update do
62
71
  config.kubernetes.rolling_update
63
72
  end
64
73
 
@@ -1,3 +1,3 @@
1
1
  module Dockerhelper
2
- VERSION = '0.0.5'
2
+ VERSION = '0.0.6'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dockerhelper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh McDade
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-08-19 00:00:00.000000000 Z
11
+ date: 2015-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -38,7 +38,14 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.0'
41
- description: Docker and Kubernetes helper scripts
41
+ description: "\n This project was mainly created to automate the build, tag, and
42
+ push\n process of docker via rake tasks and reuse these across multiple projects.\n
43
+ \ It also provides tasks for generating Kubernetes replication controllers,\n
44
+ \ creating them in Kubernetes, and running rolling-update on Kubernetes.\n\n I
45
+ recognize the code is not high quality and I expect there are many bugs.\n Hell,
46
+ there are no unit tests!\n\n Use with extreme caution! This gem is currently
47
+ in active development with a high\n risk of breaking changes every release (hence
48
+ a <1 version).\n "
42
49
  email:
43
50
  - josh.ncsu@gmail.com
44
51
  executables: []
@@ -61,7 +68,8 @@ files:
61
68
  - lib/dockerhelper/rake.rb
62
69
  - lib/dockerhelper/version.rb
63
70
  homepage: https://github.com/joshm1/dockerhelper
64
- licenses: []
71
+ licenses:
72
+ - MIT
65
73
  metadata:
66
74
  allowed_push_host: https://rubygems.org
67
75
  post_install_message:
@@ -83,5 +91,5 @@ rubyforge_project:
83
91
  rubygems_version: 2.2.2
84
92
  signing_key:
85
93
  specification_version: 4
86
- summary: Docker and Kubernetes helper scripts
94
+ summary: Docker and Kubernetes helper tasks
87
95
  test_files: []