luban 0.10.13 → 0.11.0
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/CHANGELOG.md +19 -0
- data/lib/luban/deployment/cli/application/constructor.rb +1 -1
- data/lib/luban/deployment/cli/application/publisher.rb +1 -5
- data/lib/luban/deployment/cli/application/repository.rb +1 -7
- data/lib/luban/deployment/cli/application/worker.rb +1 -1
- data/lib/luban/deployment/cli/package/worker.rb +5 -1
- data/lib/luban/deployment/cli/service/controller.rb +2 -2
- data/lib/luban/deployment/helpers/utils.rb +5 -0
- data/lib/luban/deployment/packages/bundler.rb +1 -1
- data/lib/luban/deployment/packages/gem.rb +6 -2
- data/lib/luban/deployment/sshkit_refinements.rb +15 -0
- data/lib/luban/deployment/version.rb +1 -1
- data/lib/luban/deployment/worker/paths.rb +8 -8
- data/lib/luban/deployment.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 28913085e6dfeed7d1c4c564666a631a214bad59
|
4
|
+
data.tar.gz: 6db8621b76547ad88298ed2dafc0bab3d680f4ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 667c8e649af0e5c8e6927447cca4d47033dfda63b3ff71fc3083a43ebfe3bd428d68bafa59ed3e5491af202dd83d5ad637ba96d20e0aeb007cd56377cf29c714
|
7
|
+
data.tar.gz: e1b788bdd1192440b8ea611316008281e9a251ecc552acd59cb59057890230f62dc6664488660a9250814d0fe1bd3fcde5884691b6f65d1b5f86957f69db65e6
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,24 @@
|
|
1
1
|
# Change log
|
2
2
|
|
3
|
+
## Version 0.11.0 (Jan 04, 2017)
|
4
|
+
|
5
|
+
New features:
|
6
|
+
* Restructured Luban project prepared for containerization with docker support
|
7
|
+
* Relocated packages installation path to luban root
|
8
|
+
* Relocated releases deployment path to luban root
|
9
|
+
|
10
|
+
Minor enhancements:
|
11
|
+
* Added convenient util method, #with_clean_env, to cleanup Bundler environment before yielding the given code block
|
12
|
+
* Cleaned up Bundler environment:
|
13
|
+
* In Gem Installer before any gem installations
|
14
|
+
* In Bundler Installer before checking the version for installed Bundler
|
15
|
+
* In Publisher before installing gems from cache
|
16
|
+
* In App Repository before bundling gems required by application
|
17
|
+
* In Service Controller for process control actions
|
18
|
+
|
19
|
+
Bug fixes:
|
20
|
+
* Refined SSHKit::Backend::Local and SSHKit::Runner::Abstract to handle local host object properly
|
21
|
+
|
3
22
|
## Version 0.10.13 (Dec 17, 2016)
|
4
23
|
|
5
24
|
Minor enhancements:
|
@@ -163,11 +163,7 @@ module Luban
|
|
163
163
|
assure_dirs(bundle_config_path, gems_cache_path, bundle_path)
|
164
164
|
sync_gems_cache
|
165
165
|
sync_locked_gemfile
|
166
|
-
|
167
|
-
Bundler.with_clean_env { install_gems_from_cache }
|
168
|
-
else
|
169
|
-
install_gems_from_cache
|
170
|
-
end
|
166
|
+
with_clean_env { install_gems_from_cache }
|
171
167
|
end
|
172
168
|
|
173
169
|
def sync_gems_cache
|
@@ -184,13 +184,7 @@ module Luban
|
|
184
184
|
bundle_path = Pathname.new('vendor').join('bundle')
|
185
185
|
if release_with_gemfile?(gemfile_path)
|
186
186
|
assure_dirs(gems_path)
|
187
|
-
|
188
|
-
Bundler.with_clean_env do
|
189
|
-
bundle_gems!(gemfile_path, gems_cache, bundle_path)
|
190
|
-
end
|
191
|
-
else
|
192
|
-
bundle_gems!(gemfile_path, gems_cache, bundle_path)
|
193
|
-
end
|
187
|
+
with_clean_env { bundle_gems!(gemfile_path, gems_cache, bundle_path) }
|
194
188
|
else
|
195
189
|
{}
|
196
190
|
end
|
@@ -41,8 +41,12 @@ module Luban
|
|
41
41
|
@current_bin_path ||= current_path.join('bin')
|
42
42
|
end
|
43
43
|
|
44
|
+
def packages_path
|
45
|
+
@packages_path ||= super.join(project)
|
46
|
+
end
|
47
|
+
|
44
48
|
def package_path
|
45
|
-
@package_path ||=
|
49
|
+
@package_path ||= packages_path.join(package_name)
|
46
50
|
end
|
47
51
|
|
48
52
|
def package_versions_path
|
@@ -199,8 +199,8 @@ module Luban
|
|
199
199
|
succeeded
|
200
200
|
end
|
201
201
|
|
202
|
-
def start_process!; capture(start_command); end
|
203
|
-
def stop_process!; capture(stop_command); end
|
202
|
+
def start_process!; with_clean_env { capture(start_command) }; end
|
203
|
+
def stop_process!; with_clean_env { capture(stop_command) }; end
|
204
204
|
|
205
205
|
def check_process!
|
206
206
|
if pid_file_missing?
|
@@ -206,6 +206,11 @@ module Luban
|
|
206
206
|
Time.now().strftime("%d/%m/%Y %H:%M:%S")
|
207
207
|
end
|
208
208
|
|
209
|
+
def with_clean_env
|
210
|
+
return unless block_given?
|
211
|
+
defined?(Bundler) ? Bundler.with_clean_env { yield } : yield
|
212
|
+
end
|
213
|
+
|
209
214
|
#def method_missing(sym, *args, &blk)
|
210
215
|
# backend.respond_to?(sym) ? backend.send(sym, *args, &blk) : super
|
211
216
|
#end
|
@@ -58,11 +58,15 @@ module Luban
|
|
58
58
|
end
|
59
59
|
|
60
60
|
def install_gem!
|
61
|
-
|
61
|
+
with_clean_env do
|
62
|
+
test("#{gem_executable} install #{install_opts.join(' ')} #{src_cache_path} >> #{install_log_file_path} 2>&1")
|
63
|
+
end
|
62
64
|
end
|
63
65
|
|
64
66
|
def uninstall_gem!
|
65
|
-
|
67
|
+
with_clean_env do
|
68
|
+
test("#{gem_executable} uninstall #{package_name} -a -x -I >> #{install_log_file_path} 2>&1")
|
69
|
+
end
|
66
70
|
end
|
67
71
|
end
|
68
72
|
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
class SSHKit::Backend::Local
|
2
|
+
def initialize(host = Host.new(:local), &block)
|
3
|
+
super
|
4
|
+
end
|
5
|
+
end
|
6
|
+
|
7
|
+
class SSHKit::Runner::Abstract
|
8
|
+
def backend(host, &block)
|
9
|
+
if host.local?
|
10
|
+
SSHKit::Backend::Local.new(host, &block)
|
11
|
+
else
|
12
|
+
SSHKit.config.backend.new(host, &block)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -17,6 +17,10 @@ module Luban
|
|
17
17
|
end
|
18
18
|
|
19
19
|
module Remote
|
20
|
+
def releases_path
|
21
|
+
@releases_path ||= luban_root_path.join('releases')
|
22
|
+
end
|
23
|
+
|
20
24
|
def env_path
|
21
25
|
@env_path ||= luban_root_path.join('env')
|
22
26
|
end
|
@@ -54,10 +58,6 @@ module Luban
|
|
54
58
|
@app_tmp_path ||= app_path.join('tmp')
|
55
59
|
end
|
56
60
|
|
57
|
-
def releases_path
|
58
|
-
@releases_path ||= app_path.join('releases')
|
59
|
-
end
|
60
|
-
|
61
61
|
def shared_path
|
62
62
|
@shared_path ||= app_path.join('shared')
|
63
63
|
end
|
@@ -70,13 +70,13 @@ module Luban
|
|
70
70
|
@unset_envrc_file ||= app_path.join(".unset_envrc")
|
71
71
|
end
|
72
72
|
|
73
|
-
def
|
74
|
-
@
|
73
|
+
def packages_path
|
74
|
+
@packages_path ||= luban_root_path.join('packages')
|
75
75
|
end
|
76
76
|
|
77
77
|
def package_install_path(package_name)
|
78
|
-
|
79
|
-
|
78
|
+
packages_path.join(project, package_name.to_s, 'versions',
|
79
|
+
packages[package_name.to_sym].current_version)
|
80
80
|
end
|
81
81
|
|
82
82
|
def package_bin_path(package_name)
|
data/lib/luban/deployment.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: luban
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rubyist Lei
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: luban-cli
|
@@ -154,6 +154,7 @@ files:
|
|
154
154
|
- lib/luban/deployment/packages/yaml.rb
|
155
155
|
- lib/luban/deployment/parameters.rb
|
156
156
|
- lib/luban/deployment/runner.rb
|
157
|
+
- lib/luban/deployment/sshkit_refinements.rb
|
157
158
|
- lib/luban/deployment/templates/application/config/deploy.rb.erb
|
158
159
|
- lib/luban/deployment/templates/application/config/deploy/__stage.rb.erb
|
159
160
|
- lib/luban/deployment/templates/application/config/deploy/__stage/env_vars.rb
|