mobilize-ssh 1.299 → 1.351
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.
- data/README.md +20 -10
- data/lib/mobilize-ssh/handlers/git.rb +10 -1
- data/lib/mobilize-ssh/version.rb +1 -1
- data/lib/samples/git.yml +34 -0
- data/lib/samples/ssh.yml +0 -3
- data/mobilize-ssh.gemspec +1 -1
- metadata +7 -6
data/README.md
CHANGED
|
@@ -169,9 +169,13 @@ The Git configuration consists of:
|
|
|
169
169
|
|
|
170
170
|
Each domain has:
|
|
171
171
|
* a host;
|
|
172
|
-
* a key (optional); If you don't need an ssh key to access the repo, remove that row from the configuration file.
|
|
173
|
-
* this is the relative path of the ssh key required to access the repository.
|
|
174
172
|
* a user, which is the user used for the git clone command.
|
|
173
|
+
* a set of repo keys (optional) which correspond to "deploy keys" on
|
|
174
|
+
github. Each repo must have its own ssh key, and the public key must be
|
|
175
|
+
stored in the repo.
|
|
176
|
+
* if your repo doesn't need an ssh key to work, this is not necessary
|
|
177
|
+
to add.
|
|
178
|
+
|
|
175
179
|
|
|
176
180
|
Sample git.yml:
|
|
177
181
|
|
|
@@ -180,27 +184,33 @@ Sample git.yml:
|
|
|
180
184
|
development:
|
|
181
185
|
domains:
|
|
182
186
|
private:
|
|
183
|
-
host: github
|
|
184
|
-
key: config/mobilize/ssh_private.key
|
|
187
|
+
host: github.private.com
|
|
185
188
|
user: git
|
|
189
|
+
repo_keys:
|
|
190
|
+
"repo_path_1": 'local/path/to/key1'
|
|
191
|
+
"repo_path_2": 'local/path/to/key1'
|
|
186
192
|
public:
|
|
187
193
|
host: github.com
|
|
188
194
|
user: git
|
|
189
195
|
test:
|
|
190
196
|
domains:
|
|
191
|
-
private:
|
|
192
|
-
host: github.<domain>.com
|
|
193
|
-
key: config/mobilize/ssh_private.key
|
|
194
|
-
user: git
|
|
195
197
|
public:
|
|
196
198
|
host: github.com
|
|
197
199
|
user: git
|
|
200
|
+
private:
|
|
201
|
+
host: github.private.com
|
|
202
|
+
user: git
|
|
203
|
+
repo_keys:
|
|
204
|
+
"repo_path_1": 'local/path/to/key1'
|
|
205
|
+
"repo_path_2": 'local/path/to/key1'
|
|
198
206
|
production:
|
|
199
207
|
domains:
|
|
200
208
|
private:
|
|
201
|
-
host: github
|
|
202
|
-
key: config/mobilize/ssh_private.key
|
|
209
|
+
host: github.private.com
|
|
203
210
|
user: git
|
|
211
|
+
repo_keys:
|
|
212
|
+
"repo_path_1": 'local/path/to/key1'
|
|
213
|
+
"repo_path_2": 'local/path/to/key1'
|
|
204
214
|
public:
|
|
205
215
|
host: github.com
|
|
206
216
|
user: git
|
|
@@ -16,6 +16,14 @@ module Mobilize
|
|
|
16
16
|
Git.domains.first
|
|
17
17
|
end
|
|
18
18
|
|
|
19
|
+
def Git.repo_key(domain,repo)
|
|
20
|
+
begin
|
|
21
|
+
Git.config['domains'][domain]['repo_keys'][repo]
|
|
22
|
+
rescue
|
|
23
|
+
nil #no key for public repos
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
|
|
19
27
|
# converts a source path or target path to a dst in the context of handler and stage
|
|
20
28
|
def Git.path_to_dst(path,stage_path,gdrive_slot)
|
|
21
29
|
red_path = path.split("://").last
|
|
@@ -74,7 +82,8 @@ module Mobilize
|
|
|
74
82
|
#specified folder
|
|
75
83
|
def Git.pull(domain,repo,revision,run_dir=Dir.mktmpdir)
|
|
76
84
|
domain_properties = Git.config['domains'][domain]
|
|
77
|
-
user,host
|
|
85
|
+
user,host= ['user','host'].map{|k| domain_properties[k]}
|
|
86
|
+
key = Git.repo_key(domain,repo)
|
|
78
87
|
#create folder for repo and command
|
|
79
88
|
run_file_path = run_dir + "/cmd.sh"
|
|
80
89
|
#put together command
|
data/lib/mobilize-ssh/version.rb
CHANGED
data/lib/samples/git.yml
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
development:
|
|
3
|
+
domains:
|
|
4
|
+
private:
|
|
5
|
+
host: github.private.com
|
|
6
|
+
user: git
|
|
7
|
+
repo_keys:
|
|
8
|
+
"repo_path_1": 'local/path/to/key1'
|
|
9
|
+
"repo_path_2": 'local/path/to/key1'
|
|
10
|
+
public:
|
|
11
|
+
host: github.com
|
|
12
|
+
user: git
|
|
13
|
+
test:
|
|
14
|
+
domains:
|
|
15
|
+
public:
|
|
16
|
+
host: github.com
|
|
17
|
+
user: git
|
|
18
|
+
private:
|
|
19
|
+
host: github.private.com
|
|
20
|
+
user: git
|
|
21
|
+
repo_keys:
|
|
22
|
+
"repo_path_1": 'local/path/to/key1'
|
|
23
|
+
"repo_path_2": 'local/path/to/key1'
|
|
24
|
+
production:
|
|
25
|
+
domains:
|
|
26
|
+
private:
|
|
27
|
+
host: github.private.com
|
|
28
|
+
user: git
|
|
29
|
+
repo_keys:
|
|
30
|
+
"repo_path_1": 'local/path/to/key1'
|
|
31
|
+
"repo_path_2": 'local/path/to/key1'
|
|
32
|
+
public:
|
|
33
|
+
host: github.com
|
|
34
|
+
user: git
|
data/lib/samples/ssh.yml
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
---
|
|
2
2
|
development:
|
|
3
|
-
tmp_file_dir: tmp/file/
|
|
4
3
|
nodes:
|
|
5
4
|
dev_node:
|
|
6
5
|
sudoers:
|
|
@@ -17,7 +16,6 @@ development:
|
|
|
17
16
|
port: 22
|
|
18
17
|
user: gateway_user
|
|
19
18
|
test:
|
|
20
|
-
tmp_file_dir: tmp/file/
|
|
21
19
|
nodes:
|
|
22
20
|
test_node:
|
|
23
21
|
sudoers:
|
|
@@ -34,7 +32,6 @@ test:
|
|
|
34
32
|
port: 22
|
|
35
33
|
user: gateway_user
|
|
36
34
|
production:
|
|
37
|
-
tmp_file_dir: tmp/file/
|
|
38
35
|
nodes:
|
|
39
36
|
prod_node:
|
|
40
37
|
sudoers:
|
data/mobilize-ssh.gemspec
CHANGED
|
@@ -16,7 +16,7 @@ Gem::Specification.new do |gem|
|
|
|
16
16
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
|
17
17
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
|
18
18
|
gem.require_paths = ["lib"]
|
|
19
|
-
gem.add_runtime_dependency "mobilize-base","1.
|
|
19
|
+
gem.add_runtime_dependency "mobilize-base","1.351"
|
|
20
20
|
gem.add_runtime_dependency "net-ssh"
|
|
21
21
|
gem.add_runtime_dependency "net-scp"
|
|
22
22
|
gem.add_runtime_dependency "net-ssh-gateway"
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mobilize-ssh
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: '1.
|
|
4
|
+
version: '1.351'
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2013-04-
|
|
12
|
+
date: 2013-04-25 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: mobilize-base
|
|
@@ -18,7 +18,7 @@ dependencies:
|
|
|
18
18
|
requirements:
|
|
19
19
|
- - '='
|
|
20
20
|
- !ruby/object:Gem::Version
|
|
21
|
-
version: '1.
|
|
21
|
+
version: '1.351'
|
|
22
22
|
type: :runtime
|
|
23
23
|
prerelease: false
|
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -26,7 +26,7 @@ dependencies:
|
|
|
26
26
|
requirements:
|
|
27
27
|
- - '='
|
|
28
28
|
- !ruby/object:Gem::Version
|
|
29
|
-
version: '1.
|
|
29
|
+
version: '1.351'
|
|
30
30
|
- !ruby/object:Gem::Dependency
|
|
31
31
|
name: net-ssh
|
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -96,6 +96,7 @@ files:
|
|
|
96
96
|
- lib/mobilize-ssh/helpers/ssh_helper.rb
|
|
97
97
|
- lib/mobilize-ssh/tasks.rb
|
|
98
98
|
- lib/mobilize-ssh/version.rb
|
|
99
|
+
- lib/samples/git.yml
|
|
99
100
|
- lib/samples/ssh.yml
|
|
100
101
|
- mobilize-ssh.gemspec
|
|
101
102
|
- test/code.rb
|
|
@@ -119,7 +120,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
119
120
|
version: '0'
|
|
120
121
|
segments:
|
|
121
122
|
- 0
|
|
122
|
-
hash:
|
|
123
|
+
hash: -852942607763890721
|
|
123
124
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
124
125
|
none: false
|
|
125
126
|
requirements:
|
|
@@ -128,7 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
128
129
|
version: '0'
|
|
129
130
|
segments:
|
|
130
131
|
- 0
|
|
131
|
-
hash:
|
|
132
|
+
hash: -852942607763890721
|
|
132
133
|
requirements: []
|
|
133
134
|
rubyforge_project:
|
|
134
135
|
rubygems_version: 1.8.25
|