From 7f045395c01d1da2ea44a7a734ebaeb5fe069920 Mon Sep 17 00:00:00 2001 From: Martin Oberhuber < martin.oberhuber@windriver.com> Date: Tue, 31 Oct 2006 15:46:15 +0000 Subject: [PATCH] Prepare for automatic nightly I-builds --- .../org.eclipse.rse.build/bin/doit_ibuild.sh | 40 ++++++++----- .../org.eclipse.rse.build/bin/doit_sbuild.sh | 60 +++++++++++++++++++ releng/org.eclipse.rse.build/nightly.sh | 23 ++++++- 3 files changed, 105 insertions(+), 18 deletions(-) create mode 100755 releng/org.eclipse.rse.build/bin/doit_sbuild.sh diff --git a/releng/org.eclipse.rse.build/bin/doit_ibuild.sh b/releng/org.eclipse.rse.build/bin/doit_ibuild.sh index cbd38ffb121..a31ec681dae 100755 --- a/releng/org.eclipse.rse.build/bin/doit_ibuild.sh +++ b/releng/org.eclipse.rse.build/bin/doit_ibuild.sh @@ -10,6 +10,7 @@ # Martin Oberhuber - initial API and implementation #******************************************************************************* #Bootstrapping script to perform I-builds on build.eclipse.org +#Will build based on HEAD of all mapfiles, and update the testUpdates as well #nothing we do should be hidden from the world ##newgrp dsdp-tm-rse # newgrp doesnt work from shellscripts -- use sg instead @@ -37,23 +38,32 @@ fi echo "Updating builder from CVS..." cd org.eclipse.rse.build stamp=`date +'%Y%m%d-%H%M'` -log=$HOME/ws/log-$stamp.txt +log=$HOME/ws/log-I$stamp.txt sg dsdp-tm-rse -c "touch $log" -sg dsdp-tm-rse -c "cvs -q update -RPd" -daystamp=`date +'%Y%m%d*%H'` -echo "Enter tag to fetch from CVS (default is HEAD):" -echo "Enter build type (P,N,I,S):" -echo "Enter the build id (default is x$stamp):" -sg dsdp-tm-rse -c "perl ./build.pl >> $log 2>&1" -#tail -50 $log +sg dsdp-tm-rse -c "cvs -q update -RPd >> $log 2>&1" +daystamp=`date +'%Y%m%d-%H'` + +echo "Running the builder..." +sg dsdp-tm-rse -c "./nightly.sh HEAD I >> $log 2>&1" +tail -50 $log #Fixup permissions and group id on download.eclpse.org (just to be safe) -chmod -R g+w $HOME/ws/working/package/*${daystamp}* +chmod -R g+w $HOME/ws/publish/I${daystamp}* -#Publish -echo "sg dsdp-tm-rse -c \"cp -R $HOME/ws/working/package/*${daystamp}* $HOME/ws/publish\"" -sg dsdp-tm-rse -c "cp -R $HOME/ws/working/package/*${daystamp}* $HOME/ws/publish" -sg dsdp-tm-rse -c "rm -rf $HOME/ws/publish/*${daystamp}*/updates" -echo "chmod -R g+w $HOME/ws/publish/*${daystamp}*" -chmod -R g+w $HOME/ws/publish/*${daystamp}* +#Copy latest SDK in order to give access to DOC server +cd $HOME/ws/publish +FILES=`ls I${daystamp}*/RSE-SDK-I${daystamp}*.zip 2>/dev/null` +echo "FILES=$FILES" +if [ "$FILES" != "" ]; then + rm N.latest/RSE-SDK-I*.zip + cp I${daystamp}*/RSE-SDK-I${daystamp}*.zip N.latest + cd N.latest + mv -f RSE-SDK-I${daystamp}*.zip RSE-SDK-latest.zip +fi +#Update the testUpdates site +if [ "$FILES" = "1" ]; then + cd $HOME/downloads-tm/testUpdates/bin + ./mkTestUpdates.sh + cd "$curdir" +fi diff --git a/releng/org.eclipse.rse.build/bin/doit_sbuild.sh b/releng/org.eclipse.rse.build/bin/doit_sbuild.sh new file mode 100755 index 00000000000..514c0141a38 --- /dev/null +++ b/releng/org.eclipse.rse.build/bin/doit_sbuild.sh @@ -0,0 +1,60 @@ +#!/bin/sh +#******************************************************************************* +# Copyright (c) 2006 Wind River Systems, Inc. +# 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: +# Martin Oberhuber - initial API and implementation +#******************************************************************************* +#Bootstrapping script to perform S-builds on build.eclipse.org +#Will ask the user for label and build ID + +#nothing we do should be hidden from the world +##newgrp dsdp-tm-rse # newgrp doesnt work from shellscripts -- use sg instead +umask 2 + +#Use Java5 on build.eclipse.org +#export PATH=/shared/common/ibm-java2-ppc64-50/bin:$PATH +export PATH=/shared/webtools/apps/IBMJava2-ppc64-142/bin:$PATH +#export PATH=/shared/webtools/apps/IBMJava2-ppc-142/bin:$PATH + +curdir=`pwd` + +#Remove old logs and builds +echo "Removing old logs and builds..." +cd $HOME/ws +#rm log-*.txt +if [ -d working/build ]; then + rm -rf working/build +fi +if [ -d working/package ]; then + rm -rf working/package +fi + +#Do the main job +echo "Updating builder from CVS..." +cd org.eclipse.rse.build +stamp=`date +'%Y%m%d-%H%M'` +log=$HOME/ws/log-$stamp.txt +sg dsdp-tm-rse -c "touch $log" +sg dsdp-tm-rse -c "cvs -q update -RPd" +daystamp=`date +'%Y%m%d*%H'` +echo "Enter tag to fetch from CVS (default is HEAD):" +echo "Enter build type (P,N,I,S):" +echo "Enter the build id (default is x$stamp):" +sg dsdp-tm-rse -c "perl ./build.pl >> $log 2>&1" +#tail -50 $log + +#Fixup permissions and group id on download.eclpse.org (just to be safe) +chmod -R g+w $HOME/ws/working/package/*${daystamp}* + +#Publish +echo "sg dsdp-tm-rse -c \"cp -R $HOME/ws/working/package/*${daystamp}* $HOME/ws/publish\"" +sg dsdp-tm-rse -c "cp -R $HOME/ws/working/package/*${daystamp}* $HOME/ws/publish" +sg dsdp-tm-rse -c "rm -rf $HOME/ws/publish/*${daystamp}*/updates" +echo "chmod -R g+w $HOME/ws/publish/*${daystamp}*" +chmod -R g+w $HOME/ws/publish/*${daystamp}* + diff --git a/releng/org.eclipse.rse.build/nightly.sh b/releng/org.eclipse.rse.build/nightly.sh index a3452df53fd..6aac9ff9410 100755 --- a/releng/org.eclipse.rse.build/nightly.sh +++ b/releng/org.eclipse.rse.build/nightly.sh @@ -11,6 +11,12 @@ #******************************************************************************* #nightly build for RSE - to be executed on build.eclipse.org # +# Usage: +# nightly.sh [mapVersionTag] [buildType] [buildId] +# Examples: +# nightly.sh HEAD I +# nightly.sh HEAD S 1.0RC3 +# # Prerequisites: # - Eclipse 3.2 installed or linked from ../eclipse # - org.eclipse.releng.basebuilder checked out to ../org.eclipse.releng.basebuilder @@ -34,11 +40,20 @@ buildDirectory="${working}/build" packageDirectory="${working}/package" tag="HEAD" +if [ "$1" != "" ]; then + tag="$1" +fi buildType="N" +if [ "$2" != "" ]; then + buildType="$2" +fi mydstamp=`date +'%Y%m%d'` mytstamp=`date +'%H%M'` timestamp="${mydstamp}-${mytstamp}" buildId="${buildType}${timestamp}" +if [ "$3" != "" ]; then + buildId="$3" +fi rm -rf "${buildDirectory}" command="java -cp ${basebuilder}/startup.jar org.eclipse.core.launcher.Main " @@ -52,11 +67,13 @@ command="$command -DbaseLocation=${eclipse} " command="$command -DbuildType=${buildType} " command="$command -DbuildId=${buildId} " command="$command -DmapVersionTag=${tag} " -command="$command -DdoPublish=true " -command="$command -DforceContextQualifier=${buildId} " -command="$command -DfetchTag=HEAD " command="$command -Dmydstamp=${mydstamp} " command="$command -Dmytstamp=${mytstamp} " +if [ "$buildType" = "N" ]; then + command="$command -DforceContextQualifier=${buildId} " + command="$command -DfetchTag=HEAD " +fi +command="$command -DdoPublish=true " #command="$command postBuild " echo "$command"