Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/sourcetools/JCL_Ant_Build/symlink_jcl.xml
5986 views
1
<project name="symlink_jcl" basedir=".">
2
<!--
3
Copyright (c) 2014, 2017 IBM Corp. and others
4
5
This program and the accompanying materials are made available under
6
the terms of the Eclipse Public License 2.0 which accompanies this
7
distribution and is available at https://www.eclipse.org/legal/epl-2.0/
8
or the Apache License, Version 2.0 which accompanies this distribution and
9
is available at https://www.apache.org/licenses/LICENSE-2.0.
10
11
This Source Code may also be made available under the following
12
Secondary Licenses when the conditions for such availability set
13
forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
14
General Public License, version 2 with the GNU Classpath
15
Exception [1] and GNU General Public License, version 2 with the
16
OpenJDK Assembly Exception [2].
17
18
[1] https://www.gnu.org/software/classpath/license.html
19
[2] http://openjdk.java.net/legal/assembly-exception.html
20
21
SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
22
-->
23
<description>Creates symlinks between </description>
24
25
<!-- Import custom tasks -->
26
<taskdef resource='net/sf/antcontrib/antlib.xml'/>
27
<taskdef resource='com/ibm/j9/ant/antlib.xml'/>
28
<taskdef name="stringutil" classname="ise.antelope.tasks.StringUtilTask"/>
29
30
<stopwatch name="timer"/>
31
32
<!-- Properties -->
33
<fail unless="stream" message="Missing stream name for destination directory: e.g. R25_current" />
34
<fail unless="job.buildId" message="Missing build id: e.g. 19729" />
35
<fail unless="build.type" message="Missing build type: e.g. continuous, promotion or integration" />
36
<fail unless="build.component" message="Missing component type: e.g. VM, GC or JIT" />
37
<fail unless="storage.server" message="Missing storage server hostname: e.g. vmtank.ottawa.ibm.com" />
38
<fail unless="timestamp" message="Missing J9 timestamp [format:yyyymmdd]: e.g. 20100419" />
39
40
<property name="ant.enable.asserts" value="true" />
41
<property name="user.name" value="j9build" />
42
<property name="store.root.dir" value="/vm_archive" />
43
44
<stringutil string="${build.component}" property="build.component">
45
<lowercase/>
46
</stringutil>
47
48
<if>
49
<equals arg1="${build.type}" arg2="continuous"/>
50
<then>
51
<property name="build.tag" value="cbuild_${build.component}" />
52
</then>
53
</if>
54
<if>
55
<equals arg1="${build.type}" arg2="promotion"/>
56
<then>
57
<property name="build.tag" value="pbuild_${build.component}" />
58
</then>
59
</if>
60
<if>
61
<equals arg1="${build.type}" arg2="integration"/>
62
<then>
63
<property name="build.tag" value="ibuild" />
64
</then>
65
</if>
66
<if>
67
<equals arg1="${build.type}" arg2="feature"/>
68
<then>
69
<property name="build.tag" value="fbuild" />
70
</then>
71
</if>
72
<if>
73
<equals arg1="${build.type}" arg2="service"/>
74
<then>
75
<property name="build.tag" value="sbuild" />
76
</then>
77
</if>
78
<if>
79
<equals arg1="${build.type}" arg2="monolithic"/>
80
<then>
81
<property name="build.tag" value="ibuild" />
82
</then>
83
</if>
84
<if>
85
<equals arg1="${build.type}" arg2="developer"/>
86
<then>
87
<property name="build.tag" value="developer" />
88
</then>
89
</if>
90
<if>
91
<equals arg1="${build.type}" arg2="customized" />
92
<then>
93
<property name="build.tag" value="customized" />
94
</then>
95
</if>
96
<if>
97
<equals arg1="${build.type}" arg2="codecoverage"/>
98
<then>
99
<property name="build.tag" value="codecoverage" />
100
</then>
101
</if>
102
<if>
103
<equals arg1="${build.type}" arg2="acceptance"/>
104
<then>
105
<property name="build.tag" value="acceptance" />
106
</then>
107
</if>
108
109
<target name="symlink_JCLs_in_vmtank">
110
111
<property name="dest.dir" value="${store.root.dir}/${stream}/JCLandJCLTests/${job.buildId}" />
112
113
<if>
114
<equals arg1="${build.type}" arg2="feature" />
115
<then>
116
<property name="feature.dest.dir" value="${store.root.dir}/${product}/JCLandJCLTests" />
117
<property name="command_line" value="mkdir -p ${feature.dest.dir}/ ; rm -r ${feature.dest.dir}/${job.buildId} ; ln -s ${dest.dir} ${feature.dest.dir}/${job.buildId}" />
118
</then>
119
<else>
120
<property name="dest.dir.symlink_1" value="${store.root.dir}/${stream}/JCLandJCLTests/${build.tag}_${job.buildId}" />
121
<property name="dest.dir.symlink_2" value="${store.root.dir}/${stream}/JCLandJCLTests/${timestamp}_${job.buildId}" />
122
<property name="command_line" value="cd ${dest.dir} ; rm -r ${dest.dir.symlink_1}; ln -s ${job.buildId} ${dest.dir.symlink_1}; rm -r ${dest.dir.symlink_2}; ln -s ${job.buildId} ${dest.dir.symlink_2}" />
123
</else>
124
</if>
125
126
<echo>Symlinking ${job.buildId} to ${dest.dir.symlink}</echo>
127
<sshexec host="${storage.server}"
128
keyfile="${user.home}/.ssh/id_rsa"
129
username="${user.name}"
130
failonerror="true"
131
passphrase=""
132
verbose="true"
133
trust="true"
134
command="${command_line}" />
135
<stopwatch name="timer" action="elapsed"/>
136
137
</target>
138
</project>
139