| <project |
| name="upload" |
| default="upload" |
| basedir="."> |
| |
| <!-- if not set by caller, assign default value. In this case, this must be |
| set before calling other property files, since it is a variable in those |
| property files --> |
| |
| <property |
| name="site-sub-dir" |
| value="committers" /> |
| |
| <!-- = = = standard properties pattern = = = --> |
| <!-- |
| Note to be cross-platform, "environment variables" are only appropriate for |
| some variables, e.g. ones we set, since properties are case sensitive, even if |
| the environment variables on your operating system are not, e.g. it will |
| be ${env.Path} not ${env.PATH} on Windows --> |
| <property environment="env" /> |
| |
| <!-- |
| Let users override standard properties, if desired. |
| If directory, file, or some properties do not exist, |
| then standard properties will be used. |
| --> |
| <property |
| file="${env.LOCAL_BUILD_PROPERTIES_DIR}/${ant.project.name}.properties" /> |
| |
| <!-- = = = end standard properties pattern = = = --> |
| |
| |
| <!-- if not otherwise set, these are standard properties --> |
| |
| <property |
| name="site-sub-dir" |
| value="committers" /> |
| |
| |
| <property |
| name="uploadUser" |
| value="david_williams" /> |
| <property |
| name="uploadPassword" |
| value="This is not really used since ssh login is assumed (required)" /> |
| <property |
| name="uploadServer" |
| value="download.eclipse.org" /> |
| <property |
| name="uploadRemoteDirectory" |
| value="/home/data/users/${uploadUser}/downloads/webtools/${site-sub-dir}/drops/${buildBranch}" /> |
| <!-- rsyncRootPrefix should be empty for Linux machines. --> |
| <!-- But, Windows using cygwin will need something like /cygdrive/G/ --> |
| <!-- for what ever drive or directory is parent of build home --> |
| <property |
| name="rsyncRootPrefix" |
| value="" /> |
| <!-- end standard properties --> |
| |
| |
| |
| <target |
| name="upload" |
| depends="check.upload" |
| if="doUpload"> |
| |
| |
| |
| <ant antfile="${wtp.builder.home}/scripts/build/label.xml" /> |
| <property file="${buildDirectory}/label.properties" /> |
| |
| <echo |
| level="debug" |
| message="chmod for ${buildDirectory}/${buildLabel}" /> |
| <!-- synch on host is a tiny bit faster if permisions already set --> |
| <!-- and, remember, chmod ant task is implemented only for unix --> |
| <!-- TODO: put in windows logic here? --> |
| <exec executable="chmod"> |
| <arg line="-Rc o+rx ${buildDirectory}/${buildLabel}" /> |
| </exec> |
| |
| <echo |
| level="info" |
| message="RSYNC to: ${uploadRemoteDirectory}/${buildLabel}" /> |
| |
| <exec executable="rsync"> |
| <arg |
| line="-e ssh -Cavz ${rsyncRootPrefix}${buildDirectory}/${buildLabel} ${uploadUser}@${uploadServer}:${uploadRemoteDirectory}" /> |
| </exec> |
| </target> |
| |
| <target name="check.upload"> |
| <condition property="doUpload"> |
| <equals |
| arg1="${env.BUILD_UPLOAD}" |
| arg2="true" |
| casesensitive="false" |
| trim="true"/> |
| </condition> |
| </target> |
| |
| </project> |