c = BuildmasterConfig = {}
c['slavePortnum'] = 9010

from buildbot.status.html import WebStatus
c['status'] = [
        WebStatus(http_port=8010, allowForce=True)
]

c['buildbotURL'] = 'http://talos-addon-master1.amotest.scl1.mozilla.com:8010/'

from buildbot import manhole
c['manhole'] = manhole.PasswordManhole("tcp:1235:interface=127.0.0.1", "cltbld", "password")

from config import BRANCHES, PLATFORMS, PROJECTS
# Do everything!
ACTIVE_BRANCHES = BRANCHES.keys()
# I changed my mind; do only trunk
ACTIVE_BRANCHES = ['addontester', 'addonbaselinetester']
ACTIVE_PROJECTS = [] #PROJECTS.keys()
ACTIVE_PLATFORMS = dict((k,None) for k in PLATFORMS.keys())
c = BuildmasterConfig = {}
c['slavePortnum'] = 9008 # No slaves should be connecting here

from buildbot import manhole
c['manhole'] = manhole.PasswordManhole("tcp:1233:interface=127.0.0.1", "cltbld", "password")

from config import BRANCHES, PLATFORMS, PROJECTS
# Do everything!
ACTIVE_BRANCHES = BRANCHES.keys()
ACTIVE_PLATFORMS = dict((platform, None) for platform in PLATFORMS.keys())
ACTIVE_PROJECTS = PROJECTS.keys()
Example #3
0
from buildbot.util import json
from buildbot import manhole

master_config = json.load(open('master_config.json'))

c = BuildmasterConfig = {}
c['slavePortnum'] = master_config.get('pb_port', None)

if 'ssh_port' in master_config:
    c['manhole'] = manhole.PasswordManhole(
        "tcp:%(ssh_port)i:interface=127.0.0.1" % master_config, "cltbld",
        "password")

from config import BRANCHES, PLATFORMS, PROJECTS
import thunderbird_config
import mobile_config
# Do everything!
ACTIVE_BRANCHES = BRANCHES.keys()
ACTIVE_THUNDERBIRD_BRANCHES = thunderbird_config.BRANCHES.keys()
ACTIVE_MOBILE_BRANCHES = mobile_config.BRANCHES.keys()
ACTIVE_PLATFORMS = dict((platform, None) for platform in PLATFORMS.keys())
ACTIVE_THUNDERBIRD_PLATFORMS = dict(
    (platform, None) for platform in thunderbird_config.PLATFORMS.keys())
ACTIVE_MOBILE_PLATFORMS = dict(
    (platform, None) for platform in mobile_config.PLATFORMS.keys())
ACTIVE_PROJECTS = PROJECTS.keys()

QUEUEDIR = "/dev/shm/queue"
def main(argv=None):
    if argv is None:
        argv = sys.argv[1:]

    parser = argparse.ArgumentParser(description="Bazel Culprit Finder Script")

    subparsers = parser.add_subparsers(dest="subparsers_name")

    subparsers.add_parser("culprit_finder")

    runner = subparsers.add_parser("runner")
    runner.add_argument("--project_name", type=str)
    runner.add_argument("--platform_name", type=str)
    runner.add_argument("--good_bazel_commit", type=str)
    runner.add_argument("--bad_bazel_commit", type=str)
    runner.add_argument("--needs_clean", type=bool, nargs="?", const=True)

    args = parser.parse_args(argv)

    if args.subparsers_name == "culprit_finder":
        try:
            project_name = os.environ["PROJECT_NAME"]
            platform_name = os.environ["PLATFORM_NAME"]
            good_bazel_commit = os.environ["GOOD_BAZEL_COMMIT"]
            bad_bazel_commit = os.environ["BAD_BAZEL_COMMIT"]
        except KeyError as e:
            raise Exception("Environment variable %s must be set" % str(e))

        needs_clean = False
        if "NEEDS_CLEAN" in os.environ:
            needs_clean = True

        if project_name not in DOWNSTREAM_PROJECTS:
            raise Exception(
                "Project name '%s' not recognized, available projects are %s"
                % (project_name, str((DOWNSTREAM_PROJECTS.keys())))
            )

        if platform_name not in PLATFORMS:
            raise Exception(
                "Platform name '%s' not recognized, available platforms are %s"
                % (platform_name, str((PLATFORMS.keys())))
            )
        print_culprit_finder_pipeline(
            project_name=project_name,
            platform_name=platform_name,
            good_bazel_commit=good_bazel_commit,
            bad_bazel_commit=bad_bazel_commit,
            needs_clean=needs_clean,
        )
    elif args.subparsers_name == "runner":
        git_repo_location = clone_git_repository_for_project(args.project_name, args.platform_name)
        print_collapsed_group("Check good bazel commit " + args.good_bazel_commit)
        if not test_with_bazel_at_commit(
            project_name=args.project_name,
            platform_name=args.platform_name,
            git_repo_location=git_repo_location,
            bazel_commit=args.good_bazel_commit,
            needs_clean=args.needs_clean,
        ):
            raise Exception(
                "Given good commit (%s) is not actually good, abort bisecting."
                % args.good_bazel_commit
            )
        start_bisecting(
            project_name=args.project_name,
            platform_name=args.platform_name,
            git_repo_location=git_repo_location,
            commits_list=get_bazel_commits_between(args.good_bazel_commit, args.bad_bazel_commit),
            needs_clean=args.needs_clean,
        )
    else:
        parser.print_help()
        return 2

    return 0
Example #5
0
from config import BRANCHES, PLATFORMS, PROJECTS
import thunderbird_config
import b2g_config
from b2g_config import PROJECTS as B2G_PROJECTS
import mobile_config
# Do everything!
ACTIVE_BRANCHES = BRANCHES.keys()
ACTIVE_THUNDERBIRD_BRANCHES = thunderbird_config.BRANCHES.keys()
ACTIVE_B2G_BRANCHES = b2g_config.BRANCHES.keys()
ACTIVE_MOBILE_BRANCHES = mobile_config.BRANCHES.keys()
if 'limit_fx_platforms' in master_config:
    ACTIVE_PLATFORMS = dict(
        (p, None) for p in master_config['limit_fx_platforms'])
else:
    ACTIVE_PLATFORMS = dict((k, None) for k in PLATFORMS.keys())
if 'limit_fx_slave_platforms' in master_config:
    ACTIVE_FX_SLAVE_PLATFORMS = master_config['limit_fx_slave_platforms']
else:
    ACTIVE_FX_SLAVE_PLATFORMS = {}
if 'limit_tb_platforms' in master_config:
    ACTIVE_THUNDERBIRD_PLATFORMS = dict(
        (p, None) for p in master_config['limit_tb_platforms'])
else:
    ACTIVE_THUNDERBIRD_PLATFORMS = dict(
        (k, None) for k in THUNDERBIRD_PLATFORMS.keys())
if 'limit_b2g_platforms' in master_config:
    ACTIVE_B2G_PLATFORMS = dict(
        (p, None) for p in master_config['limit_b2g_platforms'])
else:
    ACTIVE_B2G_PLATFORMS = dict((k, None) for k in B2G_PLATFORMS.keys())