-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathdeploy.xml
130 lines (112 loc) · 4.96 KB
/
deploy.xml
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<?xml version="1.0"?>
<!--
This program and the accompanying materials are
made available under the terms of the Eclipse Public License v2.0 which accompanies
this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html
SPDX-License-Identifier: EPL-2.0
Copyright Contributors to the Zowe Project.
-->
<project default="deploy" xmlns:if="ant:if" xmlns:unless="ant:unless">
<record name="build.log" loglevel="info"/>
<import file="common.xml"/>
<property name="traverseTarget" value="antPlugin"/>
<property name="antTarget" value="deploy"/>
<condition property="isWindows">
<os family="windows"/>
</condition>
<condition property="isUnix">
<os family="unix"/>
</condition>
<condition property="isZos">
<os family="z/os"/>
</condition>
<target name="deploy">
<mkdir dir="${home}/defaults/ZLUX/pluginStorage"/>
<!-- A common storage area for apps to deploy their configs into for desktop behavior -->
<property name="productActions" value="${home}/defaults/ZLUX/pluginStorage/org.zowe.zlux.ng2desktop/actions"/>
<property name="productRecognizers" value="${home}/defaults/ZLUX/pluginStorage/org.zowe.zlux.ng2desktop/recognizers"/>
<mkdir dir="${productActions}"/>
<mkdir dir="${productRecognizers}"/>
<mkdir dir="${siteDir}/ZLUX/pluginStorage"/>
<!-- A common storage area for apps to deploy their configs into for desktop behavior -->
<property name="siteActions" value="${siteDir}/ZLUX/pluginStorage/org.zowe.zlux.ng2desktop/actions"/>
<property name="siteRecognizers" value="${siteDir}/ZLUX/pluginStorage/org.zowe.zlux.ng2desktop/recognizers"/>
<mkdir dir="${siteActions}"/>
<mkdir dir="${siteRecognizers}"/>
<property name="serverConfig" value="${instanceDir}/ZLUX/serverConfig" unless:set="instanceMode"/>
<property name="serverConfig" value="${instanceDir}/serverConfig" if:set="instanceMode"/>
<property name="instancePlugins" value="${instanceDir}/ZLUX/plugins" unless:set="instanceMode"/>
<property name="instancePlugins" value="${instanceDir}/plugins" if:set="instanceMode"/>
<mkdir dir="${instancePlugins}"/>
<mkdir dir="${serverConfig}"/>
<mkdir dir="${instanceDir}/ZLUX/pluginStorage"/>
<!-- A common storage area for apps to deploy their configs into for desktop behavior -->
<property name="instanceActions" value="${instanceDir}/ZLUX/pluginStorage/org.zowe.zlux.ng2desktop/actions"/>
<property name="instanceRecognizers" value="${instanceDir}/ZLUX/pluginStorage/org.zowe.zlux.ng2desktop/recognizers"/>
<mkdir dir="${instanceActions}"/>
<mkdir dir="${instanceRecognizers}"/>
<mkdir dir="${instanceDir}/users"/>
<mkdir dir="${instanceDir}/groups"/>
<!-- # MVD bootstrap -->
<copy unless:set="isZos" todir="${instancePlugins}">
<fileset dir="${pluginDir}" includes="*.json"/>
</copy>
<exec if:set="isZos" executable="sh">
<arg line="-c 'cp -pR ${pluginDir}/*.json ${instancePlugins}'"/>
</exec>
<copy unless:set="isZos" todir="${serverConfig}">
<fileset dir="${home}/defaults/serverConfig">
<include name="zlux.keystore.cer"/>
<include name="zlux.keystore.key"/>
<include name="apiml-localca.cer"/>
<include name="tomcat.xml"/>
</fileset>
</copy>
<exec if:set="isZos" executable="sh">
<arg line="-c 'cp -pR
${home}/defaults/serverConfig/zlux.keystore.cer
${home}/defaults/serverConfig/zlux.keystore.key
${home}/defaults/serverConfig/apiml-localca.cer
${home}/defaults/serverConfig/tomcat.xml
${serverConfig}'"/>
</exec>
<antcall target="traverse"/>
<if>
<available file="../zss/bin/zssServer"/>
<then>
<if>
<isset property="isZos"/>
<then>
<exec executable="sh">
<arg line="-c 'cp -pR ../zss/bin/zssServer ${home}/bin/zssServer'"/>
</exec>
</then>
</if>
</then>
</if>
<chmod unless:set="isWindows" dir="${serverConfig}" perm="750"/>
<chmod unless:set="isWindows" perm="640">
<fileset dir="${serverConfig}"/>
</chmod>
</target>
<target name="cleanDeploy">
<delete quiet="true" dir="${instanceDir}"/>
<delete quiet="true" dir="${siteDir}"/>
<delete quiet="true" includeEmptyDirs="true">
<fileset dir="${instanceDir}" includes="users/*, groups/*"/>
</delete>
</target>
<target name="devClean">
<delete quiet="true" dir="${instancePlugins}"/>
<delete quiet="true" includeEmptyDirs="true">
<fileset dir="${instanceDir}" includes="users/*, groups/*"/>
</delete>
</target>
</project>
<!--
This program and the accompanying materials are
made available under the terms of the Eclipse Public License v2.0 which accompanies
this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html
SPDX-License-Identifier: EPL-2.0
Copyright Contributors to the Zowe Project.
-->