Commits

Anonymous committed e855e03

Install refactored build-pusher on slaves

Comments (0)

Files changed (4)

slave/etc/rc.d/rc.vlbuildslave-update

 _LOCKFILE=/tmp/vlbuildbot-updated.lock
 
 function start() {
+	if [ -f $_LOCKFILE ]; then
+		rm -f $_LOCKFILE
+	fi
 	lockfile $_LOCKFILE	 
 	 if [ -f $_PIDFILE ]; then
 	    kill -9 $(cat $_PIDFILE)

slave/usr/local/bin/build-pusher

 
 
 # Source the settings defined in /tmp/buildbot/vectorlinux/slave.conf
-#source /tmp/buildbot/vectorlinux/slave.conf
 source /etc/vlbuildslave/slavehost.conf || exit 1
 LOCKFILE=/tmp/vlbuildbot-upload.lock
 
 trap "rm -rf $LOCKFILE; exit" INT TERM EXIT
 
-BUILDER=$1
+BUILDER=${BUILDER:-"$1"}
+if [[ "$BUILDER" == *~x86_64 ]]; then
+	export APPNAME=$(echo $BUILDER |cut -f1 -d "~")
+else
+	export APPNAME=$BUILDER
+fi
+TARGET_VL=${TARGET_VL:-"$(branch_to_vlrelease $2)"}
+TARGET_ARCH=${TARGET_ARCH:-"$(get_arch_for_builder $BUILDER)"}
 
-_ARCH=$(get_arch_for_builder $BUILDER) # This should return something like "32" or "64"
-_VLREL=$(branch_to_vlrelease $2) # This should return something like "7p0" or "7p1"
-export JAIL=${JAIL:-"${_ARCH}c${_VLREL}"} # This should end up being something like "32c7p0"
-export USE_CHROOT=${CHROOTS[$JAIL]}
+case $TARGET_ARCH in
+	64|x86_64)
+		pooldir="x86_64"
+#		APPNAME=$(echo $BUILDER | cut -f1 -d "~")
+		export TARGET_ARCH=64
+		;;
+	32|i[3456]86)
+		poldir="x86"
+#		APPNAME=$BUILDER
+		export TARGET_ARCH=32
+		;;
+esac
 
-#JAIL=$2
-#USE_CHROOT=${CHROOTS[$JAIL]}
+export JAIL=${JAIL:-"${TARGET_ARCH}c${TARGET_VL}"}
+export USE_CHROOT=${CHROOTS[$JAIL]}
 VLVER=$(arg_vlrelease $JAIL)
 ARCH=$(arg_arch $JAIL)
 #URL="vlcore.vectorlinux.com"
 URL="208.64.70.52"
 
-
-case "$ARCH" in 
-	64 )
-		pooldir="x86_64"
-		APPNAME=$(echo ${BUILDER} | cut -f 1 -d "~")
-		;;
-	32 )
-		pooldir="x86"
-		APPNAME=${BUILDER}
-		;;
-esac
-
-WORKPATH=${USE_CHROOT}/CHROOT-RWSB.${BUILDER}
+WORKPATH=${USE_CHROOT}/CHROOT-RWSB.$APPNAME
 WORKDIR=${WORKPATH}/tmp/builds
 
+if [ ! -d $WORKPATH ]; then
+	echo "Work path $WORKPATH not found.  Was this package built?"
+	exit 1
+fi
+
+echo "$Upload packages from $WORKPATH"
 make_links_txt(){
 
 # cd $WORKDIR/$APPNAME/src || exit 1

slave/usr/local/bin/vlbuildbot-updated.sh

     log "Refreshing git tree in $REPO"
     (
     cd $REPO
-    git pull 
+    git pull >/dev/null 2>&1 
     )
 }
 

updated/update.conf

 #    an update to the slaves.  the function name MUST remain the same and the so must 
 #    everythin else.  The rest of the update system looks for this function.
 
-REMOTEVERSION=20130515a
+REMOTEVERSION=20130515b
 CONF=/etc/vlbuildslave/slavehost.conf
 BKCONF=/etc/vlbuildslave/slavehost.conf.backup
 LOGFILE=/var/log/vlbuildbot-updated.log
 ( cd $REPO/slave/usr/local/bin
 	chmod +x *
 	cp * /usr/local/bin
+ cd $REPO/etc/rc.d
+ 	cp rc.vlbuildslave-update /etc/rc.d/
+	chmod +x /etc/rc.d/rc.vlbuildslave-update
 	)
 
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.