From d836e4e1081dae92916e6f559061b8bd517d76c9 Mon Sep 17 00:00:00 2001 From: Martin Oberhuber < martin.oberhuber@windriver.com> Date: Sun, 12 Nov 2006 20:35:25 +0000 Subject: [PATCH] Add doit_irsbuild.sh --- .../bin/doit_irsbuild.sh | 101 ++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100755 releng/org.eclipse.rse.build/bin/doit_irsbuild.sh diff --git a/releng/org.eclipse.rse.build/bin/doit_irsbuild.sh b/releng/org.eclipse.rse.build/bin/doit_irsbuild.sh new file mode 100755 index 00000000000..74442b7e9e2 --- /dev/null +++ b/releng/org.eclipse.rse.build/bin/doit_irsbuild.sh @@ -0,0 +1,101 @@ +#!/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 and R-builds on build.eclipse.org +#:# Will build based on HEAD of all mapfiles, and update the testUpdates as well +#:# Usage: +#:# doit_irsbuild.sh {buildType} [buildId] +#:# Examples: +#:# doit_irsbuild.sh R 1.0 +#:# doit_irsbuild.sh S 1.0M5 +#:# doit_irsbuild.sh I + +#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` + +#Get parameters +buildType=$0 +buildId=$1 +case x$buildType in + xP|xN|xI|xS|xR|xM) ok=1 ;; + *) ok=0 ;; +esac +if [ $ok != 1 ]; then + grep '^#:#' $0 | grep -v grep + exit 0 +fi + +#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-${buildType}$stamp.txt +sg dsdp-tm-rse -c "touch $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 ${buildType} ${buildId} >> $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/publish/${buildType}*${daystamp}* + +#Check the publishing +cd $HOME/ws/publish +cd ${buildType}*${daystamp}* +FILES=`ls RSE-SDK-*.zip 2>/dev/null` +echo "FILES=$FILES" +if [ -f package.count -a "$FILES" != "" ]; then + echo "package.count found, release seems ok" + if [ ${buildType} = S -o ${buildType} = R ]; then + #hide the release for now until it is tested + #mirrors will still pick it up + mv package.count package.count.orig + fi + + #update the doc server + rm -f ../N.latest/RSE-SDK-*.zip + cp -f RSE-SDK-*.zip ../N.latest/RSE-SDK-latest.zip + chmod g+w ../N.latest/RSE-SDK-latest.zip + chgrp dsdp-tm-rse ../N.latest/RSE-SDK-latest.zip + + #Update the testUpdates sites + sg dsdp-tm-rse -c "echo \"Refreshing update site\" " + cd $HOME/downloads-tm/testUpdates/bin + ./mkTestUpdates.sh + sg dsdp-tm-rse -c "echo \"Refreshing signedUpdates site\" " + cd $HOME/downloads-tm/signedUpdates/bin + ./mkTestUpdates.sh + + cd "$curdir" +else + echo "package.count missing, release seems failed" +fi