mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-06 17:26:01 +02:00
Updated the build scripts to use scp. This required a little expect magic to get working since the jsch ant plugin had issues hooking up to the new server cluster.
This commit is contained in:
parent
f2e223947e
commit
db27590854
4 changed files with 20 additions and 25 deletions
|
@ -7,11 +7,8 @@ die() {
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
[ -n "$JAVA_HOME" ] || die JAVA_HOME not set
|
|
||||||
[ -n "$ECLIPSE_HOME" ] || die ECLIPSE_HOME not set
|
[ -n "$ECLIPSE_HOME" ] || die ECLIPSE_HOME not set
|
||||||
|
|
||||||
export PATH="$JAVA_HOME/bin:$PATH"
|
|
||||||
|
|
||||||
cd `dirname $0`
|
cd `dirname $0`
|
||||||
|
|
||||||
java -cp $ECLIPSE_HOME/startup.jar org.eclipse.core.launcher.Main -application org.eclipse.ant.core.antRunner $* 2>&1 | tee build.log
|
java -cp $ECLIPSE_HOME/startup.jar org.eclipse.core.launcher.Main -application org.eclipse.ant.core.antRunner $* 2>&1 | tee build.log
|
||||||
|
|
|
@ -23,13 +23,14 @@
|
||||||
<property name="mailto" value="cdt-test-dev@eclipse.org"/>
|
<property name="mailto" value="cdt-test-dev@eclipse.org"/>
|
||||||
<property name="cdtuser" value="nobody"/>
|
<property name="cdtuser" value="nobody"/>
|
||||||
<property name="cdtpasswd" value="home"/>
|
<property name="cdtpasswd" value="home"/>
|
||||||
<property name="remotedir" value="ftp://download1.eclipse.org/cdt/builds/${branchVersion}"/>
|
<property name="remotedir" value="${cdtuser}@download1.eclipse.org:cdt/builds/${branchVersion}"/>
|
||||||
<property name="baseos" value="${osgi.os}"/>
|
<property name="baseos" value="${osgi.os}"/>
|
||||||
<property name="basews" value="${osgi.ws}"/>
|
<property name="basews" value="${osgi.ws}"/>
|
||||||
<property name="basearch" value="${osgi.arch}"/>
|
<property name="basearch" value="${osgi.arch}"/>
|
||||||
<condition property="onWindows">
|
<condition property="onWindows">
|
||||||
<os family="windows"/>
|
<os family="windows"/>
|
||||||
</condition>
|
</condition>
|
||||||
|
<mkdir dir="${buildDirectory}"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="fetch" depends="init">
|
<target name="fetch" depends="init">
|
||||||
|
@ -48,7 +49,7 @@
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="unzip" depends="init" unless="dontUnzip">
|
<target name="unzip" depends="init" unless="dontUnzip">
|
||||||
<unzip src="${eclipseZip}" dest="${buildDirectory}"/>
|
<untar src="${eclipseZip}" dest="${buildDirectory}" compression="gzip"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="zips" depends="init,unzip">
|
<target name="zips" depends="init,unzip">
|
||||||
|
@ -107,23 +108,23 @@
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="upload" depends="init" unless="hasErrors">
|
<target name="upload" depends="init" unless="hasErrors">
|
||||||
<exec dir="${buildDirectory}" executable="curl">
|
<exec dir="${buildDirectory}" executable="expect">
|
||||||
<arg line="-s -u${cdtuser}:${cdtpasswd} ${remotedir}/index.html -o index.html"/>
|
<arg line="${basedir}/myscp ${cdtpasswd} ${remotedir}/index.html index.html"/>
|
||||||
</exec>
|
</exec>
|
||||||
<replace file="${buildDirectory}/index.html">
|
<replace file="${buildDirectory}/index.html">
|
||||||
<replacetoken><![CDATA[ <!-- add here -->]]></replacetoken>
|
<replacetoken><![CDATA[ <!-- add here -->]]></replacetoken>
|
||||||
<replacevalue><![CDATA[ <li><a href="@buildId@/index.html">@buildId@</a></li>
|
<replacevalue><![CDATA[ <li><a href="@buildType@.@buildId@/index.html">@buildId@</a></li>
|
||||||
<!-- add here -->]]></replacevalue>
|
<!-- add here -->]]></replacevalue>
|
||||||
</replace>
|
</replace>
|
||||||
<replace file="${buildDirectory}/index.html">
|
<replace file="${buildDirectory}/index.html">
|
||||||
<replacefilter token="@buildType@" value="${buildType}"/>
|
<replacefilter token="@buildType@" value="${buildType}"/>
|
||||||
<replacefilter token="@buildId@" value="${buildId}"/>
|
<replacefilter token="@buildId@" value="${buildId}"/>
|
||||||
</replace>
|
</replace>
|
||||||
<exec dir="${buildDirectory}" executable="curl">
|
<exec dir="${buildDirectory}" executable="expect">
|
||||||
<arg line="-s -u${cdtuser}:${cdtpasswd} -T index.html ${remotedir}/index.html"/>
|
<arg line="${basedir}/myscp ${cdtpasswd} index.html ${remotedir}/index.html"/>
|
||||||
</exec>
|
</exec>
|
||||||
<exec dir="${zipsdir}" executable="sh">
|
<exec dir="${buildDirectory}" executable="expect">
|
||||||
<arg line="${basedir}/upload.sh ${cdtuser} ${cdtpasswd} ${remotedir}/${buildId}/"/>
|
<arg line="${basedir}/myscp ${cdtpasswd} -r ${buildType}.${buildId} ${remotedir}"/>
|
||||||
</exec>
|
</exec>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
@ -139,7 +140,7 @@
|
||||||
<replacefilter token="@buildId@" value="${buildId}"/>
|
<replacefilter token="@buildId@" value="${buildId}"/>
|
||||||
</replace>
|
</replace>
|
||||||
<mail subject="CDT ${branchVersion} Build ${buildId} completed"
|
<mail subject="CDT ${branchVersion} Build ${buildId} completed"
|
||||||
tolist="${mailto}" from="dschaefe@ca.ibm.com">
|
tolist="${mailto}" from="dschaefe@ca.ibm.com">
|
||||||
<message src="message.txt"/>
|
<message src="message.txt"/>
|
||||||
</mail>
|
</mail>
|
||||||
</target>
|
</target>
|
||||||
|
@ -275,7 +276,7 @@
|
||||||
<!--antcall target="${target}">
|
<!--antcall target="${target}">
|
||||||
<param name="type" value="fragment"/>
|
<param name="type" value="fragment"/>
|
||||||
<param name="dir" value="plugins"/>
|
<param name="dir" value="plugins"/>
|
||||||
<param name="id" value="org.eclipse.cdt.source.hpux.motif.PA_RISC"/>
|
<param name="id" value="org.eclipse.cdt.source.dschaefer2hpux.motif.PA_RISC"/>
|
||||||
</antcall-->
|
</antcall-->
|
||||||
<antcall target="${target}">
|
<antcall target="${target}">
|
||||||
<param name="type" value="fragment"/>
|
<param name="type" value="fragment"/>
|
||||||
|
|
8
releng/org.eclipse.cdt.releng/myscp
Normal file
8
releng/org.eclipse.cdt.releng/myscp
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
#!/usr/bin/expect -f
|
||||||
|
|
||||||
|
set passwd [lindex $argv 0]
|
||||||
|
set timeout 6000
|
||||||
|
|
||||||
|
set id [eval spawn scp -q [lrange $argv 1 end]]
|
||||||
|
expect "Password:" { send "$passwd\r" }
|
||||||
|
expect
|
|
@ -1,11 +0,0 @@
|
||||||
# This script must be run from the directory you want to upload
|
|
||||||
|
|
||||||
# Arguments
|
|
||||||
# $1 - username
|
|
||||||
# $2 - password
|
|
||||||
# $3 - target URL
|
|
||||||
|
|
||||||
for i in *
|
|
||||||
do
|
|
||||||
curl -s --ftp-create-dirs -u$1:$2 -T $i $3
|
|
||||||
done
|
|
Loading…
Add table
Reference in a new issue