depengine 3.0.9 → 3.0.10
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/lib/depengine/dsl/publisher.rb +10 -11
- data/lib/depengine/dsl/remote.rb +16 -6
- data/lib/depengine/publisher/ssh.rb +0 -3
- data/lib/depengine/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1973af1ae5ec0c527e493873a7d7c4d9d8f77cd8
|
4
|
+
data.tar.gz: ea5525a0662d01b95b7451601a7c195be4e0981a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b49ab018be3c446ff28fa5472fab70af05fee5237f7ab0c204b920c69b8bf8929b9e4abd803e24d4ec0d813d8bb32178d684dd8badd8d519d801388807d564e
|
7
|
+
data.tar.gz: 6ca99c2654ee22fea1885dc2629a7ee245f630439ea47d3f5698264cf3e9303e7532eb9180cecadac93c08a48de7d333008d1a5da2c2637d5088e6c618853157
|
@@ -25,10 +25,11 @@ module Deployment
|
|
25
25
|
publisher = ::Publisher::Sftp.new
|
26
26
|
publisher.remote_host = options[:remote_host] || @cdb['remote_host']
|
27
27
|
publisher.remote_user = options[:remote_user] || @cdb['remote_user']
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
28
|
+
if $recipe_config and ($recipe_config[:recipe_base_dir] || $recipe_config[:deploy_home])
|
29
|
+
publisher.ssh_key_file = File.join($recipe_config[:recipe_base_dir] || $recipe_config[:deploy_home], options[:ssh_key_file] || @cdb['ssh_key_file'])
|
30
|
+
else
|
31
|
+
publisher.ssh_key_file = options[:ssh_key_file] || @cdb['ssh_key_file']
|
32
|
+
end
|
32
33
|
|
33
34
|
Helper.validates_presence_of publisher.remote_host, "Remote host not set"
|
34
35
|
Helper.validates_presence_of publisher.remote_user, "Remote user not set"
|
@@ -45,13 +46,11 @@ module Deployment
|
|
45
46
|
publisher = ::Publisher::Sftp.new
|
46
47
|
publisher.remote_host = options[:remote_host] || @cdb['remote_host']
|
47
48
|
publisher.remote_user = options[:remote_user] || @cdb['remote_user']
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
Helper.validates_presence_of publisher.remote_host, "Remote host not set"
|
54
|
-
Helper.validates_presence_of publisher.remote_user, "Remote user not set"
|
49
|
+
if $recipe_config and ($recipe_config[:recipe_base_dir] || $recipe_config[:deploy_home])
|
50
|
+
publisher.ssh_key_file = File.join($recipe_config[:recipe_base_dir] || $recipe_config[:deploy_home], options[:ssh_key_file] || @cdb['ssh_key_file'])
|
51
|
+
else
|
52
|
+
publisher.ssh_key_file = options[:ssh_key_file] || @cdb['ssh_key_file']
|
53
|
+
end
|
55
54
|
|
56
55
|
publisher.chmod(path, permissions, options)
|
57
56
|
end
|
data/lib/depengine/dsl/remote.rb
CHANGED
@@ -9,7 +9,12 @@ module Deployment
|
|
9
9
|
publisher = ::Publisher::Ssh.new
|
10
10
|
publisher.remote_host = options[:remote_host] || @cdb['remote_host']
|
11
11
|
publisher.remote_user = options[:remote_user] || @cdb['remote_user']
|
12
|
-
|
12
|
+
if $recipe_config and ($recipe_config[:recipe_base_dir] || $recipe_config[:deploy_home])
|
13
|
+
publisher.ssh_key_file = File.join($recipe_config[:recipe_base_dir] || $recipe_config[:deploy_home], options[:ssh_key_file] || @cdb['ssh_key_file'])
|
14
|
+
else
|
15
|
+
publisher.ssh_key_file = options[:ssh_key_file] || @cdb['ssh_key_file']
|
16
|
+
end
|
17
|
+
|
13
18
|
publisher.remote_execute(command)
|
14
19
|
end
|
15
20
|
|
@@ -23,10 +28,11 @@ module Deployment
|
|
23
28
|
publisher = ::Publisher::Rsync.new
|
24
29
|
publisher.remote_host = options[:remote_host] || @cdb['remote_host']
|
25
30
|
publisher.remote_user = options[:remote_user] || @cdb['remote_user']
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
31
|
+
if $recipe_config and ($recipe_config[:recipe_base_dir] || $recipe_config[:deploy_home])
|
32
|
+
publisher.ssh_key_file = File.join($recipe_config[:recipe_base_dir] || $recipe_config[:deploy_home], options[:ssh_key_file] || @cdb['ssh_key_file'])
|
33
|
+
else
|
34
|
+
publisher.ssh_key_file = options[:ssh_key_file] || @cdb['ssh_key_file']
|
35
|
+
end
|
30
36
|
|
31
37
|
if options[:local].nil? or options[:local] == false
|
32
38
|
Helper.validates_presence_of publisher.remote_host, "Remote host not set"
|
@@ -50,7 +56,11 @@ module Deployment
|
|
50
56
|
publisher = ::Publisher::Ssh.new
|
51
57
|
publisher.remote_host = options[:remote_host] || @cdb['remote_host']
|
52
58
|
publisher.remote_user = options[:remote_user] || @cdb['remote_user']
|
53
|
-
|
59
|
+
if $recipe_config and ($recipe_config[:recipe_base_dir] || $recipe_config[:deploy_home])
|
60
|
+
publisher.ssh_key_file = File.join($recipe_config[:recipe_base_dir] || $recipe_config[:deploy_home], options[:ssh_key_file] || @cdb['ssh_key_file'])
|
61
|
+
else
|
62
|
+
publisher.ssh_key_file = options[:ssh_key_file] || @cdb['ssh_key_file']
|
63
|
+
end
|
54
64
|
publisher.remove_old_releases(path, num_of_releases_to_keep, release_name_shema)
|
55
65
|
end
|
56
66
|
|
@@ -9,9 +9,6 @@ module Publisher
|
|
9
9
|
Helper.validates_presence_of command, "No valid remote command given"
|
10
10
|
|
11
11
|
result = ''
|
12
|
-
if $recipe_config and ($recipe_config[:recipe_base_dir] || $recipe_config[:deploy_home])
|
13
|
-
@ssh_key_file = File.join($recipe_config[:recipe_base_dir] || $recipe_config[:deploy_home], ssh_key_file)
|
14
|
-
end
|
15
12
|
|
16
13
|
if not File.file? @ssh_key_file
|
17
14
|
$log.writer.error "Can not find SSH keyfile #{@ssh_key_file}"
|
data/lib/depengine/version.rb
CHANGED