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

Unified Diff: buildbot/cbuildbot.py

Issue 6691047: Merge MVP script into cbuildbot. (Closed) Base URL: http://git.chromium.org/git/chromite.git@master
Patch Set: renamed board -> build_name, fix dry_run bug, fixed nits. Created 9 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | buildbot/cbuildbot_commands.py » ('j') | buildbot/cbuildbot_stages.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: buildbot/cbuildbot.py
diff --git a/buildbot/cbuildbot.py b/buildbot/cbuildbot.py
index 14cba0bf717fbe7fc07d3b37b021dcd5741230ea..2c3f1562fdb0a8d2d1fe61fbb18c8368159d8033 100755
--- a/buildbot/cbuildbot.py
+++ b/buildbot/cbuildbot.py
@@ -26,7 +26,7 @@ import chromite.buildbot.cbuildbot_stages as stages
import chromite.lib.cros_build_lib as cros_lib
-def _GetConfig(config_name):
+def _GetConfig(config_name, options):
"""Gets the configuration for the build"""
build_config = {}
if not cbuildbot_config.config.has_key(config_name):
@@ -38,14 +38,23 @@ def _GetConfig(config_name):
Warning(' %s' % name)
sys.exit(1)
- return cbuildbot_config.config[config_name]
+ result = cbuildbot_config.config[config_name]
+
+ # Use the config specific url, if not given on command line.
+ if options.url:
+ result['git_url'] = options.url
+
+ return result
def RunBuildStages(bot_id, options, build_config):
"""Run the requested build stages."""
try:
if options.sync:
- stages.SyncStage(bot_id, options, build_config).Run()
+ if build_config['manifest_version']:
+ stages.ManifestVersionedSyncStage(bot_id, options, build_config).Run()
+ else:
+ stages.SyncStage(bot_id, options, build_config).Run()
if options.build:
stages.BuildBoardStage(bot_id, options, build_config).Run()
@@ -75,6 +84,12 @@ def RunBuildStages(bot_id, options, build_config):
elif build_config['important']:
cbuildbot_comm.PublishStatus(cbuildbot_comm.STATUS_BUILD_COMPLETE)
+ if options.sync and build_config['manifest_version']:
+ stages.ManifestVersionedSyncCompletionStage(bot_id,
+ options,
+ build_config,
+ success=True).Run()
+
finally:
if options.archive:
stages.ArchiveStage(bot_id, options, build_config).Run()
@@ -86,6 +101,11 @@ def RunBuildStages(bot_id, options, build_config):
if not build_config['master'] and build_config['important']:
cbuildbot_comm.PublishStatus(cbuildbot_comm.STATUS_BUILD_FAILED)
+ if options.sync and build_config['manifest_version']:
+ stages.ManifestVersionedSyncCompletionStage(bot_id,
+ options,
+ build_config,
+ success=False).Run()
raise
@@ -166,14 +186,14 @@ def main():
default=True,
help='Override values from buildconfig and never uprev.')
parser.add_option('-u', '--url', dest='url',
- default='http://git.chromium.org/git/manifest',
- help='Run the buildbot on internal manifest')
+ default=None,
+ help='Override the GIT repo URL from the build config.')
(options, args) = parser.parse_args()
if len(args) >= 1:
bot_id = args[-1]
- build_config = _GetConfig(bot_id)
+ build_config = _GetConfig(bot_id, options)
else:
parser.error('Invalid usage. Use -h to see usage.')
« no previous file with comments | « no previous file | buildbot/cbuildbot_commands.py » ('j') | buildbot/cbuildbot_stages.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698