Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Sternberg2009-09-21 13:06:54 +0000
committerRalf Sternberg2009-09-21 13:06:54 +0000
commit1aead037393331fdadb324cfb8e509a1cf627df8 (patch)
treeda85ae5a40670f2123150cf71e16862d7b6fcf80
parentd67fe999b655f61e06020c775c38400cdfbf8de9 (diff)
downloadorg.eclipse.rap-1aead037393331fdadb324cfb8e509a1cf627df8.tar.gz
org.eclipse.rap-1aead037393331fdadb324cfb8e509a1cf627df8.tar.xz
org.eclipse.rap-1aead037393331fdadb324cfb8e509a1cf627df8.zip
Update build scripts from hudson
-rwxr-xr-xreleng/org.eclipse.rap.releng/scripts/build-common.sh37
-rwxr-xr-xreleng/org.eclipse.rap.releng/scripts/tooling-hudson.sh13
-rwxr-xr-xreleng/org.eclipse.rap.releng/scripts/war-hudson.sh28
3 files changed, 56 insertions, 22 deletions
diff --git a/releng/org.eclipse.rap.releng/scripts/build-common.sh b/releng/org.eclipse.rap.releng/scripts/build-common.sh
index d66d146529..1cf4328c9f 100755
--- a/releng/org.eclipse.rap.releng/scripts/build-common.sh
+++ b/releng/org.eclipse.rap.releng/scripts/build-common.sh
@@ -53,15 +53,20 @@ done
# resolve relative paths
runtimeDir=`readlink -f $runtimeDir`
basePlatformDir=`readlink -f $basePlatformDir`
-workDir=`readlink -f $workDir`
-outputDir=`readlink -f $outputDir`
+workDir=`readlink -f "$workDir"`
+outputDir=`readlink -f "$outputDir"`
if [ -n "$rapTarget" ]; then
rapTarget=`readlink -f "$rapTarget"`
fi
# Create base working directory
-if [ ! -d $workDir ]; then
- mkdir $workDir
+if [ ! -d "$workDir" ]; then
+ mkdir "$workDir"
+fi
+
+# Create output directory
+if [ ! -d "$outputDir" ]; then
+ mkdir "$outputDir"
fi
# Show informations
@@ -81,12 +86,13 @@ echo ""
# Checkout releng project
echo "Checking out Builder from CVS <$cvsTag>..."
bufferedDir=`pwd`
-cd $workDir
+cd "$workDir"
cvs -Q -f -d:pserver:anonymous@dev.eclipse.org:/cvsroot/rt checkout -d ./builder -r $cvsTag $builderCvsPath
-builderDir=$workDir/builder/
-cd $bufferedDir
+builderDir="$workDir"/builder/
+
+cd "$bufferedDir"
# search pde build
pdeBuild=`ls -1 $runtimeDir/plugins | grep pde.build_ | tail -n 1`
@@ -96,8 +102,9 @@ echo "Using the following PDE Build: $pdeBuild"
launcher=$runtimeDir/plugins/`ls -1 $runtimeDir/plugins | grep launcher_ | tail -n 1`
echo "Using the following Equinox launcher: $launcher"
-if [ -n "$rapTarget" ]; then
- rapTargetArg="-DrapTarget=$rapTarget"
+if [ -z "$rapTarget" ]; then
+# rapTargetArg="\"-DrapTarget=$rapTarget\""
+ rapTarget=none
fi
java -cp $launcher org.eclipse.core.launcher.Main \
@@ -111,10 +118,14 @@ java -cp $launcher org.eclipse.core.launcher.Main \
-DmapsCheckoutTag=$cvsTag \
-DfetchTag=$cvsTag \
-DbaseLocation="$basePlatformDir" \
- $rapTargetArg
+ -DrapTarget="$rapTarget" \
+ -Dfile.encoding=ISO-8859-1
if test $? = 0
then
- echo "Cleaning up workspace"
- rm -rf $workDir/builder
-fi \ No newline at end of file
+ echo "Cleaning up workspace"
+ rm -rf "$workDir"/builder
+else
+ exit $?
+fi
+
diff --git a/releng/org.eclipse.rap.releng/scripts/tooling-hudson.sh b/releng/org.eclipse.rap.releng/scripts/tooling-hudson.sh
index 46127530de..e72d032730 100755
--- a/releng/org.eclipse.rap.releng/scripts/tooling-hudson.sh
+++ b/releng/org.eclipse.rap.releng/scripts/tooling-hudson.sh
@@ -8,17 +8,20 @@
# Cleanup workspace dir
rm -rf "$WORKSPACE"/*
-runtimeDir=/projects/rapbuild/build-runtime/3.4.1/
+runtimeDir=/home/build/rap/build-runtime/eclipse-3.4.1
+rapTargets="/home/build/.hudson/jobs/RAP Runtime/lastSuccessful/archive"
+
+scriptsDir=`dirname $0`
# detect latest runtime target archive
-rapTargets="/home/benny/build-env/"
-latestTarget=$rapTargets/`find $rapTargets -iname '*target*.zip' -printf "%A@;%f\n" | sort | tail -n 1 | cut -f2 -d";"`
+latestTargetQualifier=`find "$rapTargets" -name '*runtime*.zip' -printf "%f\n" | cut -f5,6 -d"-" | sort | tail -n 1`
+latestTarget=`find "$rapTargets" -name *${latestTargetQualifier}`
-./build-common.sh \
+$scriptsDir/build-common.sh \
--cvs-tag "$CVS_TAG" \
--build-type "$BUILD_TYPE" \
--work "$WORKSPACE" \
--runtime "$runtimeDir" \
--base-platform "$PLATFORM_DIR" \
--builder "org.eclipse.rap/releng/org.eclipse.rap.releng.tooling" \
- --rap-target "$latestTarget" \ No newline at end of file
+ --rap-target "$latestTarget"
diff --git a/releng/org.eclipse.rap.releng/scripts/war-hudson.sh b/releng/org.eclipse.rap.releng/scripts/war-hudson.sh
index a72f265b14..f79d37a646 100755
--- a/releng/org.eclipse.rap.releng/scripts/war-hudson.sh
+++ b/releng/org.eclipse.rap.releng/scripts/war-hudson.sh
@@ -5,13 +5,33 @@
# See Job -> Configure... -> This build is parameterized
#
-runtimeDir=/projects/rapbuild/build-runtime/3.4.1/
+runtimeDir=/home/build/rap/build-runtime/eclipse-3.4.1
+tomcatDir=/home/build/rap/apache-tomcat-6.0.18/
-./build-common.sh \
+scriptsDir=`dirname $0`
+
+$scriptsDir/build-common.sh \
--cvs-tag "$CVS_TAG" \
--build-type "$BUILD_TYPE" \
--work "$WORKSPACE" \
--runtime "$runtimeDir" \
--base-platform "$PLATFORM_DIR" \
- --builder "org.eclipse.rap/releng/org.eclipse.rap.releng.warbuild" \
- --rap-target "$latestTarget" \ No newline at end of file
+ --builder "org.eclipse.rap/releng/org.eclipse.rap.releng.warbuild"
+
+if [ $? = 0 ]; then
+ oldDeployment=`stat -c %Y $tomcatDir/work/Catalina/localhost/rapdemo/`
+
+ echo "Deploy new war archive"
+ cp "`echo $WORKSPACE`/output/rapdemo.war" $tomcatDir/webapps
+
+ # give tomcat a chance to deploy
+ sleep 1m
+
+ # check if the deployment is newer then the last one
+ newDeployment=`stat -c %Y $tomcatDir/work/Catalina/localhost/rapdemo/`
+ if [ $oldDeployment -ge $newDeployment ]; then
+ echo "Demo War archive was not successfully deployed to Tomcat."
+ exit 42
+ fi
+
+fi

Back to the top