Class: UcbDeployer::JiraDeployer
Constant Summary
Constants inherited
from Deployer
Deployer::CONFIG_OPTIONS
Instance Attribute Summary
Attributes inherited from Deployer
#debug_mode, #version
Instance Method Summary
collapse
Methods inherited from Deployer
#debug, #deployer_home, #disable_web, #enable_web, #info, #load_config, #maintenance_template, #resources_dir
Constructor Details
#initialize(config_file = "#{ENV['HOME']}/.ucb_deployer/config/jira/deploy.yml") ⇒ JiraDeployer
Returns a new instance of JiraDeployer.
4
5
6
7
|
# File 'lib/ucb_deployer/jira_deployer.rb', line 4
def initialize(config_file = "#{ENV['HOME']}/.ucb_deployer/config/jira/deploy.yml")
self.debug("Using config file: #{config_file}")
self.load_config(config_file)
end
|
Instance Method Details
#build ⇒ Object
26
27
28
29
30
|
# File 'lib/ucb_deployer/jira_deployer.rb', line 26
def build()
self.info("Building application.")
Dir.chdir("#{self.build_dir()}/src") { `sh #{self.build_dir()}/src/build.sh` }
end
|
19
20
21
22
23
24
|
# File 'lib/ucb_deployer/jira_deployer.rb', line 19
def configure()
self.info("Configuring application.")
tasks = self.load_tasks()
self.execute_config_tasks(tasks)
end
|
#deploy ⇒ Object
32
33
34
35
36
37
38
39
40
41
42
43
|
# File 'lib/ucb_deployer/jira_deployer.rb', line 32
def deploy()
self.info("Deploying application.")
if File.exists?("#{self.deploy_dir()}/#{self.war_name()}")
FileUtils.rm_rf(Dir["#{self.deploy_dir()}/#{self.war_name()}"])
end
FileUtils.mkdir("#{self.deploy_dir()}/#{self.war_name()}")
`mv #{self.build_dir()}/src/dist-tomcat/atlassian-jira-*.war #{self.deploy_dir()}/#{self.war_name()}/#{self.war_name()}.war`
`cd #{self.deploy_dir()}/#{self.war_name()}/ && jar -xvf #{self.war_name()}.war`
`rm #{self.deploy_dir()}/#{self.war_name()}/#{self.war_name()}.war`
end
|
#export ⇒ Object
9
10
11
12
13
14
15
16
17
|
# File 'lib/ucb_deployer/jira_deployer.rb', line 9
def export()
self.info("Exporting from: #{self.svn_project_url()}/jira-#{self.version()}")
Dir.chdir("#{self.build_dir()}") do
FileUtils.rm_rf("#{self.build_dir()}/src")
`svn export #{self.svn_project_url()}/jira-#{self.version()}`
FileUtils.mv("jira-#{self.version()}", "src")
end
end
|
#rollback ⇒ Object
45
46
|
# File 'lib/ucb_deployer/jira_deployer.rb', line 45
def rollback()
end
|