ReleaseEngineering/How To/Enable a branch on buildbot and taskcluster

From MozillaWiki
Jump to: navigation, search

This documentation provides information on how to enable a branch on buildbot and taskcluster. We will consider holly branch as example.

Buildbot steps

  • Enable the branch in /mozilla/project_branches:
'holly': {
    'enable_perproduct_builds': False,
    'lock_platforms': True,
    'enable_opt_unittests': True,
    'enable_talos': False,
    'platforms': {
        'macosx64': {},
        'macosx64-debug': {},


- The name of the branch is "holly"

- As you can see it was enable for 2 platforms: "macosx64" and "macosx64-debug"

- Talos tests are disabled through "enable_talos" set to False

- Opt unit tests are enabled through "enable_opt_unittests" set to True

- "lock_platforms" stands for enabling the branch strictly to the platforms written as values for "platforms" key.

  • Add the branch in <your_master>/tools/buildfarm/maintenance/production-branches.json
"holly": {
  "repo": "",
  "repo_type": "hg",
  "access": "scm_level_2",
  "features": {
      "taskcluster-cron": true,
      "taskcluster-push": true

Taskcluster steps

Note that the holly repository can be found at It can simply be done using git clone or if the repository is larger, you can follow the instructions at

  • Enable the branch in taskcluster by adding the branch in taskcluster/src/config/default.yml from mozilla-taskcluster git repository:
  level: 2
    - "*"
    # temporary until this scope is removed from .taskcluster.yml
    - "*"

  • Filter what builds to run on the branch by adding a new target_task to point the builds you need to <branch-name>_tasks in <branch-name>/taskcluster/taskgraph/

Example for macosx64 builds:

def target_tasks_holly(full_task_graph, parameters):
    """Bug <no of bug> - < Summary of bug>""""
    def filter(task):
        platform = task.attributes.get('build_platform')
        # only select macosx platforms, should really just be opt
        if str(platform) not in ('macosx64'):
            return False
        return True
    return [l for l, t in full_task_graph.tasks.iteritems() if filter(t)]

  • The branch needs to be added to PER_PROJECT_PARAMETERS dictionary in in <branch-name>/taskcluster/taskgraph/
    'holly': {
        'target_tasks_method': 'holly_tasks',
        'optimize_target_tasks': True,
        'include_nightly': False,


- "target_tasks_method" refers to "holly_tasks" which was created at step 2 in

- "optimize_target_tasks" refers to the set of targeted tasks and all of their dependencies, tasks that have been optimized out are either omitted or replaced with a Task instance containing only a task_id.

- "include nightly" refers to nightly builds. Since it is set to False it means that nightly builds are excluded.

  • Enable the branch in treeherder by modifying the "active_status" flag to "active" in treeherder/model/fixtures/repository.json located in the treeherder git repository:
    "pk": 29,
    "model": "model.repository",
    "fields": {
        "dvcs_type": "hg",
        "name": "holly",
        "url": "",
        "active_status": "active",
        "codebase": "gecko",
        "repository_group": 6,
        "description": ""