configs/vcs_sync/l10n.py
author Justin Wood <Callek@gmail.com>
Thu, 17 Oct 2013 12:38:17 -0400
branchproduction
changeset 1994 4c9d5de35fa9
parent 1978 cd8ea7755bb4
child 2002 3a2d7e2f5074
permissions -rw-r--r--
merge default->production

$ hg merge -r default -P
changeset: 1988:5db3cb3f5159
parent: 1986:7d01a30fbbd9
user: Aki Sasaki <asasaki@mozilla.com>
date: Tue Oct 15 13:24:13 2013 -0700
summary: No bug - comments to specify what repos the vcs_sync config files are for. r=hwine

changeset: 1990:0e6383dc751f
parent: 1988:5db3cb3f5159
user: kmoir@mozilla.com
date: Wed Oct 16 08:48:58 2013 -0400
summary: Bug 926991 - split robocop (rc) into 4 chunks r=jlund

changeset: 1991:646e52346be8
user: Andrew Halberstadt <ahalberstadt@mozilla.com>
date: Wed Oct 16 10:23:05 2013 -0400
summary: Bug 925723 - update manifest used by b2g desktop mochitests, r=jgriffin

changeset: 1992:283c75b9580f
user: Andrew Halberstadt <ahalberstadt@mozilla.com>
date: Wed Oct 16 13:33:06 2013 -0400
summary: Bug 927434 - Append symbols_path to b2g desktop mochitest options, r=jgriffin


changeset: 1993:7a1030923e61
tag: tip
user: Aki Sasaki <asasaki@mozilla.com>
date: Wed Oct 16 19:50:28 2013 -0700
summary: No bug - cleanup of personal configs only. r=stamp
from copy import deepcopy
import os
import socket
hostname = socket.gethostname()

GECKO_BRANCHES = {
    'v1.1': 'mozilla-beta',
    'v1.2': 'mozilla-aurora',
    'v1.3': 'mozilla-central',
}

GECKO_CONFIG_TEMPLATE = {
    'mozilla-release': {
        'locales_file_url': 'http://hg.mozilla.org/releases/mozilla-release/raw-file/default/b2g/locales/all-locales',
        'hg_url': 'http://hg.mozilla.org/releases/l10n/mozilla-release/%(locale)s',
        'targets': [{
            "target_dest": "gitmo-gecko-l10n",
        }],
        'tag_config': {
            'tag_regexes': [
                '^B2G_',
            ],
        },
    },
    'mozilla-beta': {
        'locales_file_url': 'http://hg.mozilla.org/releases/mozilla-beta/raw-file/default/b2g/locales/all-locales',
        'hg_url': 'http://hg.mozilla.org/releases/l10n/mozilla-beta/%(locale)s',
        'targets': [{
            "target_dest": "gitmo-gecko-l10n",
        }],
        'tag_config': {
            'tag_regexes': [
                '^B2G_',
            ],
        },
    },
    'mozilla-aurora': {
        'locales_file_url': 'http://hg.mozilla.org/releases/mozilla-aurora/raw-file/default/b2g/locales/all-locales',
        'hg_url': 'http://hg.mozilla.org/releases/l10n/mozilla-aurora/%(locale)s',
        'targets': [{
            "target_dest": "gitmo-gecko-l10n",
        }],
        'tag_config': {
            'tag_regexes': [
                '^B2G_',
            ],
        },
    },
    'mozilla-central': {
        'locales_file_url': 'http://hg.mozilla.org/mozilla-central/raw-file/default/b2g/locales/all-locales',
        'hg_url': 'http://hg.mozilla.org/l10n-central/%(locale)s',
        'targets': [{
            "target_dest": "gitmo-gecko-l10n",
        }],
        'tag_config': {
            'tag_regexes': [
                '^B2G_',
            ],
        },
    },
}

# Build gecko_config
GECKO_CONFIG = {}
for version, branch in GECKO_BRANCHES.items():
    GECKO_CONFIG[branch] = deepcopy(GECKO_CONFIG_TEMPLATE[branch])
    GECKO_CONFIG[branch]['git_branch_name'] = version

