deployku 0.0.5 → 0.0.6

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
  SHA1:
3
- metadata.gz: 8b256b0dad72cce530ea2435b9b4399595f77721
4
- data.tar.gz: 5c98d716d4c87821a4daa7aa24611e3e6349b074
3
+ metadata.gz: 8bf681e9119d9a460dcea932706ef6c97d994e8e
4
+ data.tar.gz: 0718a9ec83de16285c676d1b80cd85d1cd6a8b03
5
5
  SHA512:
6
- metadata.gz: b16337b94894ce39953a96f19b8e07854410957ac9f5979548ef4269b281ca4e507485fe0e4903560d706c378f34d51ca999b027d8c3d6076b3be4c228a32654
7
- data.tar.gz: 3a824d3066bca52b68cd642d596ad0f3d9fc56d121bbd2d0fe4fe6081716ad7f7ac5acdaffb6d9c8019c44b05f5cd08902b0f5af145ccd7c662c0ff224923ecc
6
+ metadata.gz: 0fc18b22b70aca412f1fef8871a6077fb52a8b2267e60d4e4efe5c57d3011b52132f09bbd75470b0d1d61c647f5ded15960b30302c9997bf8106fe44a4311acc
7
+ data.tar.gz: 3dc31a673dfc9c99781a3ab73491dd1ce6c7d1040dd6314623aad8cf1527e16365b11f57dc0ab656c1ecf3334dbe47ab38fdb81c2cb9cc262d71916209a17baa
data/deployku.gemspec CHANGED
@@ -13,7 +13,7 @@ spec = Gem::Specification.new do |s|
13
13
  s.email = "pejuko@gmail.com"
14
14
  s.authors = ["Petr Kovář"]
15
15
  s.name = 'deployku'
16
- s.version = '0.0.5'
16
+ s.version = '0.0.6'
17
17
  s.date = Time.now.strftime("%Y-%m-%d")
18
18
  s.require_path = 'lib'
19
19
  s.files = ["bin/deployku", "README.md", "deployku.gemspec", "Rakefile", "LICENSE"]
@@ -41,7 +41,7 @@ module Deployku::Engine
41
41
  puts 'not implemented'
42
42
  end
43
43
 
44
- def rebuild(app_name, dir)
44
+ def rebuild(app_name, dir, nocache)
45
45
  puts 'not implemented'
46
46
  end
47
47
 
@@ -50,8 +50,8 @@ module Deployku
50
50
  describe :restart, '<APP>', 'restarts container', acl_app: { 0 => :admin }
51
51
  describe :logs, '<APP>', 'show app logs', acl_app: { 0 => :admin }
52
52
 
53
- describe :rebuild, '<APP> [REV]', 'rebuild container', acl_app: { 0 => :admin }
54
- def rebuild(app_name, new_rev=nil)
53
+ describe :rebuild, '<APP> [REV] [NOCACHE]', 'rebuild container. REV can be eg. master NOCACHE can be true', acl_app: { 0 => :admin }
54
+ def rebuild(app_name, new_rev=nil, nocache=false)
55
55
  app_dir = dir(app_name)
56
56
  app_name = File.basename(app_dir)
57
57
  Dir.mktmpdir('deployku_') do |tmp_dir|
@@ -95,7 +95,7 @@ module Deployku
95
95
  end
96
96
  end
97
97
 
98
- if Deployku::Engine.rebuild(app_name, tmp_dir)
98
+ if Deployku::Engine.rebuild(app_name, tmp_dir, nocache == 'true')
99
99
  plugin.volumes.each do |volume|
100
100
  config_add_volume(app_name, volume)
101
101
  end if plugin.respond_to?(:volumes)
@@ -26,8 +26,9 @@ module Deployku
26
26
  system "docker logs #{app_hash}"
27
27
  end
28
28
 
29
- def rebuild(app_name, dir)
30
- system "docker build -t #{app_name}:latest #{dir}"
29
+ def rebuild(app_name, dir, nocache)
30
+ nocache_str = nocache ? '--no-cache' : ''
31
+ system "docker build #{nocache_str} -t #{app_name}:latest #{dir}"
31
32
  end
32
33
 
33
34
  def running?(app_hash)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deployku
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
  - Petr Kovář