ucb_deployer 1.0.1 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile.lock +1 -1
- data/lib/ucb_deployer/config_tasks/jira/config_app_properties.rb +34 -0
- data/lib/ucb_deployer/config_tasks/jira/config_cas_auth.rb +76 -0
- data/lib/ucb_deployer/config_tasks/jira/config_ist_banner.rb +19 -0
- data/lib/ucb_deployer/config_tasks/jira/config_jira_config_properties.rb +26 -0
- data/lib/ucb_deployer/config_tasks/jira/remove_conflicting_jar_files.rb +26 -0
- data/lib/ucb_deployer/confluence_deployer.rb +1 -1
- data/lib/ucb_deployer/deployer.rb +14 -1
- data/lib/ucb_deployer/jira_deployer.rb +24 -191
- data/lib/ucb_deployer/version.rb +1 -1
- data/lib/ucb_deployer.rb +7 -1
- data/spec/fixtures/jira/entityengine.xml +6 -38
- data/spec/fixtures/jira/jira-application.properties +2 -893
- data/spec/fixtures/jira/web.xml +112 -68
- data/spec/ucb_deployer/jira_deployer_spec.rb +68 -85
- metadata +24 -19
data/spec/fixtures/jira/web.xml
CHANGED
@@ -13,11 +13,23 @@
|
|
13
13
|
<!-- =====================================================
|
14
14
|
THIS MUST BE THE FIRST FILTER IN THE DEFINED CHAIN
|
15
15
|
===================================================== -->
|
16
|
+
<!-- This *has* to come first to ensure no other filter runs before this trying to access the ComponentManager
|
17
|
+
since that can cause deadlocks during a data import -->
|
18
|
+
<filter>
|
19
|
+
<filter-name>JiraImportProgressFilter</filter-name>
|
20
|
+
<filter-class>com.atlassian.jira.web.filters.JiraImportProgressFilter</filter-class>
|
21
|
+
</filter>
|
22
|
+
|
16
23
|
<filter>
|
17
24
|
<filter-name>JiraFirstFilter</filter-name>
|
18
25
|
<filter-class>com.atlassian.jira.web.filters.JiraFirstFilter</filter-class>
|
19
26
|
</filter>
|
20
|
-
|
27
|
+
|
28
|
+
<filter>
|
29
|
+
<filter-name>MultiTenantFilter</filter-name>
|
30
|
+
<filter-class>com.atlassian.multitenant.servlet.MultiTenantServletFilter</filter-class>
|
31
|
+
</filter>
|
32
|
+
|
21
33
|
<!-- If serious problems were encountered on Startup, this filter will display an
|
22
34
|
appropriate error message for any requests. Basically it locks JIRA. -->
|
23
35
|
<filter>
|
@@ -25,6 +37,35 @@
|
|
25
37
|
<filter-class>com.atlassian.jira.startup.JiraStartupChecklistFilter</filter-class>
|
26
38
|
</filter>
|
27
39
|
|
40
|
+
<filter>
|
41
|
+
<filter-name>active-requests-filter</filter-name>
|
42
|
+
<filter-class>com.atlassian.jira.web.monitor.ActiveRequestsFilter</filter-class>
|
43
|
+
|
44
|
+
<!-- register in JMX using this object name -->
|
45
|
+
<init-param>
|
46
|
+
<param-name>jmx.name</param-name>
|
47
|
+
<param-value>com.atlassian.jira:name=Requests</param-value>
|
48
|
+
</init-param>
|
49
|
+
|
50
|
+
<!-- create a log entry if a request takes more than this number of ms (default: 5s. 0 to disable) -->
|
51
|
+
<init-param>
|
52
|
+
<param-name>request.log.threshold</param-name>
|
53
|
+
<param-value>15000</param-value>
|
54
|
+
</init-param>
|
55
|
+
|
56
|
+
<!-- create a thread dump if a request takes more than this number of ms (default: 30s. 0 to disable) -->
|
57
|
+
<init-param>
|
58
|
+
<param-name>request.dumpthreads.threshold</param-name>
|
59
|
+
<param-value>0</param-value>
|
60
|
+
</init-param>
|
61
|
+
|
62
|
+
<!-- save the thread dump in the logs directory -->
|
63
|
+
<init-param>
|
64
|
+
<param-name>request.dumpthreads.dir</param-name>
|
65
|
+
<param-value>${catalina.base}/logs</param-value>
|
66
|
+
</init-param>
|
67
|
+
</filter>
|
68
|
+
|
28
69
|
<filter>
|
29
70
|
<filter-name>headersanitising</filter-name>
|
30
71
|
<filter-class>com.atlassian.core.filters.HeaderSanitisingFilter</filter-class>
|
@@ -73,17 +114,6 @@
|
|
73
114
|
</init-param>
|
74
115
|
</filter>
|
75
116
|
|
76
|
-
<filter>
|
77
|
-
<filter-name>request-cleanup</filter-name>
|
78
|
-
<filter-class>com.atlassian.jira.web.filters.RequestCleanupFilter</filter-class>
|
79
|
-
</filter>
|
80
|
-
|
81
|
-
<!-- this filter sets an attribute in the request to stop JiraWebworkActionDispatcher from popping all actions off the stack.
|
82
|
-
It will clear the action stack AFTER the sitemesh decorator has rendered the page.-->
|
83
|
-
<filter>
|
84
|
-
<filter-name>action-cleanup-delay</filter-name>
|
85
|
-
<filter-class>com.atlassian.jira.web.filters.ActionCleanupDelayFilter</filter-class>
|
86
|
-
</filter>
|
87
117
|
|
88
118
|
<filter>
|
89
119
|
<filter-name>filter-plugin-dispatcher-before-decoration-request</filter-name>
|
@@ -161,6 +191,11 @@
|
|
161
191
|
<filter-class>com.atlassian.jira.web.filters.PathMatchingEncodingFilter</filter-class>
|
162
192
|
</filter>
|
163
193
|
|
194
|
+
<filter>
|
195
|
+
<filter-name>postencoding</filter-name>
|
196
|
+
<filter-class>com.atlassian.jira.web.filters.JiraPostEncodingFilter</filter-class>
|
197
|
+
</filter>
|
198
|
+
|
164
199
|
<filter>
|
165
200
|
<filter-name>filter-plugin-dispatcher-after-encoding-request</filter-name>
|
166
201
|
<filter-class>com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter</filter-class>
|
@@ -349,7 +384,7 @@
|
|
349
384
|
</filter>
|
350
385
|
|
351
386
|
<!-- =====================================================
|
352
|
-
THIS MUST BE THE LAST FILTER IN THE DEFINED CHAIN
|
387
|
+
THIS MUST BE THE LAST FILTER IN THE DEFINED CHAIN
|
353
388
|
===================================================== -->
|
354
389
|
<filter>
|
355
390
|
<filter-name>JiraLastFilter</filter-name>
|
@@ -357,14 +392,27 @@
|
|
357
392
|
</filter>
|
358
393
|
|
359
394
|
<!-- =====================================================
|
360
|
-
FILTER MAPPINGS FOLLOW :
|
395
|
+
FILTER MAPPINGS FOLLOW :
|
361
396
|
===================================================== -->
|
362
397
|
|
398
|
+
<!-- This *has* to come first to ensure no other filter runs before this trying to access the ComponentManager
|
399
|
+
since that can cause deadlocks during a data import -->
|
400
|
+
<filter-mapping>
|
401
|
+
<filter-name>JiraImportProgressFilter</filter-name>
|
402
|
+
<url-pattern>/importprogress</url-pattern>
|
403
|
+
</filter-mapping>
|
404
|
+
|
363
405
|
<filter-mapping>
|
364
406
|
<filter-name>JiraFirstFilter</filter-name>
|
365
407
|
<url-pattern>/*</url-pattern>
|
366
408
|
</filter-mapping>
|
367
409
|
|
410
|
+
<filter-mapping>
|
411
|
+
<filter-name>MultiTenantFilter</filter-name>
|
412
|
+
<url-pattern>/*</url-pattern>
|
413
|
+
<dispatcher>REQUEST</dispatcher>
|
414
|
+
<dispatcher>ERROR</dispatcher>
|
415
|
+
</filter-mapping>
|
368
416
|
<!-- If serious problems were encountered on Startup, this filter will display an
|
369
417
|
appropriate error message for any requests. Basically it locks JIRA. -->
|
370
418
|
<filter-mapping>
|
@@ -372,6 +420,10 @@
|
|
372
420
|
<url-pattern>/*</url-pattern>
|
373
421
|
</filter-mapping>
|
374
422
|
|
423
|
+
<filter-mapping>
|
424
|
+
<filter-name>active-requests-filter</filter-name>
|
425
|
+
<url-pattern>/*</url-pattern>
|
426
|
+
</filter-mapping>
|
375
427
|
|
376
428
|
<!-- THIS MUST REMAIN AS THE TOP FILTER SO THAT THE ENCODING CAN BE SET BEFORE ANYTHING ELSE TOUCHES IT -->
|
377
429
|
<filter-mapping>
|
@@ -396,6 +448,11 @@
|
|
396
448
|
</filter-mapping>
|
397
449
|
-->
|
398
450
|
|
451
|
+
<filter-mapping>
|
452
|
+
<filter-name>postencoding</filter-name>
|
453
|
+
<url-pattern>/*</url-pattern>
|
454
|
+
</filter-mapping>
|
455
|
+
|
399
456
|
<filter-mapping>
|
400
457
|
<filter-name>filter-plugin-dispatcher-after-encoding-request</filter-name>
|
401
458
|
<url-pattern>/*</url-pattern>
|
@@ -505,17 +562,6 @@
|
|
505
562
|
<url-pattern>/rpc/xmlrpc</url-pattern>
|
506
563
|
</filter-mapping>
|
507
564
|
|
508
|
-
|
509
|
-
<filter-mapping>
|
510
|
-
<filter-name>request-cleanup</filter-name>
|
511
|
-
<url-pattern>/*</url-pattern>
|
512
|
-
</filter-mapping>
|
513
|
-
|
514
|
-
<filter-mapping>
|
515
|
-
<filter-name>action-cleanup-delay</filter-name>
|
516
|
-
<url-pattern>/*</url-pattern>
|
517
|
-
</filter-mapping>
|
518
|
-
|
519
565
|
<filter-mapping>
|
520
566
|
<filter-name>profiling</filter-name>
|
521
567
|
<url-pattern>*.jsp</url-pattern>
|
@@ -581,6 +627,8 @@
|
|
581
627
|
<filter-mapping>
|
582
628
|
<filter-name>login</filter-name>
|
583
629
|
<url-pattern>/*</url-pattern>
|
630
|
+
<dispatcher>REQUEST</dispatcher>
|
631
|
+
<dispatcher>FORWARD</dispatcher> <!-- we want security/login to be applied after urlrewrites, for example -->
|
584
632
|
</filter-mapping>
|
585
633
|
|
586
634
|
<filter-mapping>
|
@@ -591,6 +639,8 @@
|
|
591
639
|
<filter-mapping>
|
592
640
|
<filter-name>security</filter-name>
|
593
641
|
<url-pattern>/*</url-pattern>
|
642
|
+
<dispatcher>REQUEST</dispatcher>
|
643
|
+
<dispatcher>FORWARD</dispatcher> <!-- we want security to be applied after urlrewrites, for example -->
|
594
644
|
</filter-mapping>
|
595
645
|
|
596
646
|
<filter-mapping>
|
@@ -689,53 +739,51 @@
|
|
689
739
|
<filter-name>JiraLastFilter</filter-name>
|
690
740
|
<url-pattern>/*</url-pattern>
|
691
741
|
</filter-mapping>
|
692
|
-
|
693
742
|
|
694
|
-
<!-- =====================================================
|
695
|
-
LISTENERS FOLLOW :
|
696
|
-
===================================================== -->
|
697
743
|
|
698
|
-
<!--
|
699
|
-
This order is important for shutdown and startup, ie the ConsistencyLauncher will call "SHUTDOWN"
|
700
|
-
on a HSQL DB database, and so must be called 'after' the com.atlassian.jira.scheduler.JiraSchedulerLauncher
|
701
|
-
-->
|
744
|
+
<!-- SERVLET CONTEXT LISTENERS -->
|
702
745
|
|
746
|
+
<!-- This goes before the LauncherContextListener because parts of the LauncherContextListener expect
|
747
|
+
the ServletContextProvider to work. And this listener it was makes that work. -->
|
703
748
|
<listener>
|
704
749
|
<listener-class>com.atlassian.jira.web.ServletContextProviderListener</listener-class>
|
705
750
|
</listener>
|
706
751
|
|
707
|
-
<!--
|
708
|
-
|
709
|
-
-->
|
752
|
+
<!-- Start up JIRA. This listener actually delegates to a bunch of JiraLaunchers to ensure
|
753
|
+
that JIRA starts as intended. -->
|
710
754
|
<listener>
|
711
|
-
<listener-class>com.atlassian.jira.startup.
|
755
|
+
<listener-class>com.atlassian.jira.startup.LauncherContextListener</listener-class>
|
712
756
|
</listener>
|
713
757
|
|
714
|
-
<!--
|
715
|
-
|
716
|
-
<listener-class>com.atlassian.jira.upgrade.ConsistencyLauncher</listener-class>
|
717
|
-
</listener>
|
758
|
+
<!-- ========================================
|
759
|
+
DO NOT ADD ANY SERVLET CONTEXT LISTENERS
|
718
760
|
|
719
|
-
|
720
|
-
|
721
|
-
<listener-class>com.atlassian.jira.upgrade.UpgradeLauncher</listener-class>
|
722
|
-
</listener>
|
761
|
+
Unless you really know what you're doing. And if you think you do, you're probably wrong.
|
762
|
+
Because everything you thought you knew is wrong! Multitenancy is like (The Crying Game + The Usual Suspects) * 42.
|
723
763
|
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
764
|
+
The right place to add many context-listeners is now in the DefaultJiraLauncher which has to know when to do
|
765
|
+
what to make tenants happy.
|
766
|
+
========================================
|
767
|
+
-->
|
768
|
+
|
769
|
+
<!-- SESSION LISTENERS
|
770
|
+
Session listeners are multi-tenant copacetic. -->
|
728
771
|
|
729
772
|
<!-- XML-RPC / SOAP Listener -->
|
730
773
|
<listener>
|
731
774
|
<listener-class>com.atlassian.jira.soap.axis.JiraAxisHttpListener</listener-class>
|
732
775
|
</listener>
|
733
776
|
|
734
|
-
<!-- The JIRA user session tracker support -->
|
777
|
+
<!-- The JIRA user session tracker support. -->
|
735
778
|
<listener>
|
736
779
|
<listener-class>com.atlassian.jira.web.session.currentusers.JiraUserSessionDestroyListener</listener-class>
|
737
780
|
</listener>
|
738
781
|
|
782
|
+
<!-- Multi-Tenant session fixation prevention -->
|
783
|
+
<listener>
|
784
|
+
<listener-class>com.atlassian.multitenant.servlet.MultiTenantSessionListener</listener-class>
|
785
|
+
</listener>
|
786
|
+
|
739
787
|
<!-- servlets -->
|
740
788
|
<servlet>
|
741
789
|
<servlet-name>action</servlet-name>
|
@@ -827,16 +875,6 @@
|
|
827
875
|
</init-param>
|
828
876
|
</servlet>
|
829
877
|
|
830
|
-
<!-- IE6 expects CSS files to end with .css (JRA-3747) -->
|
831
|
-
<servlet>
|
832
|
-
<servlet-name>global.css</servlet-name>
|
833
|
-
<jsp-file>/styles/global_css.jsp</jsp-file>
|
834
|
-
<init-param>
|
835
|
-
<param-name>fork</param-name>
|
836
|
-
<param-value>false</param-value>
|
837
|
-
</init-param>
|
838
|
-
</servlet>
|
839
|
-
|
840
878
|
<servlet>
|
841
879
|
<servlet-name>calendar.css</servlet-name>
|
842
880
|
<jsp-file>/includes/js/calendar/skins/aqua/theme.jsp</jsp-file>
|
@@ -886,7 +924,12 @@
|
|
886
924
|
<servlet-name>attachmentzip</servlet-name>
|
887
925
|
<servlet-class>com.atlassian.jira.web.servlet.AttachmentZipServlet</servlet-class>
|
888
926
|
</servlet>
|
889
|
-
|
927
|
+
|
928
|
+
<!-- Multi-Tenant -->
|
929
|
+
<servlet>
|
930
|
+
<servlet-name>multitenant</servlet-name>
|
931
|
+
<servlet-class>com.atlassian.multitenant.servlet.MultiTenantServlet</servlet-class>
|
932
|
+
</servlet>
|
890
933
|
|
891
934
|
<!-- JCAPTCHA -->
|
892
935
|
<servlet>
|
@@ -906,7 +949,7 @@
|
|
906
949
|
<servlet-name>attachmentzip</servlet-name>
|
907
950
|
<url-pattern>/secure/attachmentzip/*</url-pattern>
|
908
951
|
</servlet-mapping>
|
909
|
-
|
952
|
+
|
910
953
|
<servlet-mapping>
|
911
954
|
<servlet-name>file-server</servlet-name>
|
912
955
|
<url-pattern>/download/*</url-pattern>
|
@@ -917,11 +960,6 @@
|
|
917
960
|
<url-pattern>/styles/calendar.css</url-pattern>
|
918
961
|
</servlet-mapping>
|
919
962
|
|
920
|
-
<servlet-mapping>
|
921
|
-
<servlet-name>global.css</servlet-name>
|
922
|
-
<url-pattern>/styles/global.css</url-pattern>
|
923
|
-
</servlet-mapping>
|
924
|
-
|
925
963
|
<servlet-mapping>
|
926
964
|
<servlet-name>servlet-module-container-servlet</servlet-name>
|
927
965
|
<url-pattern>/plugins/servlet/*</url-pattern>
|
@@ -1043,9 +1081,14 @@
|
|
1043
1081
|
<url-pattern>*.vmd</url-pattern>
|
1044
1082
|
</servlet-mapping>
|
1045
1083
|
|
1084
|
+
<servlet-mapping>
|
1085
|
+
<servlet-name>multitenant</servlet-name>
|
1086
|
+
<url-pattern>/multitenant/*</url-pattern>
|
1087
|
+
</servlet-mapping>
|
1088
|
+
|
1046
1089
|
<!-- session config -->
|
1047
1090
|
<session-config>
|
1048
|
-
<session-timeout>
|
1091
|
+
<session-timeout>300</session-timeout>
|
1049
1092
|
</session-config>
|
1050
1093
|
|
1051
1094
|
<!-- mime mapping -->
|
@@ -1084,6 +1127,7 @@
|
|
1084
1127
|
<taglib>
|
1085
1128
|
<taglib-uri>webwork</taglib-uri>
|
1086
1129
|
<taglib-location>/WEB-INF/tld/webwork.tld</taglib-location>
|
1130
|
+
|
1087
1131
|
</taglib>
|
1088
1132
|
<taglib>
|
1089
1133
|
<taglib-uri>sitemesh-page</taglib-uri>
|
@@ -25,92 +25,11 @@ describe UcbDeployer::JiraDeployer do
|
|
25
25
|
lambda { @jdep.load_config(@bad_deploy_file) }.should raise_error(UcbDeployer::ConfigError)
|
26
26
|
end
|
27
27
|
|
28
|
-
it "should
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
@jdep.configure()
|
34
|
-
File.exists?(@jdep.web_xml).should be_true
|
35
|
-
lines = File.readlines(@jdep.web_xml)
|
36
|
-
lines.grep(/<\?xml version="1\.0"\?>/).should be_true
|
37
|
-
lines.grep(/^<web-app /).should be_true
|
38
|
-
lines.grep(/#{@jdep.cas_server_url}/).should have(1).record
|
39
|
-
lines.grep(/#{@jdep.cas_service_url}/).should have(1).record
|
40
|
-
lines.grep(/<\/web-app>/).should be_true
|
41
|
-
end
|
42
|
-
|
43
|
-
it "should configure the soulwing (CAS) authenticator in seraph_config.xml" do
|
44
|
-
@jdep.build_dir = test_build_dir
|
45
|
-
# just checking if spec_helper did the right
|
46
|
-
File.exists?(@jdep.seraph_config_xml).should be_true
|
47
|
-
|
48
|
-
@jdep.configure()
|
49
|
-
File.exists?(@jdep.seraph_config_xml).should be_true
|
50
|
-
lines = File.readlines(@jdep.seraph_config_xml)
|
51
|
-
lines.grep(/<security-config>/).should be_true
|
52
|
-
lines.grep(/#{Regexp.quote(@jdep.cas_authenticator_class)}/).should have(1).record
|
53
|
-
lines.grep(/#{Regexp.quote(@jdep.cas_server_url)}\/logout/).should have(1).record
|
54
|
-
lines.grep(/<\/security-config>/).should be_true
|
55
|
-
end
|
56
|
-
|
57
|
-
it "should configure the postgres72 db option in entityengine.xml" do
|
58
|
-
@jdep.build_dir = test_build_dir
|
59
|
-
# just checking if spec_helper did the right
|
60
|
-
File.exists?(@jdep.entityengine_xml).should be_true
|
61
|
-
|
62
|
-
@jdep.configure()
|
63
|
-
File.exists?(@jdep.entityengine_xml).should be_true
|
64
|
-
lines = File.readlines(@jdep.entityengine_xml)
|
65
|
-
lines.any? { |l| l =~ /<entity-config>/ }.should be_true
|
66
|
-
lines.any? { |l| l =~ /#{Regexp.quote(@jdep.entityengine_db)}/ }.should be_true
|
67
|
-
lines.any? { |l| l =~ /#{Regexp.quote(@jdep.entityengine_schema)}/ }.should be_true
|
68
|
-
lines.any? { |l| l =~ /<\/entity-config>/ }.should be_true
|
69
|
-
end
|
70
|
-
|
71
|
-
context "jira-application.properties file" do
|
72
|
-
it "should configure jira.home" do
|
73
|
-
@jdep.build_dir = test_build_dir()
|
74
|
-
# just checking if spec_helper did the right
|
75
|
-
File.exists?(@jdep.jira_application_properties).should be_true
|
76
|
-
|
77
|
-
@jdep.configure()
|
78
|
-
File.exists?(@jdep.jira_application_properties).should be_true
|
79
|
-
lines = File.readlines(@jdep.jira_application_properties)
|
80
|
-
lines.any? { |l| l =~ /# JIRA HOME/ }.should be_true
|
81
|
-
lines.any? { |l| l =~ /# JIRA SECURITY SETTINGS/ }.should be_true
|
82
|
-
lines.any? { |l| l =~ /#{Regexp.quote(@jdep.jira_home_token + ' ' + @jdep.data_dir)}/ }.should be_true
|
83
|
-
lines.any? { |l| l =~ /# NOTES FOR DEVELOPERS/ }.should be_true
|
84
|
-
end
|
85
|
-
|
86
|
-
it "should configure jira.projectkey.pattern" do
|
87
|
-
@jdep.build_dir = test_build_dir()
|
88
|
-
# just checking if spec_helper did the right
|
89
|
-
File.exists?(@jdep.jira_application_properties()).should be_true
|
90
|
-
|
91
|
-
@jdep.configure()
|
92
|
-
File.exists?(@jdep.jira_application_properties).should be_true
|
93
|
-
lines = File.readlines(@jdep.jira_application_properties)
|
94
|
-
lines.any? { |l| l =~ /# JIRA HOME/ }.should be_true
|
95
|
-
lines.any? { |l| l =~ /# JIRA SECURITY SETTINGS/ }.should be_true
|
96
|
-
lines.any? { |l| l =~ /#{Regexp.quote(@jdep.jira_projectkey_token() + ' ' + "([A-Z][A-Z0-9]+)")}/ }.should be_true
|
97
|
-
lines.any? { |l| l =~ /# NOTES FOR DEVELOPERS/ }.should be_true
|
98
|
-
end
|
99
|
-
end
|
100
|
-
|
101
|
-
it "should place ist_banner.jpg in webapps" do
|
102
|
-
@jdep.build_dir = test_build_dir()
|
28
|
+
it "should execute all the config tasks" do
|
29
|
+
task = mock("task", {:execute => true})
|
30
|
+
task.should_receive(:execute)
|
31
|
+
@jdep.stub!(:load_tasks).and_return([task])
|
103
32
|
@jdep.configure()
|
104
|
-
File.exists?("#{@jdep.build_dir}/src/webapp/images/ist_banner.jpg").should be_true
|
105
|
-
end
|
106
|
-
|
107
|
-
it "should reshuffle jar files" do
|
108
|
-
@jdep.build_dir = test_build_dir()
|
109
|
-
@jdep.configure()
|
110
|
-
Dir["#{@jdep.build_dir}/src/edit-webapp/WEB-INF/lib/soulwing-casclient-*"].should_not be_empty
|
111
|
-
["activation", "javamail", "commons-logging", "log4j"].each do |lib|
|
112
|
-
Dir["#{@jdep.build_dir}/src/edit-webapp/WEB-INF/lib/#{lib}-*"].should be_empty
|
113
|
-
end
|
114
33
|
end
|
115
34
|
end
|
116
35
|
|
@@ -134,3 +53,67 @@ describe UcbDeployer::JiraDeployer do
|
|
134
53
|
end
|
135
54
|
end
|
136
55
|
end
|
56
|
+
|
57
|
+
|
58
|
+
describe UcbDeployer::ConfigTasks::Jira do
|
59
|
+
before(:each) do
|
60
|
+
@config = mock("config", {
|
61
|
+
:resources_dir => UcbDeployer::RESOURCES_DIR,
|
62
|
+
:build_dir => "#{TEST_BUILD_DIR}/jira",
|
63
|
+
:cas_server_url => "THE CAS SERVER URL",
|
64
|
+
:cas_service_url => "THE CAS SERVICE URL",
|
65
|
+
:deployer_home => UcbDeployer::DEPLOYER_HOME,
|
66
|
+
:data_dir => "#{TEST_BUILD_DIR}/jira"
|
67
|
+
})
|
68
|
+
end
|
69
|
+
|
70
|
+
it "should configure cas authentication" do
|
71
|
+
task = UcbDeployer::ConfigTasks::Jira::ConfigCasAuth.new(@config)
|
72
|
+
task.execute()
|
73
|
+
|
74
|
+
lines = File.readlines(task.seraph_config_path())
|
75
|
+
lines.grep(/<security-config>/).should be_true
|
76
|
+
lines.grep(/#{Regexp.quote(task.cas_authenticator_class())}/).should have(1).record
|
77
|
+
lines.grep(/#{Regexp.quote(@config.cas_server_url())}\/logout/).should have(1).record
|
78
|
+
lines.grep(/<\/security-config>/).should be_true
|
79
|
+
|
80
|
+
lines = File.readlines(task.web_xml_path())
|
81
|
+
lines.grep(/#{Regexp.quote(@config.cas_server_url())}/).should have(1).record
|
82
|
+
lines.grep(/#{Regexp.quote(@config.cas_service_url())}/).should have(1).record
|
83
|
+
end
|
84
|
+
|
85
|
+
it "should remove conflicing jar file" do
|
86
|
+
task = UcbDeployer::ConfigTasks::Jira::RemoveConflictingJarFiles.new(@config)
|
87
|
+
task.execute()
|
88
|
+
|
89
|
+
Dir["#{@config.build_dir}/src/edit-webapp/WEB-INF/lib/soulwing-casclient-*"].should_not be_empty
|
90
|
+
["activation", "javamail", "commons-logging", "log4j"].each do |lib|
|
91
|
+
Dir["#{@config.build_dir}/src/edit-webapp/WEB-INF/lib/#{lib}-*"].should be_empty
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
it "should configure the ist banner image" do
|
96
|
+
task = UcbDeployer::ConfigTasks::Jira::ConfigIstBanner.new(@config)
|
97
|
+
task.execute()
|
98
|
+
|
99
|
+
File.exists?("#{@config.build_dir()}/src/webapp/images/ist_banner.jpg").should be_true
|
100
|
+
end
|
101
|
+
|
102
|
+
it "should configure the jira-config.properties file" do
|
103
|
+
task = UcbDeployer::ConfigTasks::Jira::ConfigJiraConfigProperties.new(@config)
|
104
|
+
task.execute()
|
105
|
+
|
106
|
+
lines = File.readlines(task.jira_config_properties_path())
|
107
|
+
lines.any? { |l| l =~ /#{Regexp.quote(task.projectkey_config())}/ }.should be_true
|
108
|
+
end
|
109
|
+
|
110
|
+
it "should configure the jira-application.properties file" do
|
111
|
+
task = UcbDeployer::ConfigTasks::Jira::ConfigAppProperties.new(@config)
|
112
|
+
task.execute()
|
113
|
+
|
114
|
+
lines = File.readlines(task.jira_app_properties_path())
|
115
|
+
lines.any? { |line|
|
116
|
+
line =~ /#{Regexp.quote(task.jira_home_token() + ' ' + @config.data_dir)}/
|
117
|
+
}.should be_true
|
118
|
+
end
|
119
|
+
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ucb_deployer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
|
-
- 0
|
9
8
|
- 1
|
10
|
-
|
9
|
+
- 0
|
10
|
+
version: 1.1.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Steven Hansen
|
@@ -15,10 +15,11 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-12-
|
18
|
+
date: 2011-12-02 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
|
-
|
21
|
+
name: rake
|
22
|
+
prerelease: false
|
22
23
|
requirement: &id001 !ruby/object:Gem::Requirement
|
23
24
|
none: false
|
24
25
|
requirements:
|
@@ -30,11 +31,11 @@ dependencies:
|
|
30
31
|
- 8
|
31
32
|
- 7
|
32
33
|
version: 0.8.7
|
33
|
-
|
34
|
-
name: rake
|
34
|
+
type: :runtime
|
35
35
|
version_requirements: *id001
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
|
-
|
37
|
+
name: rspec
|
38
|
+
prerelease: false
|
38
39
|
requirement: &id002 !ruby/object:Gem::Requirement
|
39
40
|
none: false
|
40
41
|
requirements:
|
@@ -46,11 +47,11 @@ dependencies:
|
|
46
47
|
- 3
|
47
48
|
- 0
|
48
49
|
version: 1.3.0
|
49
|
-
|
50
|
-
name: rspec
|
50
|
+
type: :development
|
51
51
|
version_requirements: *id002
|
52
52
|
- !ruby/object:Gem::Dependency
|
53
|
-
|
53
|
+
name: rcov
|
54
|
+
prerelease: false
|
54
55
|
requirement: &id003 !ruby/object:Gem::Requirement
|
55
56
|
none: false
|
56
57
|
requirements:
|
@@ -62,11 +63,11 @@ dependencies:
|
|
62
63
|
- 9
|
63
64
|
- 9
|
64
65
|
version: 0.9.9
|
65
|
-
|
66
|
-
name: rcov
|
66
|
+
type: :development
|
67
67
|
version_requirements: *id003
|
68
68
|
- !ruby/object:Gem::Dependency
|
69
|
-
|
69
|
+
name: diff-lcs
|
70
|
+
prerelease: false
|
70
71
|
requirement: &id004 !ruby/object:Gem::Requirement
|
71
72
|
none: false
|
72
73
|
requirements:
|
@@ -78,11 +79,11 @@ dependencies:
|
|
78
79
|
- 1
|
79
80
|
- 2
|
80
81
|
version: 1.1.2
|
81
|
-
|
82
|
-
name: diff-lcs
|
82
|
+
type: :development
|
83
83
|
version_requirements: *id004
|
84
84
|
- !ruby/object:Gem::Dependency
|
85
|
-
|
85
|
+
name: ruby-debug
|
86
|
+
prerelease: false
|
86
87
|
requirement: &id005 !ruby/object:Gem::Requirement
|
87
88
|
none: false
|
88
89
|
requirements:
|
@@ -94,8 +95,7 @@ dependencies:
|
|
94
95
|
- 10
|
95
96
|
- 4
|
96
97
|
version: 0.10.4
|
97
|
-
|
98
|
-
name: ruby-debug
|
98
|
+
type: :development
|
99
99
|
version_requirements: *id005
|
100
100
|
description: Tool for deploying Confluence and JIRA war files to tomcat
|
101
101
|
email:
|
@@ -115,6 +115,11 @@ files:
|
|
115
115
|
- TODO.md
|
116
116
|
- bin/ucb_deploy
|
117
117
|
- lib/ucb_deployer.rb
|
118
|
+
- lib/ucb_deployer/config_tasks/jira/config_app_properties.rb
|
119
|
+
- lib/ucb_deployer/config_tasks/jira/config_cas_auth.rb
|
120
|
+
- lib/ucb_deployer/config_tasks/jira/config_ist_banner.rb
|
121
|
+
- lib/ucb_deployer/config_tasks/jira/config_jira_config_properties.rb
|
122
|
+
- lib/ucb_deployer/config_tasks/jira/remove_conflicting_jar_files.rb
|
118
123
|
- lib/ucb_deployer/confluence_deployer.rb
|
119
124
|
- lib/ucb_deployer/deployer.rb
|
120
125
|
- lib/ucb_deployer/jira_deployer.rb
|