1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-24 09:25:31 +02:00

Prepare for automatic nightly I-builds

This commit is contained in:
Martin Oberhuber 2006-10-31 15:46:15 +00:00
parent f8b92c4393
commit 7f045395c0
3 changed files with 105 additions and 18 deletions

View file

@ -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

View file

@ -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}*

View file

@ -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"