ucb_deployer 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Manifest +19 -15
- data/README.txt +67 -0
- data/Rakefile +1 -3
- data/TODO.txt +5 -0
- data/bin/deployer +6 -5
- data/lib/ucb_deployer/confluence_deployer.rb +150 -0
- data/lib/ucb_deployer/deployer.rb +115 -0
- data/lib/ucb_deployer/jira_deployer.rb +77 -0
- data/lib/ucb_deployer.rb +46 -0
- data/{cas_web.xml → resources/confluence_cas_web.xml} +2 -1
- data/resources/jdom.jar +0 -0
- data/resources/jira_cas_web.xml +95 -0
- data/resources/soulwing-casclient-0.5.3.jar +0 -0
- data/spec/fixtures/{bad_dot_cdeprc → confluence/bad_deploy.yml} +0 -0
- data/spec/{build/confluence/src/confluence/WEB-INF/classes → fixtures/confluence}/confluence-init.properties +0 -0
- data/spec/fixtures/{dot_cdeprc → confluence/deploy.yml} +1 -1
- data/spec/{build/confluence/src/confluence/WEB-INF/classes → fixtures/confluence}/seraph-config.xml +0 -0
- data/spec/{build/confluence/src/confluence/WEB-INF → fixtures/confluence}/web.xml +0 -0
- data/spec/{build/confluence/lib/soulwing-casclient-x.x.x.jar → fixtures/jira/web.xml} +0 -0
- data/spec/spec_helper.rb +11 -9
- data/spec/{confluence_deployer → ucb_deployer}/confluence_deployer_spec.rb +21 -17
- data/spec/{build/confluence/src/confluence/WEB-INF/lib/postgresql-x.x.x.jar → ucb_deployer/jira_deployer_spec.rb} +0 -0
- data/spec/{build/confluence/src/confluence/WEB-INF/lib/soulwing-casclient-x.x.x.jar → ucb_deployer/ucb_deployer_spec.rb} +0 -0
- data/ucb_deployer.gemspec +4 -4
- metadata +27 -20
- data/lib/confluence_deployer.rb +0 -228
- data/spec/fixtures/confluence-init.properties +0 -41
- data/spec/fixtures/seraph-config.xml +0 -46
- data/spec/fixtures/web.xml +0 -1016
data/Manifest
CHANGED
@@ -1,19 +1,23 @@
|
|
1
|
+
Manifest
|
1
2
|
README.txt
|
2
3
|
Rakefile
|
4
|
+
TODO.txt
|
3
5
|
bin/deployer
|
4
|
-
|
5
|
-
lib/confluence_deployer.rb
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
spec/
|
13
|
-
spec/fixtures/
|
14
|
-
spec/fixtures/confluence
|
15
|
-
spec/fixtures/
|
16
|
-
spec/fixtures/
|
17
|
-
spec/fixtures/web.xml
|
6
|
+
lib/ucb_deployer.rb
|
7
|
+
lib/ucb_deployer/confluence_deployer.rb
|
8
|
+
lib/ucb_deployer/deployer.rb
|
9
|
+
lib/ucb_deployer/jira_deployer.rb
|
10
|
+
resources/confluence_cas_web.xml
|
11
|
+
resources/jdom.jar
|
12
|
+
resources/jira_cas_web.xml
|
13
|
+
resources/soulwing-casclient-0.5.3.jar
|
14
|
+
spec/fixtures/confluence/bad_deploy.yml
|
15
|
+
spec/fixtures/confluence/confluence-init.properties
|
16
|
+
spec/fixtures/confluence/deploy.yml
|
17
|
+
spec/fixtures/confluence/seraph-config.xml
|
18
|
+
spec/fixtures/confluence/web.xml
|
19
|
+
spec/fixtures/jira/web.xml
|
18
20
|
spec/spec_helper.rb
|
19
|
-
|
21
|
+
spec/ucb_deployer/confluence_deployer_spec.rb
|
22
|
+
spec/ucb_deployer/jira_deployer_spec.rb
|
23
|
+
spec/ucb_deployer/ucb_deployer_spec.rb
|
data/README.txt
CHANGED
@@ -0,0 +1,67 @@
|
|
1
|
+
|
2
|
+
= UCB Deployer
|
3
|
+
|
4
|
+
UCB Deployer is gem to automate confluence and jira deployments to Tomcat.
|
5
|
+
|
6
|
+
|
7
|
+
== Getting Started
|
8
|
+
|
9
|
+
=== Installation
|
10
|
+
gem install ucb_deployer
|
11
|
+
|
12
|
+
|
13
|
+
=== Assumptions
|
14
|
+
We assume __Jira__ and __Confluence__ both have their own instance of tomcat (their own
|
15
|
+
$CATALINA_HOME). For more information on this type of setup see:
|
16
|
+
|
17
|
+
http://wikihub.berkeley.edu/x/RQAnAg
|
18
|
+
|
19
|
+
We also assume the following __config/__ file is setup for each app:
|
20
|
+
|
21
|
+
$HOME/config/confluence/deploy.yml
|
22
|
+
$HOME/config/jira/deploy.yml
|
23
|
+
|
24
|
+
Where $HOME is the home directory of the user that will be doing the deployments:
|
25
|
+
we are using a special user __app_relmgt__ for this purpose.
|
26
|
+
|
27
|
+
=== Configuration
|
28
|
+
|
29
|
+
The deploy.yml files for __Jira__ and __Confluence__ both accept the following options:
|
30
|
+
|
31
|
+
* build_dir
|
32
|
+
* deploy_dir
|
33
|
+
* war_name
|
34
|
+
* cas_service_url
|
35
|
+
* cas_server_url
|
36
|
+
* data_dir
|
37
|
+
* svn_username
|
38
|
+
* svn_project_url
|
39
|
+
|
40
|
+
Assuming we had the following directories setup:
|
41
|
+
# where we deploy from
|
42
|
+
$HOME=/home/app_relmgt
|
43
|
+
|
44
|
+
# where we run jira (confluence would have it's own dir: /var/lib/confluence)
|
45
|
+
$JIRA_HOME=/var/lib/jira
|
46
|
+
|
47
|
+
$HOME/build/jira/src
|
48
|
+
$HOME/build/jira/lib
|
49
|
+
|
50
|
+
Our __deploy.yml__ file would look like so:
|
51
|
+
|
52
|
+
build_dir: /home/app_relmgt/build
|
53
|
+
deploy_dir: /var/lib/jira/tomcat5/webapps
|
54
|
+
war_name: ROOT
|
55
|
+
cas_server_url: http://cas-server.berkeley.edu
|
56
|
+
cas_service_url: https://wikihub.berkeley.edu
|
57
|
+
data_dir: /var/lib/jira/data
|
58
|
+
svn_username: app_relmgt
|
59
|
+
svn_project_url: svn.berkeley.edu/svn/ist-svn/berkeley/projects/ist/as/webapps/jira_archives/tags
|
60
|
+
|
61
|
+
|
62
|
+
== Usage
|
63
|
+
deployer jira VERSION=x.x.x
|
64
|
+
|
65
|
+
or
|
66
|
+
|
67
|
+
deployer confluence VERSION=x.x.x
|
data/Rakefile
CHANGED
@@ -3,15 +3,13 @@ require 'rake'
|
|
3
3
|
require 'echoe'
|
4
4
|
require 'spec/rake/spectask'
|
5
5
|
|
6
|
-
Echoe.new('ucb_deployer', '0.0.
|
6
|
+
Echoe.new('ucb_deployer', '0.0.2') do |p|
|
7
7
|
p.description = "Tool for deploying java applications"
|
8
8
|
p.url = "http://ucbrb.rubyforge.org"
|
9
9
|
p.author = "Steven Hansen"
|
10
10
|
p.email = "runner@berkeley.edu"
|
11
|
-
p.ignore_pattern = ["svn_user.yml", "svn_project.rake"]
|
12
11
|
p.project = "ucbrb"
|
13
12
|
p.rdoc_pattern = "README.txt", "lib/**/**"
|
14
|
-
# p.rdoc_options = "-o doc --inline-source -T hanna lib/*.rb"
|
15
13
|
end
|
16
14
|
|
17
15
|
desc "Run RSpec tests"
|
data/TODO.txt
ADDED
data/bin/deployer
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
require 'rake'
|
3
|
-
require '
|
3
|
+
require 'deployer'
|
4
4
|
|
5
5
|
Rake.application.init("deployer")
|
6
6
|
|
@@ -21,14 +21,15 @@ task :export => [:init] do
|
|
21
21
|
end
|
22
22
|
|
23
23
|
task :init => [:check_usage] do
|
24
|
-
|
25
|
-
@deployer = ConfluenceDeployer.new()
|
24
|
+
@deployer = UcbDeployer.factory(ENV["APP"])
|
26
25
|
@deployer.version = ENV["VERSION"]
|
27
26
|
end
|
28
27
|
|
29
28
|
task :check_usage do
|
30
|
-
|
31
|
-
|
29
|
+
usage = "Usage: deployer APP=<confluence|jira> VERSION=x.x.x"
|
30
|
+
|
31
|
+
if !(ENV["APP"] && ENV["VERSION"] && [:confluence, :jira].include?(ENV["APP"].to_sym))
|
32
|
+
$stderr.puts(usage)
|
32
33
|
exit(1)
|
33
34
|
end
|
34
35
|
end
|
@@ -0,0 +1,150 @@
|
|
1
|
+
|
2
|
+
module UcbDeployer
|
3
|
+
class ConfluenceDeployer < Deployer
|
4
|
+
|
5
|
+
def initialize(config_file = "#{ENV['HOME']}/config/confluence/deploy.yml")
|
6
|
+
FileUtils.touch(config_file) if !File.exists?(config_file)
|
7
|
+
load_config(config_file)
|
8
|
+
end
|
9
|
+
|
10
|
+
def export()
|
11
|
+
UcbDeployer.debug("Exporting from: #{svn_project_url}")
|
12
|
+
pwd = Dir.getwd
|
13
|
+
Dir.chdir("#{build_dir}")
|
14
|
+
FileUtils.rm_rf("#{build_dir}/src")
|
15
|
+
`svn export svn+ssh://#{svn_username}@#{svn_project_url}/confluence-#{version}`
|
16
|
+
FileUtils.mv("confluence-#{version}", "src")
|
17
|
+
Dir.chdir(pwd)
|
18
|
+
$stdout.puts("Export Completed")
|
19
|
+
end
|
20
|
+
|
21
|
+
def configure
|
22
|
+
config_web_xml
|
23
|
+
config_seraph_config_xml
|
24
|
+
config_confluence_init_properties
|
25
|
+
reshuffle_jars
|
26
|
+
end
|
27
|
+
|
28
|
+
def build
|
29
|
+
pwd = Dir.getwd
|
30
|
+
Dir.chdir("#{build_dir}/src")
|
31
|
+
exec("sh #{build_dir}/src/build.sh")
|
32
|
+
Dir.chdir(pwd)
|
33
|
+
end
|
34
|
+
|
35
|
+
def deploy
|
36
|
+
display_maintenance_file
|
37
|
+
FileUtils.rm_rf(Dir["#{deploy_dir}/#{war_name}*"])
|
38
|
+
FileUtils.mkdir("#{deploy_dir}/#{war_name}")
|
39
|
+
FileUtils.cp(Dir["#{build_dir}/src/dist/*.war"], "#{deploy_dir}/#{war_name}")
|
40
|
+
exec("jar -xvf #{deploy_dir}/#{war_name}/#{war_name}.war")
|
41
|
+
FileUtils.rm("#{deploy_dir}/#{war_name}/#{war_name}.war")
|
42
|
+
end
|
43
|
+
|
44
|
+
def rollback
|
45
|
+
end
|
46
|
+
|
47
|
+
def svn_username
|
48
|
+
@svn_username || "app_relmgt"
|
49
|
+
end
|
50
|
+
|
51
|
+
def svn_base_url
|
52
|
+
@svn_base_url || "svn.berkeley.edu/svn/ist-svn/berkeley/projects/ist/as/webapps/confluence_archives"
|
53
|
+
end
|
54
|
+
|
55
|
+
##
|
56
|
+
# Shortcut to confluence web.xml file
|
57
|
+
#
|
58
|
+
def web_xml()
|
59
|
+
"#{build_dir}/src/confluence/WEB-INF/web.xml"
|
60
|
+
end
|
61
|
+
|
62
|
+
##
|
63
|
+
# Shortcut to confluence seraph-config.xml file
|
64
|
+
#
|
65
|
+
def seraph_config_xml()
|
66
|
+
"#{build_dir}/src/confluence/WEB-INF/classes/seraph-config.xml"
|
67
|
+
end
|
68
|
+
|
69
|
+
##
|
70
|
+
# Shortcut to confluence confluence-init.properties file
|
71
|
+
#
|
72
|
+
def confluence_init_properties()
|
73
|
+
"#{build_dir}/src/confluence/WEB-INF/classes/confluence-init.properties"
|
74
|
+
end
|
75
|
+
|
76
|
+
def web_xml_token()
|
77
|
+
"<!-- Uncomment the following to disable the space export long running task. -->"
|
78
|
+
end
|
79
|
+
|
80
|
+
def seraph_config_xml_token()
|
81
|
+
"com.atlassian.confluence.user.ConfluenceAuthenticator"
|
82
|
+
end
|
83
|
+
|
84
|
+
def cas_authenticator_class()
|
85
|
+
"org.soulwing.cas.apps.atlassian.ConfluenceCasAuthenticator"
|
86
|
+
end
|
87
|
+
|
88
|
+
##
|
89
|
+
# Updates the confluence web.xml file with the soulwing (CAS library)
|
90
|
+
# authentication configuration
|
91
|
+
#
|
92
|
+
def config_web_xml()
|
93
|
+
web_xml = File.readlines(self.web_xml)
|
94
|
+
|
95
|
+
web_xml = web_xml.map do |line|
|
96
|
+
if line =~ /#{web_xml_token}/
|
97
|
+
template = File.open("#{DEPLOYER_HOME}/resources/confluence_cas_web.xml") { |f| f.read }
|
98
|
+
ERB.new(template).result(self.send(:binding))
|
99
|
+
else
|
100
|
+
line
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
File.open(self.web_xml, "w") do |io|
|
105
|
+
web_xml.each { |line| io.puts(line) }
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
##
|
110
|
+
# Updates the confluence seraph_config.xml file with the soulwing
|
111
|
+
# authenticator.
|
112
|
+
#
|
113
|
+
def config_seraph_config_xml()
|
114
|
+
seraph_xml = File.readlines(self.seraph_config_xml)
|
115
|
+
|
116
|
+
seraph_xml = seraph_xml.map do |line|
|
117
|
+
if m = /(#{Regexp.quote(seraph_config_xml_token)})/.match(line)
|
118
|
+
debug(m[0])
|
119
|
+
debug("#{m.pre_match}#{cas_authenticator_class}#{m.post_match}")
|
120
|
+
"#{m.pre_match}#{cas_authenticator_class}#{m.post_match}"
|
121
|
+
else
|
122
|
+
line
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
126
|
+
File.open(self.seraph_config_xml, "w") do |io|
|
127
|
+
seraph_xml.each { |line| io.puts(line) }
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
##
|
132
|
+
# Sets the confluence.home property in the file: confluence-init.properties
|
133
|
+
#
|
134
|
+
def config_confluence_init_properties()
|
135
|
+
File.open(self.confluence_init_properties, "w") { |io| io.puts("confluence.home=#{data_dir}") }
|
136
|
+
end
|
137
|
+
|
138
|
+
def reshuffle_jars()
|
139
|
+
FileUtils.cp(Dir["#{UcbDeployer::RESOURCES_DIR}/soulwing-casclient-*"],
|
140
|
+
"#{build_dir}/src/confluence/WEB-INF/lib/")
|
141
|
+
# Remove the postgres jar since we have it installed at the container level
|
142
|
+
FileUtils.rm_rf(Dir["#{build_dir}/src/confluence/WEB-INF/lib/postgresql-*"])
|
143
|
+
end
|
144
|
+
|
145
|
+
def debug(str)
|
146
|
+
UcbDeployer.debug(str)
|
147
|
+
end
|
148
|
+
end
|
149
|
+
end
|
150
|
+
|
@@ -0,0 +1,115 @@
|
|
1
|
+
|
2
|
+
module UcbDeployer
|
3
|
+
##
|
4
|
+
# @author Steven Hansen
|
5
|
+
#
|
6
|
+
# @abstract Subclass and override {#export, #build, #configure, #deploy,
|
7
|
+
# #rollback} to implement a custom UcbDeployer class
|
8
|
+
#
|
9
|
+
class Deployer
|
10
|
+
|
11
|
+
CONFIG_OPTIONS = [
|
12
|
+
:build_dir,
|
13
|
+
:deploy_dir,
|
14
|
+
:war_name,
|
15
|
+
:cas_service_url,
|
16
|
+
:cas_server_url,
|
17
|
+
:data_dir,
|
18
|
+
:svn_username,
|
19
|
+
:svn_project_url,
|
20
|
+
]
|
21
|
+
|
22
|
+
|
23
|
+
attr_accessor *CONFIG_OPTIONS
|
24
|
+
attr_accessor :version, :debug_mode
|
25
|
+
|
26
|
+
|
27
|
+
def export()
|
28
|
+
end
|
29
|
+
|
30
|
+
def configure()
|
31
|
+
end
|
32
|
+
|
33
|
+
def build()
|
34
|
+
end
|
35
|
+
|
36
|
+
def rollback()
|
37
|
+
end
|
38
|
+
|
39
|
+
def deploy()
|
40
|
+
end
|
41
|
+
|
42
|
+
def svn_username()
|
43
|
+
@svn_username || "app_relmgt"
|
44
|
+
end
|
45
|
+
|
46
|
+
##
|
47
|
+
# Configuration options are:
|
48
|
+
#
|
49
|
+
# +build_dir+
|
50
|
+
# +deploy_dir+
|
51
|
+
# +war_name+
|
52
|
+
# +svn_project_url+
|
53
|
+
# +svn_username+
|
54
|
+
# +cas_service_url+
|
55
|
+
# +cas_server_url+
|
56
|
+
# +data_dir+
|
57
|
+
#
|
58
|
+
def load_config(config_file)
|
59
|
+
hash = YAML.load_file(config_file)
|
60
|
+
hash.each do |key, val|
|
61
|
+
if CONFIG_OPTIONS.include?(key.to_sym)
|
62
|
+
self.send("#{key}=", val)
|
63
|
+
else
|
64
|
+
raise(ConfigError, "Unrecognized Option: #{key}")
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
def display_maintenance_file()
|
70
|
+
maint_start = Time.now.strftime("%m-%d-%Y %H:%M:%S")
|
71
|
+
template = ERB.new(maintenance_template)
|
72
|
+
File.open("/var/www/html/confluence/maintenance.html", "w") do |f|
|
73
|
+
f.puts template.result(binding)
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
def maintenance_template()
|
78
|
+
%q{
|
79
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
80
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
81
|
+
|
82
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
83
|
+
|
84
|
+
<head>
|
85
|
+
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
86
|
+
<title>Site Maintenance<title>
|
87
|
+
<style type="text/css">
|
88
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
89
|
+
div.dialog {
|
90
|
+
width: 35em;
|
91
|
+
padding: 0 3em;
|
92
|
+
margin: 3em auto 0 auto;
|
93
|
+
border: 1px solid #ccc;
|
94
|
+
border-right-color: #999;
|
95
|
+
border-bottom-color: #999;
|
96
|
+
}
|
97
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
98
|
+
</style>
|
99
|
+
</head>
|
100
|
+
|
101
|
+
<body>
|
102
|
+
<div class="dialog">
|
103
|
+
<h1>Site Maintenance</h1>
|
104
|
+
<p>
|
105
|
+
The site is down for maintenance as of: <strong><%= maint_start %></strong> <br/>
|
106
|
+
it should be available shortly.
|
107
|
+
</p>
|
108
|
+
</div>
|
109
|
+
</body>
|
110
|
+
</html>
|
111
|
+
}
|
112
|
+
end
|
113
|
+
|
114
|
+
end
|
115
|
+
end
|
@@ -0,0 +1,77 @@
|
|
1
|
+
|
2
|
+
module UcbDeployer
|
3
|
+
class JiraDeployer < Deployer
|
4
|
+
|
5
|
+
def initialize(config_file = "#{ENV['HOME']}/config/jira/deploy.yml")
|
6
|
+
FileUtils.touch(config_file) if !File.exists?(config_file)
|
7
|
+
load_config(config_file)
|
8
|
+
end
|
9
|
+
|
10
|
+
def export()
|
11
|
+
end
|
12
|
+
|
13
|
+
def configure
|
14
|
+
end
|
15
|
+
|
16
|
+
def build
|
17
|
+
end
|
18
|
+
|
19
|
+
def deploy
|
20
|
+
end
|
21
|
+
|
22
|
+
def rollback
|
23
|
+
end
|
24
|
+
|
25
|
+
##
|
26
|
+
# Shortcut to confluence web.xml file
|
27
|
+
#
|
28
|
+
def web_xml()
|
29
|
+
end
|
30
|
+
|
31
|
+
##
|
32
|
+
# Shortcut to confluence seraph-config.xml file
|
33
|
+
#
|
34
|
+
def seraph_config_xml()
|
35
|
+
end
|
36
|
+
|
37
|
+
##
|
38
|
+
# Shortcut to confluence confluence-init.properties file
|
39
|
+
#
|
40
|
+
def confluence_init_properties()
|
41
|
+
end
|
42
|
+
|
43
|
+
def web_xml_token()
|
44
|
+
end
|
45
|
+
|
46
|
+
def seraph_config_xml_token()
|
47
|
+
end
|
48
|
+
|
49
|
+
def cas_authenticator_class()
|
50
|
+
end
|
51
|
+
|
52
|
+
##
|
53
|
+
# Updates the confluence web.xml file with the soulwing (CAS library)
|
54
|
+
# authentication configuration
|
55
|
+
#
|
56
|
+
def config_web_xml()
|
57
|
+
end
|
58
|
+
|
59
|
+
##
|
60
|
+
# Updates the confluence seraph_config.xml file with the soulwing
|
61
|
+
# authenticator.
|
62
|
+
#
|
63
|
+
def config_seraph_config_xml()
|
64
|
+
end
|
65
|
+
|
66
|
+
##
|
67
|
+
# Sets the confluence.home property in the file: confluence-init.properties
|
68
|
+
#
|
69
|
+
def config_confluence_init_properties()
|
70
|
+
end
|
71
|
+
|
72
|
+
def reshuffle_jars()
|
73
|
+
end
|
74
|
+
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
data/lib/ucb_deployer.rb
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
require 'yaml'
|
2
|
+
require 'net/http'
|
3
|
+
require 'erb'
|
4
|
+
require 'ucb_deployer/deployer'
|
5
|
+
require 'ucb_deployer/confluence_deployer'
|
6
|
+
require 'ucb_deployer/jira_deployer'
|
7
|
+
|
8
|
+
|
9
|
+
module UcbDeployer
|
10
|
+
class ConfigError < RuntimeError; end
|
11
|
+
|
12
|
+
DEPLOYER_HOME = File.expand_path(File.dirname(__FILE__) + '/..') unless defined?(DEPLOYER_HOME)
|
13
|
+
RESOURCES_DIR = File.expand_path("#{DEPLOYER_HOME}/resources") unless defined?(RESOURCES_DIR)
|
14
|
+
|
15
|
+
|
16
|
+
##
|
17
|
+
# Valid options are
|
18
|
+
#
|
19
|
+
# @param [Symbol|String] valid __app_name__ values are: "confluence", "jira"
|
20
|
+
# @raise [UcbDeployer::ConfigError] raises if invalid value is used for __app_name__
|
21
|
+
# @return [UcbDeployer::Deployer]
|
22
|
+
#
|
23
|
+
def self.factory(app_name)
|
24
|
+
if app == :confluence
|
25
|
+
UcbDeployer::ConfluenceDeployer.new()
|
26
|
+
elsif app == :jira
|
27
|
+
UcbDeployer::JiraDeployer.new()
|
28
|
+
else
|
29
|
+
raise(ConfigError, "Unrecognized app_name: #{app_name}")
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def self.debug(str)
|
34
|
+
if debug_mode
|
35
|
+
$stdout.puts(str)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
def self.debug_mode
|
40
|
+
@debug_mode || false
|
41
|
+
end
|
42
|
+
|
43
|
+
def self.debug_mode=(bool)
|
44
|
+
@debug_mode = bool
|
45
|
+
end
|
46
|
+
end
|
@@ -1,4 +1,5 @@
|
|
1
1
|
|
2
|
+
<!-- CAS Configuration -->
|
2
3
|
<context-param>
|
3
4
|
<param-name>casServerUrl</param-name>
|
4
5
|
<param-value><%= cas_server_url %></param-value>
|
@@ -97,4 +98,4 @@
|
|
97
98
|
<filter-name>CAS-Service-Validation</filter-name>
|
98
99
|
<url-pattern>/*</url-pattern>
|
99
100
|
</filter-mapping>
|
100
|
-
|
101
|
+
<!-- end CAS Configuration -->
|
data/resources/jdom.jar
ADDED
Binary file
|
@@ -0,0 +1,95 @@
|
|
1
|
+
|
2
|
+
<!-- CAS Configuration -->
|
3
|
+
<context-param>
|
4
|
+
<param-name>casServerUrl</param-name>
|
5
|
+
<param-value><%= cas_server_url %></param-value>
|
6
|
+
</context-param>
|
7
|
+
<context-param>
|
8
|
+
<param-name>casServiceUrl</param-name>
|
9
|
+
<param-value><%= cas_service_url %></param-value>
|
10
|
+
</context-param>
|
11
|
+
|
12
|
+
<listener>
|
13
|
+
<listener-class>org.soulwing.cas.filter.ProtocolConfigurationListener</listener-class>
|
14
|
+
</listener>
|
15
|
+
|
16
|
+
<filter>
|
17
|
+
<filter-name>CAS-Session-Bypass</filter-name>
|
18
|
+
<filter-class>org.soulwing.cas.filter.SessionBypassFilter</filter-class>
|
19
|
+
<init-param>
|
20
|
+
<param-name>logoutPath</param-name>
|
21
|
+
<param-value>/casLogout.action</param-value>
|
22
|
+
</init-param>
|
23
|
+
<init-param>
|
24
|
+
<param-name>applicationLogout</param-name>
|
25
|
+
<param-value>true</param-value>
|
26
|
+
</init-param>
|
27
|
+
<init-param>
|
28
|
+
<param-name>globalLogout</param-name>
|
29
|
+
<param-value>true</param-value>
|
30
|
+
</init-param>
|
31
|
+
<init-param>
|
32
|
+
<param-name>bypassRedirectUrl</param-name>
|
33
|
+
<param-value>/secure/Logout!default.jspa</param-value>
|
34
|
+
</init-param>
|
35
|
+
<init-param>
|
36
|
+
<param-name>bypassPaths</param-name>
|
37
|
+
<param-value>/login.jsp, /sr*, /secure/RunPortlet*</param-value>
|
38
|
+
</init-param>
|
39
|
+
</filter>
|
40
|
+
|
41
|
+
<filter>
|
42
|
+
<filter-name>CAS-Simple-Bypass</filter-name>
|
43
|
+
<filter-class>org.soulwing.cas.filter.SimpleBypassFilter</filter-class>
|
44
|
+
<init-param>
|
45
|
+
<param-name>bypassPaths</param-name>
|
46
|
+
<param-value>
|
47
|
+
/rpc/*, /images/*, /styles/*, /secure/Logout!default.jspa
|
48
|
+
</param-value>
|
49
|
+
</init-param>
|
50
|
+
</filter>
|
51
|
+
|
52
|
+
<filter>
|
53
|
+
<filter-name>CAS-Logout</filter-name>
|
54
|
+
<filter-class>
|
55
|
+
org.soulwing.cas.filter.LogoutFilter
|
56
|
+
</filter-class>
|
57
|
+
<init-param>
|
58
|
+
<param-name>logoutPath</param-name>
|
59
|
+
<param-value>/secure/Logout!default.jspa</param-value>
|
60
|
+
</init-param>
|
61
|
+
<init-param>
|
62
|
+
<param-name>applicationLogout</param-name>
|
63
|
+
<param-value>true</param-value>
|
64
|
+
</init-param>
|
65
|
+
<init-param>
|
66
|
+
<param-name>globalLogout</param-name>
|
67
|
+
<param-value>true</param-value>
|
68
|
+
</init-param>
|
69
|
+
</filter>
|
70
|
+
|
71
|
+
<filter-mapping>
|
72
|
+
<filter-name>CAS-Logout</filter-name>
|
73
|
+
<url-pattern>/*</url-pattern>
|
74
|
+
</filter-mapping>
|
75
|
+
|
76
|
+
<filter>
|
77
|
+
<filter-name>CAS-Service-Validation</filter-name>
|
78
|
+
<filter-class>org.soulwing.cas.filter.ServiceValidationFilter</filter-class>
|
79
|
+
</filter>
|
80
|
+
|
81
|
+
<filter-mapping>
|
82
|
+
<filter-name>CAS-Session-Bypass</filter-name>
|
83
|
+
<url-pattern>/*</url-pattern>
|
84
|
+
</filter-mapping>
|
85
|
+
|
86
|
+
<filter-mapping>
|
87
|
+
<filter-name>CAS-Simple-Bypass</filter-name>
|
88
|
+
<url-pattern>/*</url-pattern>
|
89
|
+
</filter-mapping>
|
90
|
+
|
91
|
+
<filter-mapping>
|
92
|
+
<filter-name>CAS-Service-Validation</filter-name>
|
93
|
+
<url-pattern>/*</url-pattern>
|
94
|
+
</filter-mapping>
|
95
|
+
<!-- end CAS Configuration -->
|
Binary file
|
File without changes
|
File without changes
|
data/spec/{build/confluence/src/confluence/WEB-INF/classes → fixtures/confluence}/seraph-config.xml
RENAMED
File without changes
|
File without changes
|
File without changes
|