Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(222)

Side by Side Diff: masters/master-common-rules.mk

Issue 2084383003: Move 'buildbot.tac' and 'buildbot' files to a common directory. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Rebase Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « masters/buildbot.tac ('k') | masters/master.chromium.android/buildbot » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # -*- makefile -*- 1 # -*- makefile -*-
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 # This should be included by a makefile which lives in a buildmaster/buildslave 6 # This should be included by a makefile which lives in a buildmaster/buildslave
7 # directory (next to the buildbot.tac file). That including makefile *must* 7 # directory (next to the buildbot.tac file). That including makefile *must*
8 # define MASTERPATH. 8 # define MASTERPATH.
9 9
10 # The 'start' and 'stop' targets start and stop the buildbot master. 10 # The 'start' and 'stop' targets start and stop the buildbot master.
(...skipping 30 matching lines...) Expand all
41 @if (hostname -f | grep -q '^master.*\.chromium\.org'); then \ 41 @if (hostname -f | grep -q '^master.*\.chromium\.org'); then \
42 /bin/echo ; \ 42 /bin/echo ; \
43 /bin/echo -e "\033[1;31m***"; \ 43 /bin/echo -e "\033[1;31m***"; \
44 /bin/echo "Are you manually restarting a master? This master is most likely"; \ 44 /bin/echo "Are you manually restarting a master? This master is most likely"; \
45 /bin/echo "being managed by master manager. Check out 'Issuing a restart' at"; \ 45 /bin/echo "being managed by master manager. Check out 'Issuing a restart' at"; \
46 /bin/echo -e "\033[1;34mgo/master-manager\033[1;31m for more det ails."; \ 46 /bin/echo -e "\033[1;34mgo/master-manager\033[1;31m for more det ails."; \
47 /bin/echo -e "***\033[0m"; \ 47 /bin/echo -e "***\033[0m"; \
48 /bin/echo ; \ 48 /bin/echo ; \
49 fi 49 fi
50 50
51 ifeq ($(BUILDBOT_PATH),$(BUILDBOT8_PATH))
52 start: notify printstep bootstrap 51 start: notify printstep bootstrap
53 else
54 start: notify printstep
55 endif
56 ifndef NO_REVISION_AUDIT 52 ifndef NO_REVISION_AUDIT
57 @if [ ! -f "$(GCLIENT)" ]; then \ 53 @if [ ! -f "$(GCLIENT)" ]; then \
58 echo "gclient not found. Add depot_tools to PATH or use DEPS checko ut."; \ 54 echo "gclient not found. Add depot_tools to PATH or use DEPS checko ut."; \
59 exit 2; \ 55 exit 2; \
60 fi 56 fi
61 $(GCLIENT) revinfo -a | tee revinfo.log >> actions.log || true 57 $(GCLIENT) revinfo -a | tee revinfo.log >> actions.log || true
62 $(GCLIENT) diff >> actions.log || true 58 $(GCLIENT) diff >> actions.log || true
63 @($(INFRA_RUNPY) infra.tools.send_monitoring_event \ 59 @($(INFRA_RUNPY) infra.tools.send_monitoring_event \
64 --service-event-revinfo=$(CURRENT_DIR)/revinfo.log \ 60 --service-event-revinfo=$(CURRENT_DIR)/revinfo.log \
65 --service-event-type=START \ 61 --service-event-type=START \
66 --event-mon-run-type=prod \ 62 --event-mon-run-type=prod \
67 --event-mon-service-name \ 63 --event-mon-service-name \
68 buildbot/master/$(MASTERPATH) \ 64 buildbot/master/$(MASTERPATH) \
69 || echo 'Running send_monitoring_event failed, skipping sending events.' \ 65 || echo 'Running send_monitoring_event failed, skipping sending events.' \
70 ) 2>&1 | tee -a actions.log 66 ) 2>&1 | tee -a actions.log
71 endif 67 endif
72 ifneq ($(wildcard $(FLOCK)),) 68 ifneq ($(wildcard $(FLOCK)),)
73 » PYTHONPATH=$(PYTHONPATH) SCRIPTS_DIR=$(SCRIPTS_DIR) $(FLOCK) -n $(LOCKFI LE) $(TOPLEVEL_DIR)/build/masters/start_master.sh || ( \ 69 » PYTHONPATH=$(PYTHONPATH) \
70 » SCRIPTS_DIR=$(SCRIPTS_DIR) \
71 » TOPLEVEL_DIR=$(TOPLEVEL_DIR) \
72 » $(FLOCK) -n $(LOCKFILE) \
73 » $(TOPLEVEL_DIR)/build/masters/start_master.sh || ( \
74 echo "Failure to start master. Check to see if a master is running and" \ 74 echo "Failure to start master. Check to see if a master is running and" \
75 "holding the lock on $(LOCKFILE)."; exit 1) 75 "holding the lock on $(LOCKFILE)."; exit 1)
76 else 76 else
77 » PYTHONPATH=$(PYTHONPATH) SCRIPTS_DIR=$(SCRIPTS_DIR) $(TOPLEVEL_DIR)/buil d/masters/start_master.sh 77 » PYTHONPATH=$(PYTHONPATH) \
78 » SCRIPTS_DIR=$(SCRIPTS_DIR) \
79 » TOPLEVEL_DIR=$(TOPLEVEL_DIR) \
80 » $(TOPLEVEL_DIR)/build/masters/start_master.sh
78 endif 81 endif
79 82
80 83
81 ifeq ($(BUILDBOT_PATH),$(BUILDBOT8_PATH))
82 start-prof: bootstrap 84 start-prof: bootstrap
83 else 85 » TWISTD_PROFILE=1 PYTHONPATH=$(PYTHONPATH) \
84 start-prof: 86 » python $(SCRIPTS_DIR)/common/twistd -y $(TOPLEVEL_DIR)/build/masters/bui ldbot.tac
85 endif
86 » TWISTD_PROFILE=1 PYTHONPATH=$(PYTHONPATH) python $(SCRIPTS_DIR)/common/t wistd --no_save -y buildbot.tac
87 87
88 stop: notify printstep 88 stop: notify printstep
89 ifndef NO_REVISION_AUDIT 89 ifndef NO_REVISION_AUDIT
90 @($(INFRA_RUNPY) infra.tools.send_monitoring_event \ 90 @($(INFRA_RUNPY) infra.tools.send_monitoring_event \
91 --service-event-type=STOP \ 91 --service-event-type=STOP \
92 --event-mon-run-type=prod \ 92 --event-mon-run-type=prod \
93 --event-mon-service-name \ 93 --event-mon-service-name \
94 buildbot/master/$(MASTERPATH) \ 94 buildbot/master/$(MASTERPATH) \
95 || echo 'Running send_monitoring_event failed, skipping sending events' \ 95 || echo 'Running send_monitoring_event failed, skipping sending events' \
96 ) 2>&1 | tee -a actions.log 96 ) 2>&1 | tee -a actions.log
(...skipping 26 matching lines...) Expand all
123 wait: 123 wait:
124 while `test -f twistd.pid`; do sleep 1; done; 124 while `test -f twistd.pid`; do sleep 1; done;
125 125
126 waitforstart: 126 waitforstart:
127 while `test ! -f twistd.pid`; do sleep 1; done; 127 while `test ! -f twistd.pid`; do sleep 1; done;
128 128
129 restart: notify stop wait start log 129 restart: notify stop wait start log
130 130
131 restart-prof: stop wait start-prof log 131 restart-prof: stop wait start-prof log
132 132
133 # This target is only known to work on 0.8.x masters.
134 upgrade: printstep
135 @[ -e '.dbconfig' ] || [ -e 'state.sqlite' ] || \
136 PYTHONPATH=$(PYTHONPATH) python buildbot upgrade-master .
137
138 # This target is only known to be useful on 0.8.x masters.
139 bootstrap: printstep 133 bootstrap: printstep
140 @[ -e '.dbconfig' ] || [ -e 'state.sqlite' ] || \ 134 @[ -e '.dbconfig' ] || [ -e 'state.sqlite' ] || \
141 » PYTHONPATH=$(PYTHONPATH) python $(SCRIPTS_DIR)/tools/state_create.py \ 135 » PYTHONPATH=$(PYTHONPATH) python $(TOPLEVEL_DIR)/build/masters/buildbot \
142 » --restore --db='state.sqlite' --txt '../state-template.txt' 136 » upgrade-master .
143 137
144 setup: 138 setup:
145 @echo export PYTHONPATH=$(PYTHONPATH) 139 @echo export PYTHONPATH=$(PYTHONPATH)
OLDNEW
« no previous file with comments | « masters/buildbot.tac ('k') | masters/master.chromium.android/buildbot » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698