Bug 1434365: Specify mozconfig in L10N repacks by using parts; r=Callek

Differential Revision: https://phabricator.services.mozilla.com/D509

--HG--
extra : rebase_source : 185f46837087649c790db1ee1ce5eb5ee3ee447b
This commit is contained in:
Tom Prince 2018-01-23 15:18:32 -07:00
Родитель 953d3fa662
Коммит 4310a06dea
35 изменённых файлов: 44 добавлений и 49 удалений

Просмотреть файл

@ -35,7 +35,6 @@ config = {
), ),
# repositories # repositories
"mozilla_dir": "alder",
"repos": [{ "repos": [{
"vcs": "hg", "vcs": "hg",
"repo": "https://hg.mozilla.org/build/tools", "repo": "https://hg.mozilla.org/build/tools",

Просмотреть файл

@ -35,7 +35,6 @@ config = {
), ),
# repositories # repositories
"mozilla_dir": "ash",
"repos": [{ "repos": [{
"vcs": "hg", "vcs": "hg",
"repo": "https://hg.mozilla.org/build/tools", "repo": "https://hg.mozilla.org/build/tools",

Просмотреть файл

@ -53,8 +53,6 @@ config = {
}, },
"upload_branch": "%s-android-api-16" % BRANCH, "upload_branch": "%s-android-api-16" % BRANCH,
"ssh_key_dir": "~/.ssh", "ssh_key_dir": "~/.ssh",
"mozilla_dir": MOZILLA_DIR,
"mozconfig": "%s/mobile/android/config/mozconfigs/android-api-16/l10n-nightly" % MOZILLA_DIR,
"signature_verification_script": "tools/release/signing/verify-android-signature.sh", "signature_verification_script": "tools/release/signing/verify-android-signature.sh",
"stage_product": "mobile", "stage_product": "mobile",
"platform": "android", "platform": "android",

Просмотреть файл

@ -8,7 +8,6 @@ config = {
# repositories # repositories
# staging beta dev releases use jamun repo for now # staging beta dev releases use jamun repo for now
"mozilla_dir": "jamun",
"repos": [{ "repos": [{
"vcs": "hg", "vcs": "hg",
"repo": "https://hg.mozilla.org/build/tools", "repo": "https://hg.mozilla.org/build/tools",

Просмотреть файл

@ -8,7 +8,6 @@ config = {
# repositories # repositories
# staging release uses jamun # staging release uses jamun
"mozilla_dir": "jamun",
"repos": [{ "repos": [{
"vcs": "hg", "vcs": "hg",
"repo": "https://hg.mozilla.org/build/tools", "repo": "https://hg.mozilla.org/build/tools",

Просмотреть файл

@ -17,7 +17,6 @@ config = {
), ),
# repositories # repositories
"mozilla_dir": "jamun",
"repos": [{ "repos": [{
"vcs": "hg", "vcs": "hg",
"repo": "https://hg.mozilla.org/build/tools", "repo": "https://hg.mozilla.org/build/tools",

Просмотреть файл

@ -50,8 +50,6 @@ config = {
}, },
"upload_branch": "%s-android-api-16" % BRANCH, "upload_branch": "%s-android-api-16" % BRANCH,
"ssh_key_dir": "~/.ssh", "ssh_key_dir": "~/.ssh",
"mozilla_dir": MOZILLA_DIR,
"mozconfig": "%s/mobile/android/config/mozconfigs/android-api-16/l10n-nightly" % MOZILLA_DIR,
"signature_verification_script": "tools/release/signing/verify-android-signature.sh", "signature_verification_script": "tools/release/signing/verify-android-signature.sh",
"stage_product": "mobile", "stage_product": "mobile",
"platform": "android", "platform": "android",

Просмотреть файл

@ -1,7 +1,9 @@
config = { config = {
"platform": "linux", "platform": "linux",
"stage_product": "firefox", "stage_product": "firefox",
"mozconfig": "src/browser/config/mozconfigs/linux32/l10n-mozconfig", "app_name": "browser",
"mozconfig_platform": "linux32",
"mozconfig_variant": "l10n-mozconfig",
"ssh_key_dir": "/home/mock_mozilla/.ssh", "ssh_key_dir": "/home/mock_mozilla/.ssh",
"log_name": "single_locale", "log_name": "single_locale",
"objdir": "obj-firefox", "objdir": "obj-firefox",

Просмотреть файл

@ -1,7 +1,9 @@
config = { config = {
"platform": "linux64", "platform": "linux64",
"stage_product": "firefox", "stage_product": "firefox",
"mozconfig": "src/browser/config/mozconfigs/linux64/l10n-mozconfig", "app_name": "browser",
"mozconfig_platform": "linux64",
"mozconfig_variant": "l10n-mozconfig",
"ssh_key_dir": "/home/mock_mozilla/.ssh", "ssh_key_dir": "/home/mock_mozilla/.ssh",
"objdir": "obj-firefox", "objdir": "obj-firefox",
"vcs_share_base": "/builds/hg-shared", "vcs_share_base": "/builds/hg-shared",

Просмотреть файл

@ -1,7 +1,9 @@
config = { config = {
"platform": "linux64", "platform": "linux64",
"stage_product": "firefox", "stage_product": "firefox",
"mozconfig": "src/browser/config/mozconfigs/linux64/l10n-mozconfig-devedition", "app_name": "browser",
"mozconfig_platform": "linux64",
"mozconfig_variant": "l10n-mozconfig-devedition",
"ssh_key_dir": "/home/mock_mozilla/.ssh", "ssh_key_dir": "/home/mock_mozilla/.ssh",
"objdir": "obj-firefox", "objdir": "obj-firefox",
"vcs_share_base": "/builds/hg-shared", "vcs_share_base": "/builds/hg-shared",

Просмотреть файл

@ -1,7 +1,9 @@
config = { config = {
"platform": "linux", "platform": "linux",
"stage_product": "firefox", "stage_product": "firefox",
"mozconfig": "src/browser/config/mozconfigs/linux32/l10n-mozconfig-devedition", "app_name": "browser",
"mozconfig_platform": "linux32",
"mozconfig_variant": "l10n-mozconfig-devedition",
"ssh_key_dir": "/home/mock_mozilla/.ssh", "ssh_key_dir": "/home/mock_mozilla/.ssh",
"objdir": "obj-firefox", "objdir": "obj-firefox",
"vcs_share_base": "/builds/hg-shared", "vcs_share_base": "/builds/hg-shared",

Просмотреть файл

@ -2,7 +2,9 @@ config = {
# mozconfig file to use, it depends on branch and platform names # mozconfig file to use, it depends on branch and platform names
"platform": "macosx64", "platform": "macosx64",
"stage_product": "firefox", "stage_product": "firefox",
"mozconfig": "src/browser/config/mozconfigs/macosx64/l10n-mozconfig", "app_name": "browser",
"mozconfig_platform": "macosx64",
"mozconfig_variant": "l10n-mozconfig",
"ssh_key_dir": "~/.ssh", "ssh_key_dir": "~/.ssh",
"objdir": "obj-firefox", "objdir": "obj-firefox",
"vcs_share_base": "/builds/hg-shared", "vcs_share_base": "/builds/hg-shared",

Просмотреть файл

@ -2,7 +2,9 @@ config = {
# mozconfig file to use, it depends on branch and platform names # mozconfig file to use, it depends on branch and platform names
"platform": "macosx64", "platform": "macosx64",
"stage_product": "firefox", "stage_product": "firefox",
"mozconfig": "src/browser/config/mozconfigs/macosx64/l10n-mozconfig-devedition", "app_name": "browser",
"mozconfig_platform": "macosx64",
"mozconfig_variant": "l10n-mozconfig-devedition",
"ssh_key_dir": "~/.ssh", "ssh_key_dir": "~/.ssh",
"log_name": "single_locale", "log_name": "single_locale",
"objdir": "obj-firefox", "objdir": "obj-firefox",

Просмотреть файл

@ -51,8 +51,6 @@ config = {
}, },
"upload_branch": "%s-android-api-16" % BRANCH, "upload_branch": "%s-android-api-16" % BRANCH,
"ssh_key_dir": "~/.ssh", "ssh_key_dir": "~/.ssh",
"mozilla_dir": MOZILLA_DIR,
"mozconfig": "%s/mobile/android/config/mozconfigs/android-api-16/l10n-nightly" % MOZILLA_DIR,
"signature_verification_script": "tools/release/signing/verify-android-signature.sh", "signature_verification_script": "tools/release/signing/verify-android-signature.sh",
"stage_product": "mobile", "stage_product": "mobile",
"platform": "android", "platform": "android",

Просмотреть файл

@ -17,7 +17,6 @@ config = {
), ),
# repositories # repositories
"mozilla_dir": "mozilla-aurora",
"repos": [{ "repos": [{
"vcs": "hg", "vcs": "hg",
"repo": "https://hg.mozilla.org/build/tools", "repo": "https://hg.mozilla.org/build/tools",

Просмотреть файл

@ -57,8 +57,6 @@ config = {
}, },
"upload_branch": "%s-android-api-16" % BRANCH, "upload_branch": "%s-android-api-16" % BRANCH,
"ssh_key_dir": "~/.ssh", "ssh_key_dir": "~/.ssh",
"mozilla_dir": MOZILLA_DIR,
"mozconfig": "%s/mobile/android/config/mozconfigs/android-api-16/l10n-nightly" % MOZILLA_DIR,
"signature_verification_script": "tools/release/signing/verify-android-signature.sh", "signature_verification_script": "tools/release/signing/verify-android-signature.sh",
"stage_product": "mobile", "stage_product": "mobile",
"platform": "android", "platform": "android",

Просмотреть файл

@ -13,7 +13,6 @@ config = {
"mar_tools_url": os.environ["MAR_TOOLS_URL"], "mar_tools_url": os.environ["MAR_TOOLS_URL"],
# repositories # repositories
"mozilla_dir": "mozilla-beta",
"repos": [{ "repos": [{
"vcs": "hg", "vcs": "hg",
"repo": "https://hg.mozilla.org/build/tools", "repo": "https://hg.mozilla.org/build/tools",

Просмотреть файл

@ -55,7 +55,6 @@ config = {
}, },
"upload_branch": "%s-android-api-16" % BRANCH, "upload_branch": "%s-android-api-16" % BRANCH,
"ssh_key_dir": "~/.ssh", "ssh_key_dir": "~/.ssh",
"mozilla_dir": MOZILLA_DIR,
"signature_verification_script": "tools/release/signing/verify-android-signature.sh", "signature_verification_script": "tools/release/signing/verify-android-signature.sh",
"key_alias": "release", "key_alias": "release",
# Mock # Mock

Просмотреть файл

@ -8,7 +8,6 @@ config = {
"hg_l10n_base": "https://hg.mozilla.org/l10n-central", "hg_l10n_base": "https://hg.mozilla.org/l10n-central",
# repositories # repositories
"mozilla_dir": "mozilla-beta",
"repos": [{ "repos": [{
"vcs": "hg", "vcs": "hg",
"repo": "https://hg.mozilla.org/build/tools", "repo": "https://hg.mozilla.org/build/tools",

Просмотреть файл

@ -17,7 +17,6 @@ config = {
), ),
# repositories # repositories
"mozilla_dir": "mozilla-central",
"repos": [{ "repos": [{
"vcs": "hg", "vcs": "hg",
"repo": "https://hg.mozilla.org/build/tools", "repo": "https://hg.mozilla.org/build/tools",

Просмотреть файл

@ -57,8 +57,6 @@ config = {
}, },
"upload_branch": "%s-android-api-16" % BRANCH, "upload_branch": "%s-android-api-16" % BRANCH,
"ssh_key_dir": "~/.ssh", "ssh_key_dir": "~/.ssh",
"mozilla_dir": MOZILLA_DIR,
"mozconfig": "%s/mobile/android/config/mozconfigs/android-api-16/l10n-nightly" % MOZILLA_DIR,
"signature_verification_script": "tools/release/signing/verify-android-signature.sh", "signature_verification_script": "tools/release/signing/verify-android-signature.sh",
"stage_product": "mobile", "stage_product": "mobile",
"platform": "android", "platform": "android",

Просмотреть файл

@ -13,7 +13,6 @@ config = {
"hg_l10n_base": "https://hg.mozilla.org/releases/l10n/mozilla-release", "hg_l10n_base": "https://hg.mozilla.org/releases/l10n/mozilla-release",
# repositories # repositories
"mozilla_dir": "mozilla-esr52",
"repos": [{ "repos": [{
"vcs": "hg", "vcs": "hg",
"repo": "https://hg.mozilla.org/build/tools", "repo": "https://hg.mozilla.org/build/tools",

Просмотреть файл

@ -13,7 +13,6 @@ config = {
"mar_tools_url": os.environ["MAR_TOOLS_URL"], "mar_tools_url": os.environ["MAR_TOOLS_URL"],
# repositories # repositories
"mozilla_dir": "mozilla-release",
"repos": [{ "repos": [{
"vcs": "hg", "vcs": "hg",
"repo": "https://hg.mozilla.org/build/tools", "repo": "https://hg.mozilla.org/build/tools",

Просмотреть файл

@ -55,7 +55,6 @@ config = {
}, },
"upload_branch": "%s-android-api-16" % BRANCH, "upload_branch": "%s-android-api-16" % BRANCH,
"ssh_key_dir": "~/.ssh", "ssh_key_dir": "~/.ssh",
"mozilla_dir": MOZILLA_DIR,
"signature_verification_script": "tools/release/signing/verify-android-signature.sh", "signature_verification_script": "tools/release/signing/verify-android-signature.sh",
"key_alias": "release", "key_alias": "release",
# Mock # Mock

Просмотреть файл

@ -57,7 +57,6 @@ config = {
"upload_branch": "%s-android-api-16" % BRANCH, "upload_branch": "%s-android-api-16" % BRANCH,
"ssh_key_dir": "~/.ssh", "ssh_key_dir": "~/.ssh",
"base_post_upload_cmd": "post_upload.py -p mobile -n %(buildnum)s -v %(version)s --builddir android-api-16/%(locale)s --release-to-mobile-candidates-dir --nightly-dir=candidates %(post_upload_extra)s", "base_post_upload_cmd": "post_upload.py -p mobile -n %(buildnum)s -v %(version)s --builddir android-api-16/%(locale)s --release-to-mobile-candidates-dir --nightly-dir=candidates %(post_upload_extra)s",
"mozilla_dir": MOZILLA_DIR,
"signature_verification_script": "tools/release/signing/verify-android-signature.sh", "signature_verification_script": "tools/release/signing/verify-android-signature.sh",
# Mock # Mock

Просмотреть файл

@ -57,7 +57,6 @@ config = {
"upload_branch": "%s-android-api-16" % BRANCH, "upload_branch": "%s-android-api-16" % BRANCH,
"ssh_key_dir": "~/.ssh", "ssh_key_dir": "~/.ssh",
"base_post_upload_cmd": "post_upload.py -p mobile -n %(buildnum)s -v %(version)s --builddir android-api-16/%(locale)s --release-to-mobile-candidates-dir --nightly-dir=candidates %(post_upload_extra)s", "base_post_upload_cmd": "post_upload.py -p mobile -n %(buildnum)s -v %(version)s --builddir android-api-16/%(locale)s --release-to-mobile-candidates-dir --nightly-dir=candidates %(post_upload_extra)s",
"mozilla_dir": MOZILLA_DIR,
"signature_verification_script": "tools/release/signing/verify-android-signature.sh", "signature_verification_script": "tools/release/signing/verify-android-signature.sh",
# Mock # Mock

Просмотреть файл

@ -18,7 +18,6 @@ config = {
), ),
# repositories # repositories
"mozilla_dir": "try",
"repos": [{ "repos": [{
"vcs": "hg", "vcs": "hg",
"repo": "https://hg.mozilla.org/build/tools", "repo": "https://hg.mozilla.org/build/tools",

Просмотреть файл

@ -55,8 +55,6 @@ config = {
}, },
"upload_branch": "%s-android-api-16" % BRANCH, "upload_branch": "%s-android-api-16" % BRANCH,
"ssh_key_dir": "~/.ssh", "ssh_key_dir": "~/.ssh",
"mozilla_dir": MOZILLA_DIR,
"mozconfig": "%s/mobile/android/config/mozconfigs/android-api-16/l10n-nightly" % MOZILLA_DIR,
"signature_verification_script": "tools/release/signing/verify-android-signature.sh", "signature_verification_script": "tools/release/signing/verify-android-signature.sh",
"stage_product": "mobile", "stage_product": "mobile",
"platform": "android", # XXX Validate "platform": "android", # XXX Validate

Просмотреть файл

@ -1,7 +1,9 @@
config = { config = {
"platform": "win32", "platform": "win32",
"stage_product": "firefox", "stage_product": "firefox",
"mozconfig": "src/browser/config/mozconfigs/win32/l10n-mozconfig", "app_name": "browser",
"mozconfig_platform": "win32",
"mozconfig_variant": "l10n-mozconfig",
"ssh_key_dir": "~/.ssh", "ssh_key_dir": "~/.ssh",
"log_name": "single_locale", "log_name": "single_locale",
"objdir": "obj-firefox", "objdir": "obj-firefox",

Просмотреть файл

@ -1,7 +1,9 @@
config = { config = {
"platform": "win32", "platform": "win32",
"stage_product": "firefox", "stage_product": "firefox",
"mozconfig": "src/browser/config/mozconfigs/win32/l10n-mozconfig-devedition", "app_name": "browser",
"mozconfig_platform": "win32",
"mozconfig_variant": "l10n-mozconfig-devedition",
"ssh_key_dir": "~/.ssh", "ssh_key_dir": "~/.ssh",
"objdir": "obj-firefox", "objdir": "obj-firefox",
"vcs_share_base": "c:/builds/hg-shared", "vcs_share_base": "c:/builds/hg-shared",

Просмотреть файл

@ -1,7 +1,9 @@
config = { config = {
"platform": "win64", "platform": "win64",
"stage_product": "firefox", "stage_product": "firefox",
"mozconfig": "src/browser/config/mozconfigs/win64/l10n-mozconfig", "app_name": "browser",
"mozconfig_platform": "win64",
"mozconfig_variant": "l10n-mozconfig",
"ssh_key_dir": "~/.ssh", "ssh_key_dir": "~/.ssh",
"objdir": "obj-firefox", "objdir": "obj-firefox",
"vcs_share_base": "c:/builds/hg-shared", "vcs_share_base": "c:/builds/hg-shared",

Просмотреть файл

@ -1,7 +1,9 @@
config = { config = {
"platform": "win64", "platform": "win64",
"stage_product": "firefox", "stage_product": "firefox",
"mozconfig": "src/browser/config/mozconfigs/win64/l10n-mozconfig-devedition", "app_name": "browser",
"mozconfig_platform": "win64",
"mozconfig_variant": "l10n-mozconfig-devedition",
"ssh_key_dir": "~/.ssh", "ssh_key_dir": "~/.ssh",
"objdir": "obj-firefox", "objdir": "obj-firefox",
"vcs_share_base": "c:/builds/hg-shared", "vcs_share_base": "c:/builds/hg-shared",

Просмотреть файл

@ -235,7 +235,7 @@ class MozconfigPathError(Exception):
There was an error getting a mozconfig path from a mozharness config. There was an error getting a mozconfig path from a mozharness config.
""" """
def _get_mozconfig_path(script, config, dirs): def get_mozconfig_path(script, config, dirs):
""" """
Get the path to the mozconfig file to use from a mozharness config. Get the path to the mozconfig file to use from a mozharness config.
@ -1127,7 +1127,7 @@ or run without that action (ie: --no-{action})"
dirs = self.query_abs_dirs() dirs = self.query_abs_dirs()
try: try:
abs_mozconfig_path = _get_mozconfig_path( abs_mozconfig_path = get_mozconfig_path(
script=self, config=self.config, dirs=dirs) script=self, config=self.config, dirs=dirs)
except MozconfigPathError as e: except MozconfigPathError as e:
self.fatal(e.message) self.fatal(e.message)

Просмотреть файл

@ -25,7 +25,10 @@ from mozharness.base.transfer import TransferMixin
from mozharness.base.vcs.vcsbase import VCSMixin from mozharness.base.vcs.vcsbase import VCSMixin
from mozharness.mozilla.buildbot import BuildbotMixin from mozharness.mozilla.buildbot import BuildbotMixin
from mozharness.mozilla.purge import PurgeMixin from mozharness.mozilla.purge import PurgeMixin
from mozharness.mozilla.building.buildbase import MakeUploadOutputParser from mozharness.mozilla.building.buildbase import (
MakeUploadOutputParser,
get_mozconfig_path,
)
from mozharness.mozilla.l10n.locales import LocalesMixin from mozharness.mozilla.l10n.locales import LocalesMixin
from mozharness.mozilla.mar import MarMixin from mozharness.mozilla.mar import MarMixin
from mozharness.mozilla.mock import MockMixin from mozharness.mozilla.mock import MockMixin
@ -691,8 +694,7 @@ class DesktopSingleLocale(LocalesMixin, ReleaseMixin, MockMixin, BuildbotMixin,
""" """
config = self.config config = self.config
dirs = self.query_abs_dirs() dirs = self.query_abs_dirs()
mozconfig = config['mozconfig'] src = get_mozconfig_path(self, config, dirs)
src = os.path.join(dirs['abs_work_dir'], mozconfig)
dst = os.path.join(dirs['abs_mozilla_dir'], '.mozconfig') dst = os.path.join(dirs['abs_mozilla_dir'], '.mozconfig')
self.copyfile(src, dst) self.copyfile(src, dst)
self.read_from_file(dst, verbose=True) self.read_from_file(dst, verbose=True)
@ -917,6 +919,7 @@ class DesktopSingleLocale(LocalesMixin, ReleaseMixin, MockMixin, BuildbotMixin,
abs_dirs[directory] = value abs_dirs[directory] = value
dirs = {} dirs = {}
dirs['abs_tools_dir'] = os.path.join(abs_dirs['abs_work_dir'], 'tools') dirs['abs_tools_dir'] = os.path.join(abs_dirs['abs_work_dir'], 'tools')
dirs['abs_src_dir'] = os.path.join(abs_dirs['abs_work_dir'], 'src')
for key in dirs.keys(): for key in dirs.keys():
if key not in abs_dirs: if key not in abs_dirs:
abs_dirs[key] = dirs[key] abs_dirs[key] = dirs[key]

Просмотреть файл

@ -3,7 +3,7 @@ import unittest
from mozharness.base.log import LogMixin from mozharness.base.log import LogMixin
from mozharness.base.script import ScriptMixin from mozharness.base.script import ScriptMixin
from mozharness.mozilla.building.buildbase import ( from mozharness.mozilla.building.buildbase import (
_get_mozconfig_path, MozconfigPathError, get_mozconfig_path, MozconfigPathError,
) )
@ -20,7 +20,7 @@ class FakeScriptMixin(LogMixin, ScriptMixin, object):
class TestMozconfigPath(unittest.TestCase): class TestMozconfigPath(unittest.TestCase):
""" """
Tests for :func:`_get_mozconfig_path`. Tests for :func:`get_mozconfig_path`.
""" """
def test_path(self): def test_path(self):
@ -29,7 +29,7 @@ class TestMozconfigPath(unittest.TestCase):
""" """
script = FakeScriptMixin() script = FakeScriptMixin()
abs_src_path = _get_mozconfig_path( abs_src_path = get_mozconfig_path(
script, config={'src_mozconfig': "path/to/mozconfig"}, script, config={'src_mozconfig': "path/to/mozconfig"},
dirs={"abs_src_dir": "/src"}, dirs={"abs_src_dir": "/src"},
) )
@ -48,7 +48,7 @@ class TestMozconfigPath(unittest.TestCase):
'mozconfig_variant': 'variant', 'mozconfig_variant': 'variant',
'mozconfig_platform': 'platform9000', 'mozconfig_platform': 'platform9000',
} }
abs_src_path = _get_mozconfig_path( abs_src_path = get_mozconfig_path(
script, config=config, script, config=config,
dirs={"abs_src_dir": "/src"}, dirs={"abs_src_dir": "/src"},
) )
@ -69,7 +69,7 @@ class TestMozconfigPath(unittest.TestCase):
config = { config = {
'src_mozconfig_manifest': "helper_files/mozconfig_manifest.json" 'src_mozconfig_manifest': "helper_files/mozconfig_manifest.json"
} }
abs_src_path = _get_mozconfig_path( abs_src_path = get_mozconfig_path(
script, config=config, script, config=config,
dirs={ dirs={
"abs_src_dir": "/src", "abs_src_dir": "/src",
@ -117,4 +117,4 @@ class TestMozconfigPath(unittest.TestCase):
for config in configs: for config in configs:
with self.assertRaises(MozconfigPathError): with self.assertRaises(MozconfigPathError):
_get_mozconfig_path(script, config=config, dirs={}) get_mozconfig_path(script, config=config, dirs={})