Path: blob/master/sourcetools/JCL_Ant_Build/symlink_jcl.xml
5986 views
<project name="symlink_jcl" basedir=".">1<!--2Copyright (c) 2014, 2017 IBM Corp. and others34This program and the accompanying materials are made available under5the terms of the Eclipse Public License 2.0 which accompanies this6distribution and is available at https://www.eclipse.org/legal/epl-2.0/7or the Apache License, Version 2.0 which accompanies this distribution and8is available at https://www.apache.org/licenses/LICENSE-2.0.910This Source Code may also be made available under the following11Secondary Licenses when the conditions for such availability set12forth in the Eclipse Public License, v. 2.0 are satisfied: GNU13General Public License, version 2 with the GNU Classpath14Exception [1] and GNU General Public License, version 2 with the15OpenJDK Assembly Exception [2].1617[1] https://www.gnu.org/software/classpath/license.html18[2] http://openjdk.java.net/legal/assembly-exception.html1920SPDX-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-exception21-->22<description>Creates symlinks between </description>2324<!-- Import custom tasks -->25<taskdef resource='net/sf/antcontrib/antlib.xml'/>26<taskdef resource='com/ibm/j9/ant/antlib.xml'/>27<taskdef name="stringutil" classname="ise.antelope.tasks.StringUtilTask"/>2829<stopwatch name="timer"/>3031<!-- Properties -->32<fail unless="stream" message="Missing stream name for destination directory: e.g. R25_current" />33<fail unless="job.buildId" message="Missing build id: e.g. 19729" />34<fail unless="build.type" message="Missing build type: e.g. continuous, promotion or integration" />35<fail unless="build.component" message="Missing component type: e.g. VM, GC or JIT" />36<fail unless="storage.server" message="Missing storage server hostname: e.g. vmtank.ottawa.ibm.com" />37<fail unless="timestamp" message="Missing J9 timestamp [format:yyyymmdd]: e.g. 20100419" />3839<property name="ant.enable.asserts" value="true" />40<property name="user.name" value="j9build" />41<property name="store.root.dir" value="/vm_archive" />4243<stringutil string="${build.component}" property="build.component">44<lowercase/>45</stringutil>4647<if>48<equals arg1="${build.type}" arg2="continuous"/>49<then>50<property name="build.tag" value="cbuild_${build.component}" />51</then>52</if>53<if>54<equals arg1="${build.type}" arg2="promotion"/>55<then>56<property name="build.tag" value="pbuild_${build.component}" />57</then>58</if>59<if>60<equals arg1="${build.type}" arg2="integration"/>61<then>62<property name="build.tag" value="ibuild" />63</then>64</if>65<if>66<equals arg1="${build.type}" arg2="feature"/>67<then>68<property name="build.tag" value="fbuild" />69</then>70</if>71<if>72<equals arg1="${build.type}" arg2="service"/>73<then>74<property name="build.tag" value="sbuild" />75</then>76</if>77<if>78<equals arg1="${build.type}" arg2="monolithic"/>79<then>80<property name="build.tag" value="ibuild" />81</then>82</if>83<if>84<equals arg1="${build.type}" arg2="developer"/>85<then>86<property name="build.tag" value="developer" />87</then>88</if>89<if>90<equals arg1="${build.type}" arg2="customized" />91<then>92<property name="build.tag" value="customized" />93</then>94</if>95<if>96<equals arg1="${build.type}" arg2="codecoverage"/>97<then>98<property name="build.tag" value="codecoverage" />99</then>100</if>101<if>102<equals arg1="${build.type}" arg2="acceptance"/>103<then>104<property name="build.tag" value="acceptance" />105</then>106</if>107108<target name="symlink_JCLs_in_vmtank">109110<property name="dest.dir" value="${store.root.dir}/${stream}/JCLandJCLTests/${job.buildId}" />111112<if>113<equals arg1="${build.type}" arg2="feature" />114<then>115<property name="feature.dest.dir" value="${store.root.dir}/${product}/JCLandJCLTests" />116<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}" />117</then>118<else>119<property name="dest.dir.symlink_1" value="${store.root.dir}/${stream}/JCLandJCLTests/${build.tag}_${job.buildId}" />120<property name="dest.dir.symlink_2" value="${store.root.dir}/${stream}/JCLandJCLTests/${timestamp}_${job.buildId}" />121<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}" />122</else>123</if>124125<echo>Symlinking ${job.buildId} to ${dest.dir.symlink}</echo>126<sshexec host="${storage.server}"127keyfile="${user.home}/.ssh/id_rsa"128username="${user.name}"129failonerror="true"130passphrase=""131verbose="true"132trust="true"133command="${command_line}" />134<stopwatch name="timer" action="elapsed"/>135136</target>137</project>138139