escualo 0.9.0 → 0.9.1
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/commands/artifact.rb +10 -6
- data/lib/commands/bootstrap.rb +6 -0
- data/lib/commands/plugin.rb +1 -1
- data/lib/escualo/version.rb +1 -1
- data/lib/ssh/local_session.rb +5 -2
- 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: 3bf366a2ccdefdd9c7d0763c4c3dcee51957e733
|
4
|
+
data.tar.gz: f0359ce5d57083e5322fdd6c5176a3ba85c54f36
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf1e12413710310f5645da34bdd221755c70895c5f1b41d5309f2f2d6c42c6b3f848fbe044000f48a8c9e817c2af66cab5ff710e74f62284312e279ea187a162
|
7
|
+
data.tar.gz: 367a8ef0bc7a27840a904693da66aa56ab5273e3a5d8f3faf9cfd6da730eb3633566a2cc4a7e9caa0d3c0c054cc4737a34d96fb00fa2a440b27e7c992c0d31c1
|
data/lib/commands/artifact.rb
CHANGED
@@ -19,9 +19,13 @@ command 'artifact destroy' do |c|
|
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
|
-
def
|
23
|
-
|
24
|
-
|
22
|
+
def check_created(kind, name)
|
23
|
+
if Escualo::Artifact.present?(ssh, name)
|
24
|
+
say "#{kind.titleize} #{name} created successfully"
|
25
|
+
say "Now you can deploy this #{kind}"
|
26
|
+
else
|
27
|
+
abort "Failed to create artifact #{name}"
|
28
|
+
end
|
25
29
|
end
|
26
30
|
|
27
31
|
command 'artifact create service' do |c|
|
@@ -60,7 +64,7 @@ command 'artifact create service' do |c|
|
|
60
64
|
Escualo::Artifact.create_push_infra ssh, name: name, service: true
|
61
65
|
end
|
62
66
|
|
63
|
-
|
67
|
+
check_created 'service', name
|
64
68
|
end
|
65
69
|
end
|
66
70
|
end
|
@@ -84,7 +88,7 @@ command 'artifact create site' do |c|
|
|
84
88
|
step 'Creating push infrastructure' do
|
85
89
|
Escualo::Artifact.create_push_infra ssh, name: name, static: true
|
86
90
|
end
|
87
|
-
|
91
|
+
check_created 'site', name
|
88
92
|
end
|
89
93
|
end
|
90
94
|
end
|
@@ -108,7 +112,7 @@ command 'artifact create executable' do |c|
|
|
108
112
|
step 'Creating push infrastructure' do
|
109
113
|
Escualo::Artifact.create_push_infra ssh, name: name, executable: true
|
110
114
|
end
|
111
|
-
|
115
|
+
check_created 'executable', name
|
112
116
|
end
|
113
117
|
end
|
114
118
|
end
|
data/lib/commands/bootstrap.rb
CHANGED
@@ -48,6 +48,12 @@ command 'bootstrap' do |c|
|
|
48
48
|
step 'Setup artifact directories...' do
|
49
49
|
Escualo::Artifact.setup ssh
|
50
50
|
end
|
51
|
+
|
52
|
+
if Escualo::Env.present?(ssh, :ESCUALO_BASE_VERSION)
|
53
|
+
say 'Host bootstrapped successfully '
|
54
|
+
else
|
55
|
+
abort 'bootstrapping failed'
|
56
|
+
end
|
51
57
|
end
|
52
58
|
end
|
53
59
|
end
|
data/lib/commands/plugin.rb
CHANGED
data/lib/escualo/version.rb
CHANGED
data/lib/ssh/local_session.rb
CHANGED
@@ -20,7 +20,9 @@ class Net::SSH::Connection::LocalSession
|
|
20
20
|
include Net::SSH::Connection::Upload
|
21
21
|
|
22
22
|
def exec!(command)
|
23
|
-
Open3.capture2e(command)
|
23
|
+
out, status = Open3.capture2e(command)
|
24
|
+
raise out unless status.success?
|
25
|
+
out
|
24
26
|
end
|
25
27
|
|
26
28
|
def upload_file!(file, destination)
|
@@ -28,10 +30,11 @@ class Net::SSH::Connection::LocalSession
|
|
28
30
|
end
|
29
31
|
|
30
32
|
def tell!(command)
|
31
|
-
Open3.popen2e command do |_input, output|
|
33
|
+
Open3.popen2e command do |_input, output, wait|
|
32
34
|
output.each do |line|
|
33
35
|
$stdout.print line
|
34
36
|
end
|
37
|
+
raise "command #{command} failed" unless wait.value.success?
|
35
38
|
end
|
36
39
|
end
|
37
40
|
|