bug 607179: create new buildbot-master{4,5,6}.build.m.o - a couple fixes for master makefile
authorBen Hearsum <bhearsum@mozilla.com>
Thu, 17 Mar 2011 14:50:13 -0400
changeset 3785 b3c4068262eafefa987aa1585984546520097d50
parent 3784 db8d193be82b5a2b643b6fd215e7482b5b43f784
child 3786 78707daa9e0c8482dfafb6210dbe2f11b444a24f
push id1
push userroot
push dateWed, 17 Dec 2014 00:18:48 +0000
bugs607179
bug 607179: create new buildbot-master{4,5,6}.build.m.o - a couple fixes for master makefile
Makefile.setup
--- a/Makefile.setup
+++ b/Makefile.setup
@@ -1,13 +1,14 @@
 BASEDIR ?= $(shell pwd)
 VIRTUALENV ?= virtualenv
 PYTHON ?= /tools/python/bin/python
 PIP_PACKAGES_FILE ?= master-pip.txt
-HG = http://hg.mozilla.org
+HG ?= hg
+HG_HOST = http://hg.mozilla.org
 MASTER_NAME = $(error MASTER_NAME must be defined (see setup-master.py -8 -l for a list))
 DATABASE = tm-b01-master01.mozilla.org/buildbot
 MYSQL_CONFIG = $(HOME)/.$(MASTER_NAME)_update_from_files.conf
 CRONTAB = /etc/cron.d/$(MASTER_NAME)
 VIRTUALENV_PYTHON = $(BASEDIR)/bin/python
 PIP = $(BASEDIR)/bin/pip
 BUILDBOT = $(BASEDIR)/bin/buildbot
 USER = cltbld
@@ -27,32 +28,32 @@ virtualenv:
 
 deps:
 	$(PIP) install -r $(PIP_PACKAGES_FILE)
 	
 # HACK ALERT: This only works when there's only one python version in "lib".
 # This is generally true when using virtualenvs.
 install-buildbot: SITE_PACKAGES = $(BASEDIR)/lib/$(shell ls $(BASEDIR)/lib/)/site-packages
 install-buildbot:
-	hg clone -b production-0.8 $(HG)/build/buildbot $(BASEDIR)/buildbot
+	$(HG) clone -b production-0.8 $(HG_HOST)/build/buildbot $(BASEDIR)/buildbot
 	(cd $(BASEDIR)/buildbot/master; $(VIRTUALENV_PYTHON) setup.py develop install)
-	hg clone -b production-0.8 $(HG)/build/buildbotcustom $(BASEDIR)/buildbotcustom
-	hg clone -b production $(HG)/build/buildbot-configs $(BASEDIR)/buildbot-configs
-	hg clone $(HG)/build/tools $(BASEDIR)/tools
+	$(HG) clone -b production-0.8 $(HG_HOST)/build/buildbotcustom $(BASEDIR)/buildbotcustom
+	$(HG) clone -b production $(HG_HOST)/build/buildbot-configs $(BASEDIR)/buildbot-configs
+	$(HG) clone $(HG_HOST)/build/tools $(BASEDIR)/tools
 	# Get buildbotcustom and the build/tools library into PYTHONPATH
 	ln -s $(BASEDIR)/buildbotcustom $(SITE_PACKAGES)/buildbotcustom
 	echo "$(BASEDIR)/tools/lib/python" > $(SITE_PACKAGES)/build-tools-lib.pth
 
 master:
 	(cd $(BASEDIR)/buildbot-configs; $(VIRTUALENV_PYTHON) setup-master.py -8 -b $(BUILDBOT) $(BASEDIR)/master $(MASTER_NAME))
 
 other-files:
 	cp $(BASEDIR)/buildbot-configs/Makefile.master $(BASEDIR)/Makefile
-
-cron:
 	echo "[DEFAULT]" > $(MYSQL_CONFIG)
 	echo "database = mysql://buildbot:password@$(DATABASE)" >> $(MYSQL_CONFIG)
 	echo "master = http://this-master:port" >> $(MYSQL_CONFIG)
 	echo "name = $(MASTER_NAME)" >> $(MYSQL_CONFIG)
+
+cron:
 	echo "MAILTO=release@mozilla.com" > $(CRONTAB)
-	echo "@hourly cltbld (source $(HOME)/.bash_profile && $(VIRTUALENV_PYTHON) $(BASEDIR)/tools/buildfarm/maintenance/watch_twistd.log -t .$(MASTER_NAME)-last-time.txt -n $(MASTER_NAME) -f cltbld@`hostname --fqdn` -e release@mozilla.com $(BASEDIR)/master)\n" >> $(CRONTAB)
-	echo "15 * * * * cltbld lockfile -60 -r 3 $(HOME)/lockfile.$(MASTER_NAME)_cleanup 2>/dev/null && (source $(HOME)/.bash_profile && nice -n 19 $(VIRTUALENV_PYTHON) $(BASEDIR)/tools/buildfarm/maintenance/master_cleanup.py -t4 $(BASEDIR)/master ; rm -f $(HOME)/lockfile.$(MASTER_NAME)_cleanup) >> cleanup.log 2>&1\n" >> $(CRONTAB)
+	echo "@hourly cltbld (source $(HOME)/.bash_profile && $(VIRTUALENV_PYTHON) $(BASEDIR)/tools/buildfarm/maintenance/watch_twistd.log -t .$(MASTER_NAME)-last-time.txt -n $(MASTER_NAME) -f cltbld@`hostname --fqdn` -e release@mozilla.com $(BASEDIR)/master)" >> $(CRONTAB)
+	echo "15 * * * * cltbld lockfile -60 -r 3 $(HOME)/lockfile.$(MASTER_NAME)_cleanup 2>/dev/null && (source $(HOME)/.bash_profile && nice -n 19 $(VIRTUALENV_PYTHON) $(BASEDIR)/tools/buildfarm/maintenance/master_cleanup.py -t4 $(BASEDIR)/master ; rm -f $(HOME)/lockfile.$(MASTER_NAME)_cleanup) >> cleanup.log 2>&1" >> $(CRONTAB)
 	echo "*/10 * * * *	cltbld lockfile -60 -r 3 $(HOME)/lockfile.$(MASTER_NAME)_bbdb 2>/dev/null && (source $(HOME)/.bash_profile && cd $(BASEDIR)/master; time nice $(VIRTUALENV_PYTHON) $(BASEDIR)/buildbotcustom/bin/update_from_files.py -c $(MYSQL_CONFIG) . ; rm -f $(HOME)/lockfile.$(MASTER_NAME)_bbdb ) >> update.log 2>&1" >> $(CRONTAB)