Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/releng
diff options
context:
space:
mode:
authorRalf Sternberg2011-10-02 16:17:58 +0000
committerRalf Sternberg2011-10-02 16:17:58 +0000
commit1088f62f9633f4f6c58f740e7d17cef16a1db72d (patch)
tree754e747f3612b4d6dcff7631daa5c1092f3e8d66 /releng
parente9d176dbed186e4baad6ecf9f81b209901935432 (diff)
downloadorg.eclipse.rap-1088f62f9633f4f6c58f740e7d17cef16a1db72d.tar.gz
org.eclipse.rap-1088f62f9633f4f6c58f740e7d17cef16a1db72d.tar.xz
org.eclipse.rap-1088f62f9633f4f6c58f740e7d17cef16a1db72d.zip
Updated scripts directory from build server
Diffstat (limited to 'releng')
-rw-r--r--releng/org.eclipse.rap.releng/scripts/ant-runner.sh54
-rw-r--r--releng/org.eclipse.rap.releng/scripts/bless.sh47
-rwxr-xr-xreleng/org.eclipse.rap.releng/scripts/build-common.sh121
-rw-r--r--releng/org.eclipse.rap.releng/scripts/build-environment.sh7
-rwxr-xr-xreleng/org.eclipse.rap.releng/scripts/publish.sh443
-rw-r--r--releng/org.eclipse.rap.releng/scripts/publishNightlyBuild.sh13
-rw-r--r--releng/org.eclipse.rap.releng/scripts/publishNightlyBuilds.sh2
-rw-r--r--releng/org.eclipse.rap.releng/scripts/repo-tool.sh2
-rw-r--r--releng/org.eclipse.rap.releng/scripts/runtime-build.sh70
-rwxr-xr-xreleng/org.eclipse.rap.releng/scripts/runtime-hudson.sh20
-rwxr-xr-xreleng/org.eclipse.rap.releng/scripts/runtime-test-hudson.sh22
-rw-r--r--releng/org.eclipse.rap.releng/scripts/tooling-build.sh79
-rwxr-xr-xreleng/org.eclipse.rap.releng/scripts/tooling-hudson.sh20
-rwxr-xr-xreleng/org.eclipse.rap.releng/scripts/update-scripts.sh9
-rwxr-xr-xreleng/org.eclipse.rap.releng/scripts/war-hudson.sh46
15 files changed, 270 insertions, 685 deletions
diff --git a/releng/org.eclipse.rap.releng/scripts/ant-runner.sh b/releng/org.eclipse.rap.releng/scripts/ant-runner.sh
new file mode 100644
index 0000000000..d249c77a3a
--- /dev/null
+++ b/releng/org.eclipse.rap.releng/scripts/ant-runner.sh
@@ -0,0 +1,54 @@
+#!/bin/bash
+#
+# This script executes the PDE antRunner with the given parameters
+# Usage example:
+# ant-runner.sh -buildfile comp-repo.xml -DrepoDir=$repoDir target
+
+if [ $# == 0 ]; then
+ echo "Missing parameters"
+ echo "Usage:"
+ echo " ant-runner.sh <buildfile> [parameters]"
+ echo "Example:"
+ echo " ant-runner.sh build.xml -DrepoDir=\"\$repoDir\" target"
+ exit 0
+fi
+
+if [ -z "$JAVA_HOME" ]; then
+ echo "Missing JAVA_HOME"
+ exit 1
+elif [ ! -f "$JAVA_HOME/bin/java" ]; then
+ echo "Invalid JAVA_HOME: '$JAVA_HOME'"
+ exit 1
+fi
+
+java=$JAVA_HOME/bin/java
+
+if [ -z "$ECLIPSE_HOME" ]; then
+ echo "Missing ECLIPSE_HOME"
+ exit 1
+elif [ ! -d "$ECLIPSE_HOME/plugins" ]; then
+ echo "Invalid ECLIPSE_HOME: '$ECLIPSE_HOME'"
+ exit 1
+fi
+
+# Find Equinox launcher
+launcher=$(ls -1 $ECLIPSE_HOME/plugins/org.eclipse.equinox.launcher_*.jar | tail -n 1)
+
+if [ -z "$launcher" ]; then
+ echo "No Equinox launcher found"
+ exit 1
+elif [ ! -f "$launcher" ]; then
+ echo "Invalid Equinox launcher: '$launcher'"
+ exit 1
+fi
+
+echo "Using Equinox launcher: $launcher"
+
+buildfile=$1
+shift
+
+exec $java -cp $launcher org.eclipse.core.launcher.Main \
+ -application org.eclipse.ant.core.antRunner \
+ -buildfile $buildfile \
+ "$@"
+
diff --git a/releng/org.eclipse.rap.releng/scripts/bless.sh b/releng/org.eclipse.rap.releng/scripts/bless.sh
new file mode 100644
index 0000000000..461f2ad9a1
--- /dev/null
+++ b/releng/org.eclipse.rap.releng/scripts/bless.sh
@@ -0,0 +1,47 @@
+#!/bin/sh
+#
+# Tool to turn eclipse directories into p2 repositories
+
+fail() {
+ echo $1
+ exit 1
+}
+
+# Check command line
+if [ $# -ne 1 ]; then
+ fail "Wrong # of paramters"
+fi
+
+# Canonicalize path, the p2 generator needs absolute paths to work correctly.
+inputDir=`readlink -mn "$1"`
+if [ ! -d "$inputDir" ]; then
+ echo "No such directory: $inputDir"
+ exit 1
+fi
+
+# Determine runtime
+if [ -z "$RUNTIME_DIR" ]; then
+ RUNTIME_DIR=/shared/rt/rap/build-runtimes/eclipse-3.6.2
+fi
+
+# Find Equinox launcher
+ECLIPSE_LAUNCHER=$RUNTIME_DIR/plugins/`ls -1 $RUNTIME_DIR/plugins | grep launcher_ | tail -n 1`
+echo "Using Equinox launcher: $ECLIPSE_LAUNCHER"
+
+# Remove existing metadata
+rm -f "$inputDir/artifacts.jar" && rm -f "$inputDir/content.jar" || exit 1
+rm -f "$inputDir/artifacts.xml" && rm -f "$inputDir/content.xml" || exit 1
+
+echo "Input directory: $inputDir"
+
+java -cp $ECLIPSE_LAUNCHER org.eclipse.core.launcher.Main \
+ -consolelog -application org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher \
+ -metadataRepository file:$inputDir \
+ -artifactRepository file:$inputDir \
+ -metadataRepositoryName "Generated Repository" \
+ -artifactRepositoryName "Generated Repository" \
+ -source $inputDir \
+ -reusePackedFiles \
+ -compress \
+ -publishArtifacts \
+ || exit 1
diff --git a/releng/org.eclipse.rap.releng/scripts/build-common.sh b/releng/org.eclipse.rap.releng/scripts/build-common.sh
deleted file mode 100755
index 6a3c795a2d..0000000000
--- a/releng/org.eclipse.rap.releng/scripts/build-common.sh
+++ /dev/null
@@ -1,121 +0,0 @@
-#!/bin/bash
-#
-# This script is used to build RAP runtime, tooling and war using PDE build.
-
-# Initialize variables that represent command line args with default values
-cvsTag=
-buildType=N
-runtimeDir=
-basePlatformDir=
-workDir=./work
-outputDir=./output
-builderCvsPath=
-
-# Print usage info
-print_usage() {
- echo "Usage: $0 [args]"
- echo " --cvs-tag CVS tag to checkout from"
- echo " --builder CVS repository location of builder"
- echo " --build-type N/I/M/R, defaults to $buildType"
- echo " --runtime path to runtime eclipse install"
- echo " --base-platform path to base platform to build against"
- echo " --work temporary working directory, defaults to $workDir"
- echo " --output path to place output in, defaults to $outputDir"
- echo " --rap-target path to a zipped rap target platform, only applicable in tooling build"
-}
-
-# Print failure notice and exit
-fail() {
- echo "Failed"
- exit 1
-}
-
-# Parse command line args and set according variables
-swallowOutput=`getopt -l "cvs-tag,build-type,runtime:,base-platform:,work,output,help,builder:,rap-target" cbr:p:wohdt $*`
-if test $? != 0
-then
- print_usage
- exit 1
-fi
-for i
-do
- case "$i" in
- --cvs-tag|-c) shift; cvsTag=$1; shift;;
- --builder|-d) shift; builderCvsPath=$1; shift;;
- --build-type|-b) shift; buildType=$1; shift;;
- --runtime|-r) shift; runtimeDir=$1; shift;;
- --base-platform|-p) shift; basePlatformDir=$1; shift;;
- --work|-w) shift; workDir=$1; shift;;
- --output|-o) shift; outputDir=$1; shift;;
- --help|-h) shift; print_usage; exit 1; shift;;
- esac
-done
-
-# Check CVS tag
-if [ -z "$cvsTag" ]; then
- echo "No CVS tag given"
- print_usage
- exit 1
-fi
-
-# resolve relative paths
-runtimeDir=`readlink -f $runtimeDir`
-basePlatformDir=`readlink -f $basePlatformDir`
-workDir=`readlink -f "$workDir"`
-outputDir=`readlink -f "$outputDir"`
-
-# Create base working directory
-if [ ! -d "$workDir" ]; then
- mkdir "$workDir" || fail
-fi
-
-# Create output directory
-if [ ! -d "$outputDir" ]; then
- mkdir "$outputDir" || fail
-fi
-
-# Show informations
-echo "Starting build with the following settings:"
-echo " CVS-Tag: $cvsTag"
-echo " Builder CVS Path: $builderCvsPath"
-echo " Build Type: $buildType"
-echo " Runtime Inst.: $runtimeDir"
-echo " Platform Inst.: $basePlatformDir"
-echo " Working Dir: $workDir"
-echo " Output Dir: $outputDir"
-echo ""
-
-# Checkout releng project
-builderDir="$workDir/builder/"
-echo "Checking out builder from CVS $cvsTag ..."
-cd "$workDir"
-cvs -Q -f -d:pserver:anonymous@dev.eclipse.org:/cvsroot/rt checkout \
- -d ./builder -r $cvsTag $builderCvsPath \
- || fail
-cd -
-
-# Find PDE build
-pdeBuild=`ls -1 $runtimeDir/plugins | grep pde.build_ | tail -n 1`
-echo "Using PDE Build: $pdeBuild"
-
-# Find Equinox launcher
-launcher=$runtimeDir/plugins/`ls -1 $runtimeDir/plugins | grep launcher_ | tail -n 1`
-echo "Using Equinox launcher: $launcher"
-
-java -cp $launcher org.eclipse.core.launcher.Main \
- -application org.eclipse.ant.core.antRunner \
- -buildfile "$runtimeDir/plugins/$pdeBuild/scripts/build.xml" \
- -Dbuilder="$builderDir" \
- -DbuildId=`date +%Y%m%d-%H%M` \
- -DbuildDirectory="$workDir/build" \
- -DoutputDirectory="$outputDir" \
- -DbuildType=$buildType \
- -DmapsCheckoutTag=$cvsTag \
- -DfetchTag=$cvsTag \
- -DbaseLocation="$basePlatformDir" \
- -Dfile.encoding=UTF-8 \
- || fail
-
-echo "Cleaning up workspace"
-test -d "$builderDir" && rm -rf "$builderDir"
-
diff --git a/releng/org.eclipse.rap.releng/scripts/build-environment.sh b/releng/org.eclipse.rap.releng/scripts/build-environment.sh
new file mode 100644
index 0000000000..b82bad8c0b
--- /dev/null
+++ b/releng/org.eclipse.rap.releng/scripts/build-environment.sh
@@ -0,0 +1,7 @@
+# This script sets up environment variables for the RAP builds
+#
+
+export MVN=/opt/public/common/apache-maven-3.0.3/bin/mvn
+export ECLIPSE_HOME=/shared/rt/rap/build-runtimes/eclipse-3.6.2
+export SIGNING_LOCATION=/opt/public/download-staging.priv/rt/rap
+
diff --git a/releng/org.eclipse.rap.releng/scripts/publish.sh b/releng/org.eclipse.rap.releng/scripts/publish.sh
deleted file mode 100755
index 22c8c2b5c2..0000000000
--- a/releng/org.eclipse.rap.releng/scripts/publish.sh
+++ /dev/null
@@ -1,443 +0,0 @@
-#!/bin/bash
-#
-# Copyright (c) 2008, 2011 Innoopract Informationssysteme GmbH.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Innoopract Informationssysteme GmbH - initial API and implementation
-###############################################################################
-
-# This script is used to publish a new RAP build to the download server.
-#
-# Links:
-# http://wiki.eclipse.org/JarProcessor_Options
-# http://java.sun.com/j2se/1.5.0/docs/api/java/util/jar/Pack200.Packer.html
-# http://wiki.eclipse.org/Pack200
-# http://wiki.eclipse.org/Equinox/p2/Publisher
-
-INPUT_ARCHIVE=
-ZIP_DOWNLOAD_PATH=
-REPOSITORY_PATH=
-
-DOWNLOAD_LOCATION=/home/data/httpd/download.eclipse.org/rt/rap
-SIGNING_LOCATION=/opt/public/download-staging.priv/rt/rap
-
-function printUsage() {
- cat <<EOT
-Usage: $0 [options]"
- -i, --input-archive input zip file to publish
- -r, --repository-path path to remote p2 repository to publish (relative to rap home)
- -z, --zip-download-path path to remote zip download directory (relative to rap home)
- -u, --build-user username to log into build and download server (overrides \$BUILD_USER)
- -e, --eclipse-home path to eclipse runtime installation (overrides \$ECLIPSE_HOME)
- -j, --java-home path to java home (overrides \$JAVA_HOME)
-
-Examples:
- $0 -i rap-runtime-1.5.0-N-20100921-1741.zip -r 1.5/runtime -z 1.5
- $0 -i rap-tooling-1.5.0-N-20100921-1835.zip -r 1.5/tooling -z 1.5
-EOT
-}
-
-function parseArguments() {
- while [ $# -gt 0 ]; do
- case "$1" in
- -i|--input-archive) shift; INPUT_ARCHIVE=$1 ;;
- -r|--repository-path) shift; REPOSITORY_PATH=$1 ;;
- -z|--zip-download-path) shift; ZIP_DOWNLOAD_PATH=$1 ;;
- -u|--build-user) shift; BUILD_USER=$1 ;;
- -e|--eclipse-home) shift; ECLIPSE_HOME=$1 ;;
- -j|--java-home) shift; JAVA_HOME=$1 ;;
- -h|--help) printUsage; exit 0 ;;
- *) echo "invalid parameter: $1"; exit 1 ;;
- esac
- shift
- done
- if [ -z "$INPUT_ARCHIVE" ]; then
- echo "Input zip archive missing (provide parameter -i)"
- printUsage
- exit 1
- fi
- INPUT_ARCHIVE_NAME=`basename "$INPUT_ARCHIVE"`
- if echo "$INPUT_ARCHIVE" | grep -q " "; then
- echo "Input zip file name must not contain spaces"
- exit 1
- fi
- if [ -z "$JAVA_HOME" ]; then
- echo "Java home missing, set JAVA_HOME or specify parameter -j"
- printUsage
- exit 1
- fi
- if [ ! -e "$JAVA_HOME/bin/java" ]; then
- echo "Invalid Java home, set JAVA_HOME or specify parameter -j"
- printUsage
- exit 1
- fi
- if [ -z "$ECLIPSE_HOME" ]; then
- echo "Eclipse runtime missing, set ECLIPSE_HOME or specify -e"
- printUsage
- exit 1
- fi
- if [ ! -d "$ECLIPSE_HOME/plugins" ]; then
- echo "Invalid Eclipse home, set ECLIPSE_HOME or specify -e"
- printUsage
- exit 1
- fi
- if [ -z "$BUILD_USER" ]; then
- echo "Username for build and download server missing, set BUILD_USER or specify -u"
- printUsage
- exit 1
- fi
- if [ -z "$ZIP_DOWNLOAD_PATH" -a -z "$REPOSITORY_PATH" ]; then
- echo "Nothing to do. Specify -r or -z."
- printUsage
- exit 0
- fi
-}
-
-################################################################################
-# Utility functions for building sub-tasks.
-
-# Packs all directories into jars and unpacks jarred directories later.
-#
-# Parameters: (pack|unpack|rename) srcFile dstFile
-#
-# pack:
-# all plugin/feature directories are packed to a file named *.unpack.jar
-# unpack:
-# all plugin/feature jars that match *.unpack.jar are unpacked
-# rename:
-# all plugin/feature jars that match *.unpack.jar are renamed to *.jar
-#
-function jarDirs() {
- # parameter checking
- if [ $# -ne 3 ]; then
- echo "Usage: jarDirs (pack|unpack|rename) srcFile dstFile"
- return 1
- fi
- local mode=$1
- local srcFile=`readlink -nm "$2"`
- local dstFile=`readlink -nm "$3"`
- local srcFileName="${srcFile##*/}"
- if [ ! -e "$srcFile" ]; then
- echo "Source file does not exist: $srcFile"
- return 1
- fi
- if [ -e "$dstFile" ]; then
- echo "Target file exists already: $dstFile, skipping"
- return 0
- fi
- mkdir -p .unzipped && rm -rf .unzipped/* || return 1
- unzip -q $srcFile -d .unzipped || return 1
- if [ "$mode" == "pack" ]; then
- find .unzipped/eclipse/plugins -mindepth 1 -maxdepth 1 -type d \
- -exec echo jar {} \; \
- -exec jar cMf {}.unpack.jar -C {} . \; \
- -exec rm -r {} \; || return 1
- find .unzipped/eclipse/features -mindepth 1 -maxdepth 1 -type d \
- -exec echo jar {} \; \
- -exec jar cMf {}.unpack.jar -C {} . \; \
- -exec rm -r {} \; || return 1
- elif [ "$mode" == "unpack" ]; then
- for f in .unzipped/eclipse/plugins/*.unpack.jar; do
- if [ -e "$f" ]; then
- unzip -q $f -d ${f/.unpack.jar/} && rm $f || return 1
- fi
- done
- for f in .unzipped/eclipse/features/*.unpack.jar; do
- if [ -e "$f" ]; then
- unzip -q $f -d ${f/.unpack.jar/} && rm $f || return 1
- fi
- done
- elif [ "$mode" == "rename" ]; then
- # Note: *.unpack.jar.pack.gz files need to be renamed too
- for f in .unzipped/eclipse/plugins/*.unpack.jar*; do
- if [ -e "$f" ]; then
- mv $f ${f/.unpack.jar/.jar} || return 1
- fi
- done
- for f in .unzipped/eclipse/features/*.unpack.jar*; do
- if [ -e "$f" ]; then
- mv $f ${f/.unpack.jar/.jar} || return 1
- fi
- done
- else
- echo "Invalid mode: $mode, use pack or normalize"
- return 1
- fi
- cd .unzipped && zip -q -r "$dstFile" . && cd .. && rm -rf .unzipped || return 1
- echo ok
-}
-
-# Uploads given srcFile to build.eclipse.org and signs it. When signing is
-# finished, the signed file is downloaded to dstFile.
-#
-# Parameter: srcFile dstFile
-#
-function signBuild() {
- local srcFile=`readlink -nm "$1"`
- local dstFile=`readlink -nm "$2"`
- local srcFileName="${srcFile##*/}"
- # parameter checking
- if [ $# -ne 2 ]; then
- echo "Usage: signBuild srcFile dstFile"
- return 1
- fi
- if [ ! -f "$srcFile" ]; then
- echo "Source file does not exist: $srcFile"
- return 1
- fi
- if [ -e "$dstFile" ]; then
- echo "Target file exists already: $dstFile, skipping"
- return 0
- fi
- # upload file
- echo "Upload file $srcFile for signing..."
- echo rsync -v --progress "$srcFile" $BUILD_USER@build.eclipse.org:$SIGNING_LOCATION/
- rsync -v --progress "$srcFile" $BUILD_USER@build.eclipse.org:$SIGNING_LOCATION/
- test $? -eq 0 || return 1
- # initiate signing process
- echo "Signing $srcFileName..."
- ssh -T $BUILD_USER@build.eclipse.org << EOI
- cd "$SIGNING_LOCATION"
- if [ -e "signedOutput/$srcFileName" ]; then
- echo "signed file signedOutput/$srcFileName exists already, skipping"
- else
- chmod g+w "$srcFileName"
- mkdir -p signedOutput
- sign "$srcFileName" nomail signedOutput
- echo "Waiting for $srcFileName..."
- while [ ! -f "signedOutput/$srcFileName" ]; do
- sleep 20
- echo -n "."
- done
- fi
- echo
-EOI
- test $? -eq 0 || return 1
- # download signed file
- test $? -eq 0 || return 1
- echo "Downloading signed file to $dstFile..."
- rsync -v --progress "$BUILD_USER@build.eclipse.org:$SIGNING_LOCATION/signedOutput/$srcFileName" "$dstFile"
- test $? -eq 0 || return 1
- # delete file on server
- echo "Deleting remote files..."
- ssh -T $BUILD_USER@build.eclipse.org << EOI
- rm "$SIGNING_LOCATION/$srcFileName"
- rm "$SIGNING_LOCATION/signedOutput/$srcFileName"
-EOI
- test $? -eq 0 || return 1
- # repack zip file since the signing process yields zip files that do not work on Windows Vista
- echo "repacking..."
- rm -rf .unzipped && unzip -q -d .unzipped "$dstFile" && rm "$dstFile" \
- && cd .unzipped && zip -q -r "$dstFile" . && cd .. && rm -rf .unzipped || return 1
- echo ok
-}
-
-# Calls pack200 on the given srcFile and copies the result to dstFile.
-#
-# Parameters: (normalize|pack) srcFile dstFile
-#
-function packBuild() {
- # parameter checking
- if [ $# -ne 3 ]; then
- echo "Usage: packBuild (normalize|pack) srcFile dstFile"
- return 1
- fi
- local mode=$1
- local srcFile=`readlink -nm "$2"`
- local dstFile=`readlink -nm "$3"`
- local srcFileName="${srcFile##*/}"
- if [ "$mode" != "pack" -a "$mode" != "normalize" ]; then
- echo "Invalid mode: $mode, use pack or normalize"
- return 1
- fi
- if [ ! -e "$srcFile" ]; then
- echo "Source file does not exist: $srcFile"
- return 1
- fi
- if [ -e "$dstFile" ]; then
- echo "Target file exists already: $dstFile, skipping"
- return 0
- fi
- # Ensure that we use Java 1.5 for pack200
- $JAVA_HOME/bin/java -version 2>&1 | grep -q "1.5.0"
- if [ $? -ne 0 ]; then
- echo "Incorrect Java version. 1.5.0 needed for pack200."
- return 1
- fi
- mkdir -p .packed && rm -rf .packed/* || return 1
- if [ "$mode" == "normalize" ]; then
- $JAVA_HOME/bin/java \
- -Dorg.eclipse.update.jarprocessor.pack200=@jre \
- -cp "$ECLIPSE_LAUNCHER" org.eclipse.core.launcher.Main \
- -application org.eclipse.update.core.siteOptimizer \
- -jarProcessor -processAll -repack -outputDir .packed "$srcFile"
- else
- $JAVA_HOME/bin/java \
- -Dorg.eclipse.update.jarprocessor.pack200=@jre \
- -cp "$ECLIPSE_LAUNCHER" org.eclipse.core.launcher.Main \
- -application org.eclipse.update.core.siteOptimizer \
- -jarProcessor -pack -outputDir .packed "$srcFile"
-# -digestBuilder -digestOutputDir=.packed \
- fi
- test $? -eq 0 || return 1
- mv ".packed/$srcFileName" "$dstFile" || return 1
- rm -rf .packed || return 1
- echo ok
-}
-
-# Generates p2 metadata for a given directory.
-#
-# Parameter: inputDir
-#
-function generateMetadata() {
- if [ $# -ne 1 ]; then
- echo "Usage: generateMetadata <directory>"
- return 1
- fi
- # Canonicalize path, the p2 generator needs absolute paths to work correctly.
- local inputDir=`readlink -mn "$1"`
- if [ ! -d "$inputDir" ]; then
- echo "No such directory: $inputDir"
- return 1
- fi
- # remove existing metadata
- rm -f "$inputDir/artifacts.jar" && rm -f "$inputDir/content.jar" || return 1
- # choose repo name
- local inputFile=`basename "$INPUT_ARCHIVE"`
- if [ "${inputFile:0:12}" == "rap-tooling-" ]; then
- repoName="RAP Tooling Repository"
- elif [ "${inputFile:0:12}" == "rap-runtime-" ]; then
- repoName="RAP Runtime Repository"
- else
- echo "Cannot figure out repository name"
- return 1
- fi
- echo "using repo name '$repoName'"
- # create new metadata
- $JAVA_HOME/bin/java -cp $ECLIPSE_LAUNCHER org.eclipse.core.launcher.Main \
- -consolelog -application org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher \
- -metadataRepository file:$inputDir \
- -artifactRepository file:$inputDir \
- -metadataRepositoryName "$repoName" \
- -artifactRepositoryName "$repoName" \
- -source $inputDir \
- -configs gtk.linux.x86 \
- -reusePackedFiles \
- -compress \
- -publishArtifacts || return 1
- echo ok
-}
-
-# Generates p2 category metadata for a given directory.
-#
-# Parameter: inputDir
-#
-function generateCategory() {
- if [ $# -ne 1 ]; then
- echo "Usage: generateCategory <directory>"
- return 1
- fi
- # Canonicalize path, the p2 generator needs absolute paths to work correctly.
- local inputDir=`readlink -mn "$1"`
- if [ ! -d "$inputDir" ]; then
- echo "No such directory: $inputDir"
- return 1
- fi
- # generate category.xml
- echo '<?xml version="1.0" encoding="UTF-8"?>' > category.xml
- echo '<site>' >> category.xml
- echo '<category-def name="org.eclipse.rap.category" label="Rich Ajax Platform (RAP)"/>' >> category.xml
- ls -1 $inputDir/features/*.jar | sed 's/^.*\/\([^_]*\)_\(.*\)\.jar$/<feature url="features\/\1_\2.jar" id="\1" version="\2">\n<category name="org.eclipse.rap.category"\/>\n<\/feature>/' >> category.xml
- echo '</site>' >> category.xml
- local categoryXml=`readlink -mn category.xml`
- $JAVA_HOME/bin/java -cp $ECLIPSE_LAUNCHER org.eclipse.core.launcher.Main \
- -consolelog -application org.eclipse.equinox.p2.publisher.CategoryPublisher \
- -metadataRepository file:$inputDir \
- -categoryDefinition file:$categoryXml \
- -compress || return 1
- rm category.xml
- echo ok
-}
-
-function findLauncher() {
- # search equinox launcher
- echo "Using this Eclipse runtime: $ECLIPSE_HOME"
- ECLIPSE_LAUNCHER=$ECLIPSE_HOME/plugins/`ls -1 $ECLIPSE_HOME/plugins | grep launcher_ | tail -n 1`
- echo "Using this Equinox launcher: $ECLIPSE_LAUNCHER"
-}
-
-################################################################################
-# MAIN
-
-parseArguments "$@"
-findLauncher
-
-# pack all directories as jars (signing process doesn't handle directories correctly)
-echo "=== jar all dirs in $INPUT_ARCHIVE"
-jarDirs pack "$INPUT_ARCHIVE" jarred-$INPUT_ARCHIVE_NAME || exit 1
-
-# exclude icu.base bundles from packing and signing
-EXCLUDE_BUNDLES=`zipinfo -1 jarred-$INPUT_ARCHIVE_NAME | grep -v 'org.eclipse.rap'`
-echo "pack.excludes: `echo $EXCLUDE_BUNDLES | sed 's/ /, /g'`" > pack.properties
-echo "sign.excludes: `echo $EXCLUDE_BUNDLES | sed 's/ /, /g'`" >> pack.properties
-zip "$INPUT_ARCHIVE" pack.properties && rm pack.properties || exit 1
-
-# pack200 - normalize jars to prepare for signing
-echo "=== normalize (pack200) $INPUT_ARCHIVE"
-packBuild normalize jarred-$INPUT_ARCHIVE normalized-$INPUT_ARCHIVE_NAME || exit 1
-
-# sign jars
-echo "=== sign normalized $INPUT_ARCHIVE"
-signBuild normalized-$INPUT_ARCHIVE_NAME signed-$INPUT_ARCHIVE_NAME || exit 1
-
-if [ -n "$ZIP_DOWNLOAD_PATH" ]; then
- # create a copy without pack.properties
- jarDirs unpack signed-$INPUT_ARCHIVE_NAME upload-$INPUT_ARCHIVE_NAME
- zip -d upload-$INPUT_ARCHIVE_NAME pack.properties 2> /dev/null
-
- # upload zip
- echo "=== upload zip file to $ZIP_DOWNLOAD_PATH/$INPUT_ARCHIVE_NAME"
- echo check local file before uploading: upload-$INPUT_ARCHIVE_NAME
- echo -n "press Return to upload "
- read c
- # avoid -t, timestamps may confuse mirroring on dev.eclipse.org
- rsync -v --progress \
- upload-$INPUT_ARCHIVE_NAME \
- $BUILD_USER@dev.eclipse.org:$DOWNLOAD_LOCATION/$ZIP_DOWNLOAD_PATH/$INPUT_ARCHIVE_NAME
-fi
-
-if [ -n "$REPOSITORY_PATH" ]; then
- # rename jars that have been marked as "unpack", a repo can't contain unpacked content
- jarDirs rename signed-$INPUT_ARCHIVE_NAME renamed-$INPUT_ARCHIVE_NAME
-
- # pack200 - pack
- echo "=== pack200 signed $INPUT_ARCHIVE_NAME"
- packBuild pack renamed-$INPUT_ARCHIVE_NAME packed-$INPUT_ARCHIVE_NAME || exit 1
-
- echo "=== create repository for dev.eclipse.org:$DOWNLOAD_LOCATION/$REPOSITORY_PATH/"
- mkdir -p mirror
- localCopy=mirror/${REPOSITORY_PATH/\//_}
- rm -rf "$localCopy"
- rm -rf newSite && unzip -q packed-$INPUT_ARCHIVE_NAME -d newSite || exit 1
- rm packed-$INPUT_ARCHIVE_NAME
- mv newSite/eclipse "$localCopy" || exit 1
- rm -rf newSite
-
- # metadata
- generateMetadata $localCopy || exit 1
- generateCategory $localCopy || exit 1
-
- # upload
- echo "=== upload repository $REPOSITORY_PATH"
- echo check local repository before uploading: $localCopy
- echo -n "press Return to upload "
- read c
- # avoid -t, timestamps may confuse mirroring on dev.eclipse.org
- rsync -r -v --delete --progress \
- $localCopy/ \
- $BUILD_USER@dev.eclipse.org:$DOWNLOAD_LOCATION/$REPOSITORY_PATH/ || exit 1
-fi
diff --git a/releng/org.eclipse.rap.releng/scripts/publishNightlyBuild.sh b/releng/org.eclipse.rap.releng/scripts/publishNightlyBuild.sh
index f786115869..6325cb1603 100644
--- a/releng/org.eclipse.rap.releng/scripts/publishNightlyBuild.sh
+++ b/releng/org.eclipse.rap.releng/scripts/publishNightlyBuild.sh
@@ -55,6 +55,10 @@ echo "Build type: $buildType"
latestStableBuild=`ls -1 $jobDir/lastStable/archive/*/*.zip`
echo "Latest build: $latestStableBuild"
+if [ -z "$latestStableBuild" ]; then
+ echo >&2 "No latest stable build found, exiting"
+ exit 0
+fi
zipFileName=`basename $latestStableBuild`
@@ -90,6 +94,12 @@ cp $latestStableBuild . || exit 1
echo "Uncompress latest stable build"
unzip -q $zipFileName || exit 1
+# ensure structure of uncompressedd
+if [ ! -d $workingDir/features ]; then
+ echo >&2 "Missing features directory in $workingDir"
+ exit 1
+fi
+
mkdir -p $targetDir || exit 1
# Publish p2 repository
@@ -99,8 +109,7 @@ java -jar $launcher \
-application org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher \
-metadataRepository file:$targetDir \
-artifactRepository file:$targetDir \
- -source $workingDir/eclipse \
- -configs gtk.linux.x86 \
+ -source $workingDir \
-reusePackedFiles \
-compress \
-publishArtifacts || exit 1
diff --git a/releng/org.eclipse.rap.releng/scripts/publishNightlyBuilds.sh b/releng/org.eclipse.rap.releng/scripts/publishNightlyBuilds.sh
index d4daeed924..ca7f040195 100644
--- a/releng/org.eclipse.rap.releng/scripts/publishNightlyBuilds.sh
+++ b/releng/org.eclipse.rap.releng/scripts/publishNightlyBuilds.sh
@@ -6,7 +6,7 @@ DATE=`date +%Y%m%d-%H%M`
RUNTIME_LOG=/shared/rt/rap/log/nightly-runtime-$DATE.log
TOOLING_LOG=/shared/rt/rap/log/nightly-tooling-$DATE.log
-export RUNTIME_DIR=/shared/rt/rap/build-runtimes/eclipse-3.6.1
+export RUNTIME_DIR=/shared/rt/rap/build-runtimes/eclipse-3.6.2
/shared/rt/rap/scripts/1.5/publishNightlyBuild.sh runtime > $RUNTIME_LOG
test $? -eq 0 || echo >&2 FAILED. See $RUNTIME_LOG
diff --git a/releng/org.eclipse.rap.releng/scripts/repo-tool.sh b/releng/org.eclipse.rap.releng/scripts/repo-tool.sh
index bcbc230a4a..47087adfb8 100644
--- a/releng/org.eclipse.rap.releng/scripts/repo-tool.sh
+++ b/releng/org.eclipse.rap.releng/scripts/repo-tool.sh
@@ -6,7 +6,7 @@ SCRIPTS_DIR=$(dirname $(readlink -nm $0))
DOWNLOAD_DIR=/home/data/httpd/download.eclipse.org/rt/rap
if [ -z "$RUNTIME_DIR" ]; then
- RUNTIME_DIR=/shared/rt/rap/build-runtimes/eclipse-3.6.1
+ RUNTIME_DIR=/shared/rt/rap/build-runtimes/eclipse-3.6.2
fi
mode=
diff --git a/releng/org.eclipse.rap.releng/scripts/runtime-build.sh b/releng/org.eclipse.rap.releng/scripts/runtime-build.sh
new file mode 100644
index 0000000000..8c71418a26
--- /dev/null
+++ b/releng/org.eclipse.rap.releng/scripts/runtime-build.sh
@@ -0,0 +1,70 @@
+#!/bin/bash
+#
+# This script is used to trigger the runtime build with parameters passed by Hudson.
+# All values are retrieved trough system variables set by Hudson.
+# See Job -> Configure... -> This build is parameterized
+
+SCRIPTS_DIR=$(dirname $(readlink -nm $0))
+. $SCRIPTS_DIR/build-environment.sh
+
+if [ "${BUILD_TYPE:0:1}" == "I" -o "${BUILD_TYPE:0:1}" == "M" -o "${BUILD_TYPE:0:1}" == "R" ]; then
+ sign=true
+else
+ sign=false
+fi
+
+# Cleanup workspace dir
+test -n "$WORKSPACE" -a -d "$WORKSPACE" && rm -rf "$WORKSPACE"/*
+
+######################################################################
+# Checkout Repository
+
+cd "$WORKSPACE"
+echo "checking out $CVS_TAG"
+cvs -Q -d :local:/cvsroot/rt co -P -d source -r $CVS_TAG org.eclipse.rap || exit 1
+
+######################################################################
+# Build RAP Runtime
+
+cd "$WORKSPACE/source/releng/org.eclipse.rap.releng/runtime"
+echo "Running maven on $PWD, sign=$sign"
+$MVN -e clean package -Dsign=$sign || exit 1
+
+if [ -d runtime-repository/target/fixedPacked ]; then
+ mv runtime-repository/target/fixedPacked "$WORKSPACE/runtimeRepo"
+else
+ mv runtime-repository/target/repository "$WORKSPACE/runtimeRepo"
+fi
+
+VERSION=$(ls "$WORKSPACE"/runtimeRepo/features/org.eclipse.rap.runtime_1.5.0.*.jar | sed 's/.*_\([0-9.-]\+\)\..*\.jar/\1/')
+TIMESTAMP=$(ls "$WORKSPACE"/runtimeRepo/features/org.eclipse.rap.runtime_1.5.0.*.jar | sed 's/.*\.\([0-9-]\+\)\.jar/\1/')
+echo "Version is $VERSION"
+echo "Timestamp is $TIMESTAMP"
+test -n "$VERSION" || exit 1
+test -n "$TIMESTAMP" || exit 1
+
+######################################################################
+# Build Aggregation Repository
+
+cd "$WORKSPACE/source/releng/org.eclipse.rap.releng/runtime"
+echo "Running maven with pom-aggregation.xml on $PWD, sign=$sign"
+$MVN -e -f pom-aggregation.xml clean package -DruntimeRepo="file://$WORKSPACE/runtimeRepo" || exit 1
+
+# Example: rap-runtime-1.5.0-N-20110814-2110.zip
+zipFileName=rap-runtime-$VERSION-$BUILD_TYPE-$TIMESTAMP.zip
+compatZipFileName=rap-runtime-compatibility-$VERSION-$BUILD_TYPE-$TIMESTAMP.zip
+
+mv runtime-aggregation-repository/target/*.zip "$WORKSPACE/$zipFileName" || exit 1
+
+if [ "$sign" == "true" -a -d runtime-compatibility-repository/target ]; then
+ mv runtime-compatibility-repository/target/*.zip "$WORKSPACE/$compatZipFileName" || exit 1
+fi
+
+######################################################################
+# Include legal files in zip
+
+cd "$WORKSPACE"
+cp -f source/releng/org.eclipse.rap.releng/legal/notice.html .
+cp -f source/releng/org.eclipse.rap.releng/legal/epl-v10.html .
+zip "$zipFileName" notice.html epl-v10.html
+
diff --git a/releng/org.eclipse.rap.releng/scripts/runtime-hudson.sh b/releng/org.eclipse.rap.releng/scripts/runtime-hudson.sh
deleted file mode 100755
index cf0dcf5981..0000000000
--- a/releng/org.eclipse.rap.releng/scripts/runtime-hudson.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/bash
-#
-# This script is used to trigger the runtime build with parameters passed by Hudson.
-# All values are retrieved trough system variables set by Hudson.
-# See Job -> Configure... -> This build is parameterized
-#
-
-# Cleanup workspace dir
-test -d "$WORKSPACE" && rm -rf "$WORKSPACE"/*
-
-scriptsDir=`dirname $0`
-
-$scriptsDir/build-common.sh \
- --cvs-tag "$CVS_TAG" \
- --build-type "$BUILD_TYPE" \
- --work "$WORKSPACE" \
- --runtime "$RUNTIME_DIR" \
- --base-platform "$PLATFORM_DIR" \
- --builder "org.eclipse.rap/releng/org.eclipse.rap.releng/runtime" \
- --output "$WORKSPACE"
diff --git a/releng/org.eclipse.rap.releng/scripts/runtime-test-hudson.sh b/releng/org.eclipse.rap.releng/scripts/runtime-test-hudson.sh
deleted file mode 100755
index 020ef41cb6..0000000000
--- a/releng/org.eclipse.rap.releng/scripts/runtime-test-hudson.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/bash
-#
-# This script is used to trigger the runtime build with parameters passed by Hudson.
-# All values are retrieved trough system variables set by Hudson.
-# See Job -> Configure... -> This build is parameterized
-#
-
-# Cleanup workspace dir
-#test -d "$WORKSPACE" && rm -rf "$WORKSPACE"/*
-
-echo "START TESTS"
-
-scriptsDir=`dirname $0`
-
-$scriptsDir/build-common.sh \
- --cvs-tag "$CVS_TAG" \
- --build-type "$BUILD_TYPE" \
- --work "$WORKSPACE" \
- --runtime "$RUNTIME_DIR" \
- --base-platform "$PLATFORM_DIR/test-base-platform" \
- --builder "org.eclipse.rap/releng/org.eclipse.rap.releng/runtime-test" \
- --output "$WORKSPACE"
diff --git a/releng/org.eclipse.rap.releng/scripts/tooling-build.sh b/releng/org.eclipse.rap.releng/scripts/tooling-build.sh
new file mode 100644
index 0000000000..a93b0d1777
--- /dev/null
+++ b/releng/org.eclipse.rap.releng/scripts/tooling-build.sh
@@ -0,0 +1,79 @@
+#!/bin/bash
+#
+# This script is used to trigger the tooling build with parameters passed by Hudson.
+# All values are retrieved trough system variables set by Hudson.
+# See Job -> Configure... -> This build is parameterized
+
+SCRIPTS_DIR=$(dirname $(readlink -nm $0))
+. $SCRIPTS_DIR/build-environment.sh
+
+if [ -z "$CVS_TAG" ]; then
+ echo CVS_TAG is not set
+ exit 1
+fi
+
+if [ "${BUILD_TYPE:0:1}" == "I" -o "${BUILD_TYPE:0:1}" == "M" -o "${BUILD_TYPE:0:1}" == "R" ]; then
+ sign=true
+else
+ sign=false
+fi
+
+# Cleanup workspace dir
+test -n "$WORKSPACE" -a -d "$WORKSPACE" && rm -rf "$WORKSPACE"/*
+
+######################################################################
+# Checkout Repository
+
+cd "$WORKSPACE"
+echo "checking out $CVS_TAG"
+cvs -Q -d :local:/cvsroot/rt co -P -d source -r $CVS_TAG org.eclipse.rap || exit 1
+
+######################################################################
+# Generate reference documentation
+
+cd "$WORKSPACE/source"
+echo "Generating reference documentation"
+$SCRIPTS_DIR/ant-runner.sh releng/org.eclipse.rap.releng/tooling/reference/build.xml \
+ -DsourceDir="$WORKSPACE/source" || exit 1
+
+######################################################################
+# Build RAP Tooling
+
+cd "$WORKSPACE/source/releng/org.eclipse.rap.releng/tooling" || exit 1
+echo "Running maven on $PWD, sign=$sign"
+$MVN clean package -Dsign=$sign || exit 1
+
+VERSION=$(ls tooling-repository/target/repository/features/org.eclipse.rap.tooling_*.jar | sed 's/.*_\([0-9.-]\+\)\..*\.jar/\1/')
+TIMESTAMP=$(ls tooling-repository/target/repository/features/org.eclipse.rap.tooling_*.jar | sed 's/.*\.\([0-9-]\+\)\.jar/\1/')
+echo "Version is '$VERSION'"
+echo "Timestamp is '$TIMESTAMP'"
+test -n "$VERSION" || exit 1
+test -n "$TIMESTAMP" || exit 1
+
+# Example: rap-tooling-1.5.0-N-20110814-2110.zip
+zipFileName=rap-tooling-$VERSION-$BUILD_TYPE-$TIMESTAMP.zip
+if [ -d tooling-repository/target/fixedSigned ]; then
+ cd tooling-repository/target/fixedSigned
+ zip -r "$WORKSPACE/$zipFileName" .
+ zip -d "$WORKSPACE/$zipFileName" "META-INF/*"
+ cd -
+else
+ mv tooling-repository/target/*.zip "$WORKSPACE/$zipFileName"
+fi
+
+repoZipFileName=rap-tooling-repo-$VERSION-$BUILD_TYPE-$TIMESTAMP.zip
+if [ -d tooling-repository/target/fixedPacked ]; then
+ cd tooling-repository/target/fixedPacked
+ zip -r "$WORKSPACE/$repoZipFileName" .
+ zip -d "$WORKSPACE/$repoZipFileName" "META-INF/*"
+ cd -
+fi
+
+######################################################################
+# Include legal files in zip
+
+cd "$WORKSPACE/"
+cp -f source/releng/org.eclipse.rap.releng/legal/notice.html .
+cp -f source/releng/org.eclipse.rap.releng/legal/epl-v10.html .
+zip "$zipFileName" notice.html epl-v10.html
+
diff --git a/releng/org.eclipse.rap.releng/scripts/tooling-hudson.sh b/releng/org.eclipse.rap.releng/scripts/tooling-hudson.sh
deleted file mode 100755
index b271dd832e..0000000000
--- a/releng/org.eclipse.rap.releng/scripts/tooling-hudson.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/bash
-#
-# This script is used to trigger the runtime build with parameters passed by Hudson.
-# All values are retrieved trough system variables set by Hudson.
-# See Job -> Configure... -> This build is parameterized
-#
-
-# Cleanup workspace dir
-test -d "$WORKSPACE" && rm -rf "$WORKSPACE"/*
-
-scriptsDir=`dirname $0`
-
-$scriptsDir/build-common.sh \
- --cvs-tag "$CVS_TAG" \
- --build-type "$BUILD_TYPE" \
- --work "$WORKSPACE" \
- --runtime "$RUNTIME_DIR" \
- --base-platform "$PLATFORM_DIR" \
- --builder "org.eclipse.rap/releng/org.eclipse.rap.releng/tooling"
-
diff --git a/releng/org.eclipse.rap.releng/scripts/update-scripts.sh b/releng/org.eclipse.rap.releng/scripts/update-scripts.sh
deleted file mode 100755
index 3edb0439de..0000000000
--- a/releng/org.eclipse.rap.releng/scripts/update-scripts.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-# update build scripts from CVS
-
-CVS_PATH=org.eclipse.rap/releng/org.eclipse.rap.releng/scripts
-CVS_TAG=HEAD
-
-cd /shared/rt/rap/scripts
-cvs -Q -f -d:pserver:anonymous@dev.eclipse.org:/cvsroot/rt checkout -d ./1.5 -r "$CVS_TAG" "$CVS_PATH"
-cd -
diff --git a/releng/org.eclipse.rap.releng/scripts/war-hudson.sh b/releng/org.eclipse.rap.releng/scripts/war-hudson.sh
deleted file mode 100755
index d7dd70e268..0000000000
--- a/releng/org.eclipse.rap.releng/scripts/war-hudson.sh
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/bin/bash
-#
-# This script is used to trigger the war build with parameters passed by Hudson.
-# All values are retrieved trough system variables set by Hudson.
-# See Job -> Configure... -> This build is parameterized
-#
-
-runtimeDir=/home/build/rap/build-runtimes/eclipse-3.4.1
-#tomcatDir=/home/build/rap/apache-tomcat-6.0.18/
-
-scriptsDir=`dirname $0`
-
-exec $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"
-
-## start build-internal tomcat
-#$tomcatDir/bin/startup.sh
-#
-## give tomcat a chance to start
-#sleep 1m
-#
-#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/`
-# result=0;
-# if [ $oldDeployment -ge $newDeployment ]; then
-# echo "Demo War archive was not successfully deployed to Tomcat."
-# result=42
-# fi
-#
-# exit $result
-#fi
-

Back to the top