From c13ee6076103e77132fdca70cdd5841fa3018aa5 Mon Sep 17 00:00:00 2001 From: "ricow@google.com" Date: Fri, 7 Feb 2014 08:13:15 +0000 Subject: [PATCH] Add annotated steps for src tarball creation bot This will also include building the debian package, but this is just to get us going. R=sgjesse@google.com Review URL: https://codereview.chromium.org//157223004 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32410 260f80e4-7a28-3924-810f-c04153c831b5 --- client/tools/buildbot_annotated_steps.py | 2 ++ tools/bots/bot.py | 3 +- tools/bots/src-tarball.py | 42 ++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 tools/bots/src-tarball.py diff --git a/client/tools/buildbot_annotated_steps.py b/client/tools/buildbot_annotated_steps.py index a6f1c1f3221..130d1e560aa 100755 --- a/client/tools/buildbot_annotated_steps.py +++ b/client/tools/buildbot_annotated_steps.py @@ -204,6 +204,8 @@ def main(): elif name.startswith('cross') or name.startswith('target'): status = ProcessBot(name, 'cross-vm', custom_env=EnvironmentWithoutBotoConfig()) + elif name.startswith('src-tarball'): + status = ProcessBot(name, 'src-tarball') else: status = ProcessBot(name, 'compiler') diff --git a/tools/bots/bot.py b/tools/bots/bot.py index ad0ad0038b9..bf99227d9a7 100644 --- a/tools/bots/bot.py +++ b/tools/bots/bot.py @@ -151,7 +151,8 @@ def RunBot(parse_name, custom_steps, build_step=BuildSDK): try: Clobber() - build_step(build_info) + if build_step: + build_step(build_info) custom_steps(build_info) except OSError as e: diff --git a/tools/bots/src-tarball.py b/tools/bots/src-tarball.py new file mode 100644 index 00000000000..3441e932506 --- /dev/null +++ b/tools/bots/src-tarball.py @@ -0,0 +1,42 @@ +#!/usr/bin/python + +# Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file +# for details. All rights reserved. Use of this source code is governed by a +# BSD-style license that can be found in the LICENSE file. + +""" +Buildbot steps for src tarball generation and debian package generation + +Package up the src of the dart repo and create a debian package. +Archive tarball and debian package to google cloud storage. +""" + +import re +import sys + +import bot + +SRC_BUILDER = r'src-tarball-linux' + +def SrcConfig(name, is_buildbot): + """Returns info for the current buildbot based on the name of the builder. + + Currently, since we only run this on linux, this is just: + - mode: always "release" + - system: always "linux" + """ + src_pattern = re.match(SRC_BUILDER, name) + if not src_pattern: + return None + + return bot.BuildInfo('none', 'none', 'release', 'linux') + +def SrcSteps(build_info): + with bot.BuildStep('Create src tarball'): + args = [sys.executable, './tools/create_tarball.py'] + print 'Building src tarball' + bot.RunProcess(args) + +if __name__ == '__main__': + # We pass in None for build_step to avoid building the sdk. + bot.RunBot(SrcConfig, SrcSteps, build_step=None)