#!/bin/bash #set -x umask 0022 ulimit -n 2048 # Change this if building on build.eclipse.org to "server"; "local" otherwise BUILDLOCATION="server" # Location of the build input HTTP_BASE="http://download.eclipse.org" FILESYSTEM_BASE="file:///home/data/httpd/download.eclipse.org" # Define the BASE_URL to be used if [ ${BUILDLOCATION} = "server" ] then BASE_URL=${FILESYSTEM_BASE} ECLIPSE="/shared/technology/epp/epp_build/36/eclipse/eclipse" JRE="/opt/ibm/java2-ppc-50/bin/java" else BASE_URL=${HTTP_BASE} ECLIPSE="eclipse" JRE="java" fi ############################################################################### # variables to adjust BASE_DIR=/shared/technology/epp/epp_build/36 RELEASE_NAME="-helios-RC2" # variables START_TIME=`date -u +%Y%m%d-%H%M` MARKERFILENAME=".epp.nightlybuild" STATUSFILENAME="status.stub" CVSPATH="org.eclipse.epp/releng/org.eclipse.epp.config" CVSPROJECTPATH="org.eclipse.epp/packages" DOWNLOAD_BASE_URL="http://build.eclipse.org/technology/epp/epp_build/36/download" # directories and files DOWNLOAD_BASE_DIR="${BASE_DIR}/download" BUILD_DIR="${BASE_DIR}/build" DOWNLOAD_DIR="${DOWNLOAD_BASE_DIR}/${START_TIME}" EPPREPO_INPUT_DIR="/shared/technology/epp/epp_repo/helios/epp.build/buildresult/org.eclipse.epp.allpackages.helios.feature_1.3.0-eclipse.feature/site.p2" EPPREPO_WORKINGCOPY_DIR="${DOWNLOAD_DIR}/repository" MARKERFILE="${DOWNLOAD_DIR}/${MARKERFILENAME}" STATUSFILE="${DOWNLOAD_DIR}/${STATUSFILENAME}" LOGFILE="${DOWNLOAD_DIR}/build.log" LOCKFILE="/tmp/epp.build36.lock" # repository locations REPO_ECLIPSE_URL="${BASE_URL}/eclipse/updates/3.6milestones/" REPO_SIMRELEASE_URL="${BASE_URL}/releases/helios/" REPO_STAGING_URL="${BASE_URL}/releases/staging/" #REPO_EPP_URL="${BASE_URL}/technology/epp/packages/helios" REPO_EPP_URL="file://${EPPREPO_INPUT_DIR}" REPO_EPP_WORKINGCOPY_URL="file://${EPPREPO_WORKINGCOPY_DIR}" # repositories used in the build METADATAREPOSITORIES="${REPO_ECLIPSE_URL},${REPO_STAGING_URL},${REPO_EPP_WORKINGCOPY_URL}" ARTIFACTREPOSITORIES="${REPO_ECLIPSE_URL},${REPO_STAGING_URL},${REPO_EPP_WORKINGCOPY_URL}" # definition of OS, WS, ARCH, FORMAT combinations OSes=( win32 win32 linux linux macosx macosx macosx ) WSes=( win32 win32 gtk gtk cocoa cocoa carbon ) ARCHes=( x86 x86_64 x86 x86_64 x86 x86_64 ppc ) FORMAT=( zip zip tar.gz tar.gz tar.gz tar.gz tar.gz ) ############################################################################### # only one build process allowed ## using the Hudson EPP lock, but leave the code in there for now #if [ -e ${LOCKFILE} ]; then # echo "${START_TIME} EPP build - lockfile ${LOCKFILE} exists" >/dev/stderr # exit 1 #fi #trap "rm -f ${LOCKFILE}; exit" INT TERM EXIT #touch ${LOCKFILE} # create download directory and files, copy p2 repo to working location mkdir -p ${DOWNLOAD_DIR} touch ${MARKERFILE} touch ${STATUSFILE} cp -a ${EPPREPO_INPUT_DIR} ${EPPREPO_WORKINGCOPY_DIR} # log to file exec 2>&1 | tee ${LOGFILE} # determine which packages to build PACKAGES="" if [ $# = "0" ]; then # generate the list from the packages checked into CVS cvs -q -d :pserver:anonymous@dev.eclipse.org:/cvsroot/technology checkout -P ${CVSPROJECTPATH} for file in $(ls ${CVSPROJECTPATH} | grep -v feature | grep -v common | grep -v CVS); do PACKAGES="${PACKAGES} ${file##org.eclipse.}" done else # take the package names from the command lines if any given PACKAGES="$@" fi echo "...building the following packages: ${PACKAGES}" echo "...using metadata repositories: ${METADATAREPOSITORIES}" echo "...using artifact repositories: ${ARTIFACTREPOSITORIES}" # load external functions . ${BASE_DIR}/${CVSPATH}/tools/functions.sh # check-out configuration echo "...checking out configuration to ${BASE_DIR}" cvs -q -d :pserver:anonymous@dev.eclipse.org:/cvsroot/technology checkout -P ${CVSPATH} pullAllConfigFiles ${BASE_DIR}/${CVSPATH}/packages_map.txt ${DOWNLOAD_DIR} # start statusfile echo "