opswalrus 1.0.45 → 1.0.47

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ab0f69f8661c6d29f48d0ad70f4046b6d53a3dbe167958668e09005b2086f175
4
- data.tar.gz: 5159cfc4bb7cb0ed366b9f3197d3926c77bd22a6482f2a376c9f6baf4fb36238
3
+ metadata.gz: 9d9a70d6f9200acd372ab13f63628a04cffd1cd4509e3ac24af448b179a6f192
4
+ data.tar.gz: 750f7704aa249784a9261b2910a1c8b3786ba03b32e52fe16d07c8de82cced06
5
5
  SHA512:
6
- metadata.gz: 445960c704e60c61b49a54eb3ea9950fda2f8b0c124bb7d7876849a5d9985fc3eeba80d907d6fb0a90305eff6139bfde886756bdf5dc2d43b04685191dd872ad
7
- data.tar.gz: c78e9d383c7f9351d47b67b92664d5e407344ed305fc78bc15fb74829a68033c7d0f754c8f1e5d26ab06d61325a6ba9a09d7f9324d5676ec08008dd9b6d497d2
6
+ metadata.gz: 4774c0ec9370ecb0e7251131bcc8e6a192c6009e7d7200fbd93dacdddbcec68cf3b2042b086cb8be1f7310721a2303b9f3fd04e40a52c3aecc557ff711b060b6
7
+ data.tar.gz: 8a7c15b5c16182b806efc85e8e307d9d98f29715aa2e84b4067413b90484c9f19fc94b7e9c294845f48623c2cd776bc8d284ee2bde6e74d76af1d6f38d925345
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- opswalrus (1.0.45)
4
+ opswalrus (1.0.47)
5
5
  bcrypt_pbkdf (~> 1.1)
6
6
  binding_of_caller (~> 1.0)
7
7
  citrus (~> 3.0)
data/lib/opswalrus/app.rb CHANGED
@@ -219,9 +219,7 @@ module OpsWalrus
219
219
  set_pwd(__FILE__.to_pathname.dirname)
220
220
  bootstrap_ops_file = OpsFile.new(self, __FILE__.to_pathname.dirname.join("bootstrap.ops"))
221
221
  op = OperationRunner.new(self, bootstrap_ops_file)
222
- result = op.run([], params_json_hash: @params)
223
- info "Bootstrap results:"
224
- info result
222
+ op.run([], params_json_hash: @params)
225
223
  end
226
224
 
227
225
  # args is of the form ["github.com/davidkellis/my-package/sub-package1", "operation1", "arg1:val1", "arg2:val2", "arg3:val3"]
@@ -1,5 +1,15 @@
1
1
  # ssh_noprep in: :sequence do
2
2
  ssh_noprep do
3
3
  puts "Bootstrapping #{to_s} (alias=#{self.alias})"
4
- _bootstrap_host()
4
+ stdout, stderr, exit_status = _bootstrap_host()
5
+ if exit_status == 0
6
+ puts "Success - #{to_s} (alias=#{self.alias})"
7
+ else
8
+ stdout_report = stdout.lines.last(3).map {|line| " #{line}" }.join()
9
+ stderr_report = stderr.lines.last(3).map {|line| " #{line}" }.join()
10
+ report = "Failure - #{to_s} (alias=#{self.alias})"
11
+ report << "\n stdout:\n#{stdout_report}" unless stdout_report.empty?
12
+ report << "\n stderr:\n#{stderr_report}" unless stderr_report.empty?
13
+ puts report
14
+ end
5
15
  end
@@ -81,6 +81,7 @@ module OpsWalrus
81
81
  @_host.to_s
82
82
  end
83
83
 
84
+ # returns [stdout, stderr, exit_status]
84
85
  def _bootstrap_host
85
86
  # copy over bootstrap shell script
86
87
  # io = StringIO.new(bootstrap_shell_script)
@@ -89,8 +90,10 @@ module OpsWalrus
89
90
  io.close
90
91
  raise Error, "Unable to upload bootstrap shell script to remote host #{to_s} (alias=#{self.alias})" unless upload_success
91
92
  @_host.execute(:chmod, "755", "tmpopsbootstrap.sh")
92
- @_host.execute(:sh, "tmpopsbootstrap.sh")
93
- @_host.execute(:rm, "-f", "tmpopsbootstrap.sh")
93
+ sshkit_cmd = @_host.execute_cmd(:sh, "tmpopsbootstrap.sh")
94
+ [sshkit_cmd.full_stdout, sshkit_cmd.full_stderr, sshkit_cmd.exit_status]
95
+ ensure
96
+ @_host.execute(:rm, "-f", "tmpopsbootstrap.sh") rescue nil
94
97
  end
95
98
 
96
99
  def _zip_copy_and_run_ops_bundle(local_host, block)
@@ -1,3 +1,3 @@
1
1
  module OpsWalrus
2
- VERSION = "1.0.45"
2
+ VERSION = "1.0.47"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opswalrus
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.45
4
+ version: 1.0.47
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Ellis