update build script for git repo
diff --git a/plugins/org.eclipse.datatools.releng.builder/bootstrap.sh b/plugins/org.eclipse.datatools.releng.builder/bootstrap.sh
index e7aefb6..a61964e 100644
--- a/plugins/org.eclipse.datatools.releng.builder/bootstrap.sh
+++ b/plugins/org.eclipse.datatools.releng.builder/bootstrap.sh
@@ -9,18 +9,24 @@
DISPLAY=:0.0
export DISPLAY
+CVSROOT=:ext:xgu@dev.eclipse.org:/cvsroot/datatools
CVS_RSH=ssh
ulimit -c unlimited
-export CVS_RSH USERNAME BASH_ENV LD_LIBRARY_PATH DISPLAY
+export CVSROOT CVS_RSH USERNAME BASH_ENV LD_LIBRARY_PATH DISPLAY
-if [ "x"$ANT_HOME = "x" ]; then export ANT_HOME=/usr/local/apache-ant-1.6.5; fi
+#cvs update -r HEAD -C -d buildAll.xml build.xml eclipse extras
+#dos2unix extras/updateFeatureTag.sh extras/checkCompareDone.sh
+#chmod -R +x build.xml buildAll.xml eclipse extras
+
+if [ "x"$ANT_HOME = "x" ]; then export ANT_HOME=/usr/local/apache-ant-1.7.0; fi
if [ "x"$JAVA_HOME = "x" ]; then export JAVA_HOME=/usr/local/j2sdk1.4.2_13; fi
export PATH=${PATH}:${ANT_HOME}/bin:/usr/local/bin
proc=$$
#notification list
-recipients=
+recipients=yjiang@actuate.com,xgu@actuate.com
+sender=qa-build@actuate.com
#sets skip.performance.tests Ant property
skipPerf=""
@@ -58,13 +64,13 @@
mapVersionTag=HEAD
# directory in which to export builder projects
-builderDir=/home/adb/releng.dtp/org.eclipse.datatools.releng.builder/
+builderDir=/home/adb/releng.dtp.191/org.eclipse.datatools.releng.builder/
# buildtype determines whether map file tags are used as entered or are replaced with HEAD
buildType=I
# directory where to copy build
-postingDirectory=/home/adb/releng/BIRTOutput/dtp.output/1.6
+postingDirectory=/home/adb/releng/BIRTOutput/dtp.output/1.9.1
# flag to indicate if test build
testBuild=""
@@ -101,6 +107,7 @@
-buildLabel) buildLabel="$2"; shift;;
-mapVersionTag) mapVersionTag="$2"; shift;;
-tagMapFiles) tagMaps="-DtagMaps=true";;
+ -noSign) noSign="-DnoSign=true";;
-skipPerf) skipPerf="-Dskip.performance.tests=true";;
-skipTest) skipTest="-Dskip.tests=true";;
-buildDirectory) builderDir="$2"; shift;;
@@ -109,7 +116,8 @@
-builderTag) buildProjectTags="$2"; shift;;
-compareMaps) compareMaps="-DcompareMaps=true";;
-updateSite) updateSite="-DupdateSite=$2";shift;;
- -sign) sign="-Dsign=true";;
+ -sign) sign="-Dsign=true";shift;;
+ -upload) upload=true;;
-*)
echo >&2 $usage
exit 1;;
@@ -138,7 +146,7 @@
#Set the tag to HEAD for Nightly builds
if [ "$buildType" = "N" ]
then
- tag="-DfetchTag=HEAD"
+ tag="-DfetchTag=CVS=HEAD,GIT=master"
versionQualifier="-DforceContextQualifier=$buildId"
fi
@@ -163,7 +171,7 @@
#fi
# directory where features and plugins will be compiled
-buildDirectory=/home/adb/releng.dtp/BIRT_Build_Dir
+buildDirectory=/home/adb/releng.dtp.191/BIRT_Build_Dir
echo "======[buildDirectory]: $buildDirectory" >> adb.log
@@ -179,50 +187,58 @@
bootclasspath="/usr/local/j2sdk1.4.2_13/jre/lib/rt.jar:/usr/local/j2sdk1.4.2_13/jre/lib/jsse.jar:/usr/local/j2sdk1.4.2_13/jre/lib/jce.jar"
#bootclasspath="/usr/local/j2sdk1.4.2_13/jre/lib/rt.jar:/usr/local/j2sdk1.4.2_13/jre/lib/jsse.jar"
bootclasspath_15="/usr/local/jdk1.5.0_02/jre/lib/rt.jar:/usr/local/jdk1.5.0_02/jre/lib/jce.jar"
+bootclasspath_16="/usr/local/jdk1.6.0/jre/lib/rt.jar:/usr/local/jdk1.6.0/jre/lib/jsse.jar"
jvm15_home="/usr/local/jdk1.5.0_02"
-cd /home/adb/releng.dtp/org.eclipse.datatools.releng.builder
+cd /home/adb/releng.dtp.191/org.eclipse.datatools.releng.builder
echo buildId=$buildId >> monitor.properties
echo timestamp=$timestamp >> monitor.properties
echo buildLabel=$buildLabel >> monitor.properties
+echo currentDay=$builddate >> monitor.properties
echo recipients=$recipients >> monitor.properties
+echo sender=$sender >> monitor.properties
echo log=$postingDirectory/$buildLabel/index.php >> monitor.properties
#the base command used to run AntRunner headless
-antRunner="/usr/local/j2sdk1.4.2_13/bin/java -Xmx500m -jar ../org.eclipse.releng.basebuilder/plugins/org.eclipse.equinox.launcher.jar -Dosgi.os=linux -Dosgi.ws=gtk -Dosgi.arch=ppc -application org.eclipse.ant.core.antRunner"
+antRunner="/usr/local/jdk1.5.0_09/bin/java -Xmx500m -jar ../org.eclipse.releng.basebuilder/plugins/org.eclipse.equinox.launcher.jar -Dosgi.os=linux -Dosgi.ws=gtk -Dosgi.arch=ppc -application org.eclipse.ant.core.antRunner"
+#antRunner="/usr/local/j2sdk1.4.2_13/bin/java -Xmx500m -jar ../org.eclipse.releng.basebuilder/plugins/org.eclipse.equinox.launcher.jar -Dosgi.os=linux -Dosgi.ws=gtk -Dosgi.arch=ppc -application org.eclipse.ant.core.antRunner"
echo "==========[antRunner]: $antRunner" >> adb.log
-#/home/adb/releng.dtp/BIRTBuilder/replaceBuildInfo.sh $buildinfoDate $buildinfounivDate
+#/home/adb/releng.dtp.191/BIRTBuilder/replaceBuildInfo.sh $buildinfoDate $buildinfounivDate
#clean drop directories
#full command with args
-#buildId=v20080325-0953
+#buildId=v20110808-1451
echo $tagMaps >> adb.log
echo $compareMaps >> adb.log
-cp /home/adb/releng.dtp/dtpURLmonitor.properties /home/adb/releng.230/src/
+#cp /home/adb/releng.dtp.191/dtpURLmonitor.properties /home/adb/releng.260/src/
+
+#cp /home/adb/releng.dtp.191/org.eclipse.datatools.releng.builder/customTargets.xml /home/adb/releng.dtp.191/org.eclipse.datatools.releng.builder/eclipse/buildConfigs/dtp.sdk.all/
buildCommand="$antRunner -q -buildfile buildAll.xml $mail $testBuild $compareMaps \
-DmapVersionTag=$mapVersionTag -DpostingDirectory=$postingDirectory \
--Dbootclasspath=$bootclasspath -DbuildType=$buildType -D$buildType=true \
--DbuildId=$buildId -Dbuildid=$buildId -DbuildLabel=$buildId -Dtimestamp=$timestamp $skipPerf $skipTest $tagMaps \
--DJ2SE-1.5=$bootclasspath_15 -DlogExtension=.xml $javadoc $updateSite $sign \
--Djava15-home=$bootclasspath_15 -DbuildDirectory=/home/adb/releng.dtp/src \
--DbaseLocation=/home/adb/releng.dtp/baseLocation -Dwtp.home=/home/adb/releng.dtp/baseLocation \
--DgroupConfiguration=true -DjavacVerbose=true \
--Dbasebuilder=/home/adb/releng.dtp/org.eclipse.releng.basebuilder \
--Djvm15_home=$jvm15_home -DmapTag.properties=/home/adb/releng.dtp/org.eclipse.datatools.releng.builder/mapTag.properties \
--Dbuild.date=$builddate -Dpackage.version=1.8.0-$timestamp \
--DmapCvsRoot=:ext:xgu@dev.eclipse.org:/cvsroot/datatools \
--DmapVersionTag=HEAD \
--Ddtp.url.token=@DTP.URL.TOKEN@ \
--DjavacTarget=1.5 -DjavacSource=1.5"
+-Dbootclasspath=$bootclasspath_15 -DbuildType=$buildType -D$buildType=true \
+-DbuildId=$buildId -Dbuildid=$buildId -DbuildLabel=$buildId -Dtimestamp=$timestamp $skipPerf $skipTest $tagMaps $noSign \
+-DJ2SE-1.5=$bootclasspath_15 -DJavaSE-1.6=$bootclasspath_16 -DlogExtension=.xml $javadoc $updateSite $sign \
+-Djava15-home=$bootclasspath_15 -DbuildDirectory=/home/adb/releng.dtp.191/src \
+-DbaseLocation=/home/adb/releng.dtp.191/baseLocation -Dwtp.home=/home/adb/releng.dtp.191/baseLocation \
+-DgroupConfiguration=true -DjavacVerbose=true -DjavacFailOnError=false \
+-Dbasebuilder=/home/adb/releng.dtp.191/org.eclipse.releng.basebuilder \
+-Djvm15_home=$jvm15_home -DmapTag.properties=/home/adb/releng.dtp.191/org.eclipse.datatools.releng.builder/mapTag.properties \
+-Dbuild.date=$builddate -Dpackage.version=1.9.1RC1-$timestamp \
+-DmapGitRoot=ssh://xgu@git.eclipse.org/gitroot/datatools \
+-DmapVersionTag=master -DBranchVersion=1.9.1 -DjavacTarget=1.5 -DjavacSource=1.5 \
+-Dusername.sign=slee -Dpassword.sign= -Dhostname.sign=build.eclipse.org -Dhome.dir=/home/data/users/slee -Dsign.dir=/home/data/httpd/download-staging.priv/birt"
+#-DmapCvsRoot=:ext:xgu@dev.eclipse.org:/cvsroot/datatools \
+#-Ddtp.url.token=:ext:xgu@dev.eclipse.org:/cvsroot/datatools \
+#-Ddtp.url.newvalue=:ext:xgu@192.168.218.218:/cvsroot/datatools"
#skipPreBuild
@@ -241,4 +257,5 @@
#clean up
#rm -rf $builderDir
-rm -rf /home/adb/releng.dtp/src/$buildId
+rm -rf /home/adb/releng.dtp.191/src/$buildId
+cp -f /home/adb/releng.dtp.191/src/directory.txt last_directory.txt
diff --git a/plugins/org.eclipse.datatools.releng.builder/buildAll.xml b/plugins/org.eclipse.datatools.releng.builder/buildAll.xml
index ccd9a88..dc9ee9a 100644
--- a/plugins/org.eclipse.datatools.releng.builder/buildAll.xml
+++ b/plugins/org.eclipse.datatools.releng.builder/buildAll.xml
@@ -44,6 +44,7 @@
<target name="main" depends="init">
<antcall target="prepareMapFile"/>
<antcall target="buildDtpSdkAllFeature"/>
+ <antcall target="compareMapFiles" />
<antcall target="buildDtpEnablementAllFeature"/>
<antcall target="buildDtpDocISV"/>
<antcall target="buildDtpIncubationAllFeature"/>
@@ -58,7 +59,7 @@
<ant antfile="build.xml" target="init" />
<property file="${buildDirectory}/label.properties" />
- <condition property="fetchTag" value="HEAD">
+ <condition property="fetchTag" value="CVS=HEAD,GIT=master">
<equals arg1="${buildType}" arg2="N" />
</condition>
<condition property="forceContextQualifier" value="${buildId}">
@@ -84,50 +85,118 @@
</target>
<target name="checkLocal">
- <available property="mapsLocal" file="${buildDirectory}/maps/org.eclipse.datatools.releng" />
+ <available property="mapsLocal" file="${buildDirectory}/maps/releng" />
</target>
-
+
<target name="prepareMapFile" depends="checkLocal" unless="mapsLocal">
- <cvs cvsRoot="${mapCvsRoot}"
- package="org.eclipse.datatools.releng" dest="${buildDirectory}/maps" tag="${mapVersionTag}" />
-
- <cvs cvsRoot="${mapCvsRoot}"
- package="org.eclipse.datatools.connectivity/releng/org.eclipse.datatools.connectivity.releng"
- dest="${buildDirectory}/maps" tag="${mapVersionTag}" />
- <cvs cvsRoot="${mapCvsRoot}"
- package="org.eclipse.datatools.enablement/releng/org.eclipse.datatools.enablement.releng"
- dest="${buildDirectory}/maps" tag="${mapVersionTag}" />
- <cvs cvsRoot="${mapCvsRoot}"
- package="org.eclipse.datatools.modelbase/releng/org.eclipse.datatools.modelbase.releng"
- dest="${buildDirectory}/maps" tag="${mapVersionTag}" />
- <cvs cvsRoot="${mapCvsRoot}"
- package="org.eclipse.datatools.sqltools/releng/org.eclipse.datatools.sqltools.releng"
- dest="${buildDirectory}/maps" tag="${mapVersionTag}" />
- <cvs cvsRoot="${mapCvsRoot}"
- package="org.eclipse.datatools.incubator/releng/org.eclipse.datatools.incubator.releng"
- dest="${buildDirectory}/maps" tag="${mapVersionTag}" />
+ <!--delete dir="${buildDirectory}/TempRepo" failonerror="false" /-->
+ <antcall target="GetMapFiles">
+ <param name="gitRepo.name" value="org.eclipse.datatools.build.git"/>
+ </antcall>
+ <antcall target="GetMapFiles">
+ <param name="gitRepo.name" value="org.eclipse.datatools.incubator.git"/>
+ </antcall>
+ <antcall target="GetMapFiles">
+ <param name="gitRepo.name" value="org.eclipse.datatools.connectivity.git"/>
+ </antcall>
+ <antcall target="GetMapFiles">
+ <param name="gitRepo.name" value="org.eclipse.datatools.modelbase.git"/>
+ </antcall>
+ <antcall target="GetMapFiles">
+ <param name="gitRepo.name" value="org.eclipse.datatools.sqltools.git"/>
+ </antcall>
+ <antcall target="GetMapFiles">
+ <param name="gitRepo.name" value="org.eclipse.datatools.doc.git"/>
+ </antcall>
+ <antcall target="GetMapFiles">
+ <param name="gitRepo.name" value="org.eclipse.datatools.enablement.general.git"/>
+ </antcall>
+ <antcall target="GetMapFiles">
+ <param name="gitRepo.name" value="org.eclipse.datatools.enablement.hsqldb.git"/>
+ </antcall>
+ <antcall target="GetMapFiles">
+ <param name="gitRepo.name" value="org.eclipse.datatools.enablement.ibm.git"/>
+ </antcall>
+ <antcall target="GetMapFiles">
+ <param name="gitRepo.name" value="org.eclipse.datatools.enablement.ingres.git"/>
+ </antcall>
+ <antcall target="GetMapFiles">
+ <param name="gitRepo.name" value="org.eclipse.datatools.enablement.msft.git"/>
+ </antcall>
+ <antcall target="GetMapFiles">
+ <param name="gitRepo.name" value="org.eclipse.datatools.enablement.mysql.git"/>
+ </antcall>
+ <antcall target="GetMapFiles">
+ <param name="gitRepo.name" value="org.eclipse.datatools.enablement.oda.git"/>
+ </antcall>
+ <antcall target="GetMapFiles">
+ <param name="gitRepo.name" value="org.eclipse.datatools.enablement.oracle.git"/>
+ </antcall>
+ <antcall target="GetMapFiles">
+ <param name="gitRepo.name" value="org.eclipse.datatools.enablement.postgresql.git"/>
+ </antcall>
+ <antcall target="GetMapFiles">
+ <param name="gitRepo.name" value="org.eclipse.datatools.enablement.sap.git"/>
+ </antcall>
+ <antcall target="GetMapFiles">
+ <param name="gitRepo.name" value="org.eclipse.datatools.enablement.sqlite.git"/>
+ </antcall>
+ <antcall target="GetMapFiles">
+ <param name="gitRepo.name" value="org.eclipse.datatools.enablement.sybase.git"/>
+ </antcall>
+
<!--compare the map files project-->
- <antcall target="compareMapFiles" />
+ <!--antcall target="compareMapFiles" /-->
+
<!--tag the map files project-->
<antcall target="tagMapFiles" />
<!-- this value could be overwrite by the bootstrap command -->
- <property name="dtp.url.token" value="@DTP.URL.TOKEN@"/>
+ <!--property name="dtp.url.token" value="@DTP.URL.TOKEN@"/>
<property name="dtp.url.newvalue" value="${mapCvsRoot}"/>
<replace dir="${buildDirectory}/maps" value="${dtp.url.newvalue}" token="${dtp.url.token}">
<include name="**/*.map" />
- </replace>
+ </replace-->
+
+ <!--delete dir="${buildDirectory}/TempRepo" failonerror="false" /-->
</target>
+ <target name="GetMapFiles">
+ <!--echo message="git clone ${mapGitRoot}/${gitRepo.name}.git ${buildDirectory}/TempRepo/${gitRepo.name}"/>
+ <exec executable="git">
+ <arg line="clone ${mapGitRoot}/${gitRepo.name}.git ${buildDirectory}/TempRepo/${gitRepo.name}"/>
+ </exec>
+ <exec executable="git" dir="${buildDirectory}/TempRepo/${gitRepo.name}">
+ <arg line="checkout ${mapVersionTag}"/>
+ </exec>
+ <copy todir="${buildDirectory}/maps">
+ <fileset dir="${buildDirectory}/TempRepo/${gitRepo.name}/releng" includes="${gitRepo.name}.releng/**"/>
+ </copy-->
+ <echo message="git archive -o ${buildDirectory}/maps/${gitRepo.name}.maps.tar --remote=${mapGitRoot}/${gitRepo.name} ${mapVersionTag} releng"/>
+ <exec executable="git" dir="${buildDirectory}/maps" output="${buildDirectory}/maps/${gitRepo.name}.maps.tar">
+ <arg line="archive --format=tar" />
+ <arg line="--remote=${mapGitRoot}/${gitRepo.name}" />
+ <arg line="${mapVersionTag} releng" />
+ </exec>
+ <untar src="${buildDirectory}/maps/${gitRepo.name}.maps.tar" dest="${buildDirectory}/maps" />
+ </target>
+
<target name="compareMapFiles" if="compareMaps">
- <property file="${mapTag.properties}"/>
+ <!--property file="${mapTag.properties}"/>
<property name="cvsDiffFile" value="${buildDirectory}/cvsDiff.txt" />
<cvs cvsRoot="${mapCvsRoot}" dest="${buildDirectory}/maps" command="diff -w -r ${lastMapTag}" output="${cvsDiffFile}" />
- <modifiedMaps mapDiffFile="${cvsDiffFile}" />
+ <modifiedMaps mapDiffFile="${cvsDiffFile}" /-->
+
+ <condition property="NoMapChange">
+ <filesmatch file1="${buildDirectory}/directory.txt" file2="last_directory.txt"/>
+ </condition>
+ <ant antfile="${eclipse.build.configs}/../helper.xml" target="InformCancelBuild" />
+ <fail message="No change in map files, canceled build" if="NoMapChange"/>
+
</target>
<target name="tagMapFiles" if="tagMaps">
diff --git a/plugins/org.eclipse.datatools.releng.builder/eclipse/buildConfigs/dtp.doc.isv/customTargets.xml b/plugins/org.eclipse.datatools.releng.builder/eclipse/buildConfigs/dtp.doc.isv/customTargets.xml
index db7fb30..22a6896 100644
--- a/plugins/org.eclipse.datatools.releng.builder/eclipse/buildConfigs/dtp.doc.isv/customTargets.xml
+++ b/plugins/org.eclipse.datatools.releng.builder/eclipse/buildConfigs/dtp.doc.isv/customTargets.xml
@@ -40,7 +40,7 @@
<!-- Replace values for cvsRoot, package and mapVersionTag as desired. -->
<!-- ===================================================================== -->
<target name="checkLocal">
- <available property="mapsLocal" file="${buildDirectory}/maps/org.eclipse.datatools.releng" />
+ <available property="mapsLocal" file="${buildDirectory}/maps/releng" />
</target>
<target name="getMapFiles" depends="checkLocal" unless="mapsLocal">
diff --git a/plugins/org.eclipse.datatools.releng.builder/eclipse/buildConfigs/dtp.enablement.all/customTargets.xml b/plugins/org.eclipse.datatools.releng.builder/eclipse/buildConfigs/dtp.enablement.all/customTargets.xml
index e40eabb..cb022dd 100644
--- a/plugins/org.eclipse.datatools.releng.builder/eclipse/buildConfigs/dtp.enablement.all/customTargets.xml
+++ b/plugins/org.eclipse.datatools.releng.builder/eclipse/buildConfigs/dtp.enablement.all/customTargets.xml
@@ -40,7 +40,7 @@
<!-- Replace values for cvsRoot, package and mapVersionTag as desired. -->
<!-- ===================================================================== -->
<target name="checkLocal">
- <available property="mapsLocal" file="${buildDirectory}/maps/org.eclipse.datatools.releng" />
+ <available property="mapsLocal" file="${buildDirectory}/maps/releng" />
<!--
<available property="mapsLocal" file="${buildDirectory}/maps/source/pde_build/maps" />
-->
diff --git a/plugins/org.eclipse.datatools.releng.builder/eclipse/buildConfigs/dtp.incubation.all/customTargets.xml b/plugins/org.eclipse.datatools.releng.builder/eclipse/buildConfigs/dtp.incubation.all/customTargets.xml
index b0e67a9..c1e682b 100644
--- a/plugins/org.eclipse.datatools.releng.builder/eclipse/buildConfigs/dtp.incubation.all/customTargets.xml
+++ b/plugins/org.eclipse.datatools.releng.builder/eclipse/buildConfigs/dtp.incubation.all/customTargets.xml
@@ -40,7 +40,7 @@
<!-- Replace values for cvsRoot, package and mapVersionTag as desired. -->
<!-- ===================================================================== -->
<target name="checkLocal">
- <available property="mapsLocal" file="${buildDirectory}/maps/org.eclipse.datatools.releng" />
+ <available property="mapsLocal" file="${buildDirectory}/maps/releng" />
</target>
<target name="getMapFiles" depends="checkLocal" unless="mapsLocal">
diff --git a/plugins/org.eclipse.datatools.releng.builder/eclipse/buildConfigs/dtp.sdk.all/customTargets.xml b/plugins/org.eclipse.datatools.releng.builder/eclipse/buildConfigs/dtp.sdk.all/customTargets.xml
index ece235f..668e38e 100644
--- a/plugins/org.eclipse.datatools.releng.builder/eclipse/buildConfigs/dtp.sdk.all/customTargets.xml
+++ b/plugins/org.eclipse.datatools.releng.builder/eclipse/buildConfigs/dtp.sdk.all/customTargets.xml
@@ -40,7 +40,7 @@
<!-- Replace values for cvsRoot, package and mapVersionTag as desired. -->
<!-- ===================================================================== -->
<target name="checkLocal">
- <available property="mapsLocal" file="${buildDirectory}/maps/org.eclipse.datatools.releng" />
+ <available property="mapsLocal" file="${buildDirectory}/maps/releng" />
</target>
<target name="getMapFiles" depends="checkLocal" unless="mapsLocal">