boxci 0.0.36 → 0.0.37
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/boxci/tester.rb +17 -15
- data/lib/boxci/version.rb +1 -1
- data/lib/boxci.rb +1 -0
- 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: 5041f190911bcff97ac407b11a23db3e1a111c55
|
4
|
+
data.tar.gz: 8f520eedb1cf219b07f150277f4b94285c3b4edf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bec88ff45d7655b91f6b640f99c83caaac6cc1f913778f95d70d56c2cdab289baad78c6594282212b34a462955c447d1de5e337211343f3cfa9fd66f90348c89
|
7
|
+
data.tar.gz: b020392c1548ed7bcaf59f2595eae0c1167197608d3f4dad8bdd287b99ac20e5c6d672426c0963a53f4ab8eb4ce8177b453a028990b56263c75d47f3d3c0b661
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,12 @@ versions as well as provide a rough history.
|
|
6
6
|
|
7
7
|
#### Next Release
|
8
8
|
|
9
|
+
#### v0.0.37
|
10
|
+
|
11
|
+
- Re-enable cleanup
|
12
|
+
- Modified command success detection to rasie Boxci::CommandFailed error on
|
13
|
+
failure so that it triggers cleanup and short-circuit.
|
14
|
+
|
9
15
|
#### v0.0.36
|
10
16
|
|
11
17
|
- Fixed command success detection so it actually works properly.
|
data/lib/boxci/tester.rb
CHANGED
@@ -26,7 +26,7 @@ module Boxci
|
|
26
26
|
File.open('/tmp/boxci.log', 'a+') { |f| f.write("Got SIGTERM, going to cleanup...\n") }
|
27
27
|
|
28
28
|
begin
|
29
|
-
|
29
|
+
cleanup
|
30
30
|
rescue Errno::EPIPE => e
|
31
31
|
File.open('/tmp/boxci.log', 'a+') { |f| f.write("SIGTERM handler swallowed Errno::EPIPE exception\n") }
|
32
32
|
rescue => e
|
@@ -44,7 +44,7 @@ module Boxci
|
|
44
44
|
end
|
45
45
|
|
46
46
|
Signal.trap('SIGINT') do
|
47
|
-
|
47
|
+
cleanup
|
48
48
|
exit 255
|
49
49
|
end
|
50
50
|
|
@@ -67,14 +67,8 @@ module Boxci
|
|
67
67
|
install_vagrant_plugin
|
68
68
|
add_provider_box
|
69
69
|
end
|
70
|
-
|
71
|
-
|
72
|
-
exit 1
|
73
|
-
end
|
74
|
-
if !setup_ssh_config
|
75
|
-
say "ERROR: Failed to setup ssh config", :red
|
76
|
-
exit 1
|
77
|
-
end
|
70
|
+
spin_up_box
|
71
|
+
setup_ssh_config
|
78
72
|
install_puppet_on_box
|
79
73
|
provision_box
|
80
74
|
create_artifact_directory
|
@@ -87,7 +81,7 @@ module Boxci
|
|
87
81
|
f.write("test() method swallowed Errno::EPIPE exception\n")
|
88
82
|
end
|
89
83
|
ensure
|
90
|
-
|
84
|
+
cleanup
|
91
85
|
end
|
92
86
|
|
93
87
|
exit @tester_exit_code
|
@@ -172,9 +166,13 @@ module Boxci
|
|
172
166
|
def spin_up_box
|
173
167
|
inside @project_workspace_folder do
|
174
168
|
if verbose?
|
175
|
-
|
169
|
+
if !run "vagrant up --no-provision --provider #{provider}", :verbose => verbose?
|
170
|
+
raise Boxci::CommandFailed, "Failed to successfully run vagrant up --no-provision --provider #{provider}"
|
171
|
+
end
|
176
172
|
else
|
177
|
-
|
173
|
+
if !run "vagrant up --no-provision --provider #{provider}"
|
174
|
+
raise Boxci::CommandFailed, "Failed to successfully run vagrant up --no-provision --provider #{provider}"
|
175
|
+
end
|
178
176
|
end
|
179
177
|
end
|
180
178
|
end
|
@@ -182,9 +180,13 @@ module Boxci
|
|
182
180
|
def setup_ssh_config
|
183
181
|
inside @project_workspace_folder do
|
184
182
|
if verbose?
|
185
|
-
|
183
|
+
if !run "vagrant ssh-config > ssh-config.local", :verbose => verbose?
|
184
|
+
raise Boxci::CommandFailed, "Failed to successfully run vagrant ssh-config > ssh-config.local"
|
185
|
+
end
|
186
186
|
else
|
187
|
-
|
187
|
+
if !run "vagrant ssh-config > ssh-config.local"
|
188
|
+
raise Boxci::CommandFailed, "Failed to successfully run vagrant ssh-config > ssh-config.local"
|
189
|
+
end
|
188
190
|
end
|
189
191
|
end
|
190
192
|
end
|
data/lib/boxci/version.rb
CHANGED
data/lib/boxci.rb
CHANGED