-
Notifications
You must be signed in to change notification settings - Fork 0
/
t_deploy.rb
executable file
·45 lines (36 loc) · 1.06 KB
/
t_deploy.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#! /usr/bin/ruby
=begin
--------------------------------------------------------------------------------
Deploy VIVO, if Tomcat isn't running.
Don't just run the build script. Also process the templates for build.properties
and runtime.properties
If the build fails, write that down. We won't want to run until its fixed.
--------------------------------------------------------------------------------
=end
$: << File.dirname(File.expand_path(__FILE__))
require 'common'
def record_result(success)
Dir.mkdir($instance.file('_generated')) unless Dir.exist?($instance.file('_generated'))
File.open("#{$instance.file('_generated/successful')}", "w") do |file|
file.puts("deploy_success = #{success}")
end
end
#
# ---------------------------------------------------------
# MAIN ROUTINE
# ---------------------------------------------------------
#
begin
$instance.tomcat.confirm
$instance.distro.deploy($instance.all_props)
record_result(true)
rescue SettingsError
puts
puts $!
puts
record_result(false)
rescue UserInputError
puts
puts $!
puts
end