config = {
    "log_name": "l10n",
    "log_max_rotate": 99,
    "job_name": "l10n",
    "env": {
        "PATH": "%(PATH)s:/usr/libexec/git-core",
    },
    "exes": {
        # bug 828140 - shut https warnings up.
        # http://kiln.stackexchange.com/questions/2816/mercurial-certificate-warning-certificate-not-verified-web-cacerts
        "hg": [os.path.join(os.getcwd(), "build", "venv", "bin", "hg"), "--config", "web.cacerts=/etc/pki/tls/certs/ca-bundle.crt"],
    },
    "conversion_type": "b2g-l10n",
    "l10n_config": {
        "gecko_config": GECKO_CONFIG,
        "gaia_config": {
            'v1_2': {
                'locales_file_url': 'https://raw.github.com/mozilla-b2g/gaia/v1.2/locales/languages_dev.json',
                'hg_url': 'https://hg.mozilla.org/releases/gaia-l10n/v1_2/%(locale)s',
                'git_branch_name': 'v1.2',
                'targets': [{
                    "target_dest": "gitmo-gaia-l10n",
                }],
                'tag_config': {
                    'tag_regexes': [
                        '^B2G_',
                    ],
                },
            },
            'v1-train': {
                'locales_file_url': 'https://raw.github.com/mozilla-b2g/gaia/v1-train/locales/languages_dev.json',
                'hg_url': 'https://hg.mozilla.org/releases/gaia-l10n/v1_1/%(locale)s',
                'git_branch_name': 'v1.1',
                'targets': [{
                    "target_dest": "gitmo-gaia-l10n",
                }],
                'tag_config': {
                    'tag_regexes': [
                        '^B2G_',
                    ],
                },
            },
            'v1_0_1': {
                'locales_file_url': 'https://raw.github.com/mozilla-b2g/gaia/v1.0.1/locales/languages_dev.json',
                'hg_url': 'https://hg.mozilla.org/releases/gaia-l10n/v1_0_1/%(locale)s',
                'git_branch_name': 'v1.0.1',
                'targets': [{
                    "target_dest": "gitmo-gaia-l10n",
                }],
                'tag_config': {
                    'tag_regexes': [
                        '^B2G_',
                    ],
                },
            },
            'master': {
                'locales_file_url': 'https://raw.github.com/mozilla-b2g/gaia/master/locales/languages_dev.json',
                'hg_url': 'https://hg.mozilla.org/gaia-l10n/%(locale)s',
                'git_branch_name': 'master',
                'targets': [{
                    "target_dest": "gitmo-gaia-l10n",
                }],
                'tag_config': {
                    'tag_regexes': [
                        '^B2G_',
                    ],
                },
            },
        },
    },

    "remote_targets": {
        "gitmo-gecko-l10n": {
            "repo": 'git+ssh://git.mozilla.org/releases/l10n/%(locale)s/gecko.git',
            "ssh_key": "~/.ssh/blah",
            "vcs": "git",
        },
        "gitmo-gaia-l10n": {
            "repo": 'git+ssh://git.mozilla.org/releases/l10n/%(locale)s/gaia.git',
            "ssh_key": "~/.ssh/blah",
            "vcs": "git",
        },
    },

    "virtualenv_modules": [
        "bottle==0.11.6",
        "dulwich==0.9.0",
        "ordereddict==1.1",
        "hg-git==0.4.0-moz2",
        "mapper==0.1",
        "mercurial==2.6.3",
        "mozfile==0.9",
        "mozinfo==0.5",
        "mozprocess==0.11",
    ],
    "find_links": [
        "http://pypi.pvt.build.mozilla.org/pub",
        "http://pypi.pub.build.mozilla.org/pub",
    ],
    "pip_index": False,

    "upload_config": [{
        "ssh_key": "~/.ssh/id_rsa",
        "ssh_user": "asasaki",
        "remote_host": "github-sync2",
        "remote_path": "/home/asasaki/upload/l10n",
    }],

    "default_notify_from": "vcs2vcs@%s" % hostname,
    "notify_config": [{
        "to": "aki@mozilla.com",
        "failure_only": False,
        "skip_empty_messages": True,
    }],

    # Disallow sharing.  We may need a better way of doing this.
    "vcs_share_base": None,
    "hg_share_base": None,
}