bug 1360542 - central_to_beta merge day changes. r=rail
MozReview-Commit-ID: 89mbB65fTNJ
--- a/testing/mozharness/configs/merge_day/central_to_beta.py
+++ b/testing/mozharness/configs/merge_day/central_to_beta.py
@@ -1,42 +1,41 @@
import os
ABS_WORK_DIR = os.path.join(os.getcwd(), "build")
+
config = {
- "log_name": "central_to_aurora",
+ "log_name": "central_to_beta",
"version_files": [
{"file": "browser/config/version.txt", "suffix": ""},
- {"file": "browser/config/version_display.txt", "suffix": ""},
+ {"file": "browser/config/version_display.txt", "suffix": "b1"},
{"file": "config/milestone.txt", "suffix": ""},
],
"replacements": [
# File, from, to
("{}/{}".format(d, f),
"ac_add_options --with-branding=mobile/android/branding/nightly",
- "ac_add_options --with-branding=mobile/android/branding/aurora")
+ "ac_add_options --with-branding=mobile/android/branding/beta")
for d in ["mobile/android/config/mozconfigs/android-api-15/",
"mobile/android/config/mozconfigs/android-x86/"]
for f in ["debug", "nightly", "l10n-nightly"]
] + [
# File, from, to
- ("{}/{}".format(d, f),
- "ac_add_options --with-branding=browser/branding/nightly",
- "ac_add_options --with-branding=browser/branding/aurora")
- for d in ["browser/config/mozconfigs/linux32",
- "browser/config/mozconfigs/linux64",
- "browser/config/mozconfigs/win32",
- "browser/config/mozconfigs/win64",
- "browser/config/mozconfigs/macosx64"]
- for f in ["debug", "nightly", "l10n-mozconfig"]
+ (f, "ac_add_options --with-branding=browser/branding/nightly",
+ "ac_add_options --enable-official-branding")
+ for f in ["browser/config/mozconfigs/linux32/l10n-mozconfig",
+ "browser/config/mozconfigs/linux64/l10n-mozconfig",
+ "browser/config/mozconfigs/win32/l10n-mozconfig",
+ "browser/config/mozconfigs/win64/l10n-mozconfig",
+ "browser/config/mozconfigs/macosx64/l10n-mozconfig"]
] + [
# File, from, to
("{}/{}".format(d, f),
"ac_add_options --with-l10n-base=../../l10n-central",
- "ac_add_options --with-l10n-base=../../mozilla-aurora")
+ "ac_add_options --with-l10n-base=../../mozilla-beta")
for d in ["mobile/android/config/mozconfigs/android-api-15/",
"mobile/android/config/mozconfigs/android-x86/"]
for f in ["l10n-nightly", "l10n-release"]
] + [
# File, from, to
(f, "ac_add_options --enable-profiling", "") for f in
["mobile/android/config/mozconfigs/android-api-15/nightly",
"mobile/android/config/mozconfigs/android-x86/nightly",
@@ -44,53 +43,43 @@ config = {
"browser/config/mozconfigs/linux64/nightly",
"browser/config/mozconfigs/macosx64/nightly",
"browser/config/mozconfigs/win32/nightly",
"browser/config/mozconfigs/win64/nightly"]
] + [
# File, from, to
("browser/confvars.sh",
"ACCEPTED_MAR_CHANNEL_IDS=firefox-mozilla-central",
- "ACCEPTED_MAR_CHANNEL_IDS=firefox-mozilla-aurora"),
+ "ACCEPTED_MAR_CHANNEL_IDS=firefox-mozilla-beta,firefox-mozilla-release"),
("browser/confvars.sh",
"MAR_CHANNEL_ID=firefox-mozilla-central",
- "MAR_CHANNEL_ID=firefox-mozilla-aurora"),
- ("browser/config/mozconfigs/whitelist",
- "ac_add_options --with-branding=browser/branding/nightly",
- "ac_add_options --with-branding=browser/branding/aurora"),
- ],
- "locale_files": [
- "browser/locales/shipped-locales",
- "browser/locales/all-locales",
- "mobile/android/locales/maemo-locales",
- "mobile/android/locales/all-locales",
- "mobile/locales/l10n-changesets.json",
+ "MAR_CHANNEL_ID=firefox-mozilla-beta"),
+ ] + [
+ # File, from, to
+ ("build/mozconfig.common",
+ "MOZ_REQUIRE_SIGNING=${MOZ_REQUIRE_SIGNING-0}",
+ "MOZ_REQUIRE_SIGNING=${MOZ_REQUIRE_SIGNING-1}"),
+ ("build/mozconfig.common",
+ "# Disable enforcing that add-ons are signed by the trusted root",
+ "# Enable enforcing that add-ons are signed by the trusted root")
],
"vcs_share_base": os.path.join(ABS_WORK_DIR, 'hg-shared'),
# "hg_share_base": None,
"tools_repo_url": "https://hg.mozilla.org/build/tools",
"tools_repo_branch": "default",
"from_repo_url": "ssh://hg.mozilla.org/mozilla-central",
- "to_repo_url": "ssh://hg.mozilla.org/releases/mozilla-aurora",
-
- "base_tag": "FIREFOX_AURORA_%(major_version)s_BASE",
- "end_tag": "FIREFOX_AURORA_%(major_version)s_END",
-
- "migration_behavior": "central_to_aurora",
+ "to_repo_url": "ssh://hg.mozilla.org/releases/mozilla-beta",
- "balrog_rules_to_lock": [
- 8, # Fennec aurora channel
- 10, # Firefox aurora channel
- 18, # MetroFirefox aurora channel
- ],
- "balrog_credentials_file": "oauth.txt",
+ "base_tag": "FIREFOX_BETA_%(major_version)s_BASE",
+ "end_tag": "FIREFOX_BETA_%(major_version)s_END",
+
+ "migration_behavior": "central_to_beta",
"virtualenv_modules": [
"requests==2.8.1",
],
"post_merge_builders": [],
"post_merge_nightly_branches": [
- "mozilla-central",
- "mozilla-aurora",
+ # No nightlies on mozilla-beta
],
}
--- a/testing/mozharness/scripts/merge_day/gecko_migration.py
+++ b/testing/mozharness/scripts/merge_day/gecko_migration.py
@@ -2,18 +2,18 @@
# lint_ignore=E501
# ***** BEGIN LICENSE BLOCK *****
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
# ***** END LICENSE BLOCK *****
""" gecko_migration.py
-Merge day script for gecko (mozilla-central -> mozilla-aurora,
-mozilla-aurora -> mozilla-beta, mozilla-beta -> mozilla-release).
+Merge day script for gecko (mozilla-central -> mozilla-beta,
+mozilla-beta -> mozilla-release).
Ported largely from
http://hg.mozilla.org/build/tools/file/084bc4e2fc76/release/beta2release.py
and
http://hg.mozilla.org/build/tools/file/084bc4e2fc76/release/merge_helper.py
"""
import os
@@ -28,18 +28,17 @@ from mozharness.base.errors import HgErr
from mozharness.base.python import VirtualenvMixin, virtualenv_config_options
from mozharness.base.vcs.vcsbase import MercurialScript
from mozharness.mozilla.selfserve import SelfServeMixin
from mozharness.mozilla.updates.balrog import BalrogMixin
from mozharness.mozilla.buildbot import BuildbotMixin
from mozharness.mozilla.repo_manipulation import MercurialRepoManipulationMixin
VALID_MIGRATION_BEHAVIORS = (
- "beta_to_release", "aurora_to_beta", "central_to_aurora", "release_to_esr",
- "bump_second_digit",
+ "beta_to_release", "central_to_beta", "release_to_esr", "bump_second_digit",
)
# GeckoMigration {{{1
class GeckoMigration(MercurialScript, BalrogMixin, VirtualenvMixin,
SelfServeMixin, BuildbotMixin,
MercurialRepoManipulationMixin):
config_options = [
@@ -165,17 +164,17 @@ class GeckoMigration(MercurialScript, Ba
else:
self.warning("Skipping %s" % repo_key)
self.info(pprint.pformat(self.gecko_repos))
return self.gecko_repos
def query_commit_dirs(self):
dirs = self.query_abs_dirs()
commit_dirs = [dirs['abs_to_dir']]
- if self.config['migration_behavior'] == 'central_to_aurora':
+ if self.config['migration_behavior'] == 'central_to_beta':
commit_dirs.append(dirs['abs_from_dir'])
return commit_dirs
def query_commit_message(self):
return "Update configs. IGNORE BROKEN CHANGESETS CLOSED TREE NO BUG a=release ba=release"
def query_push_dirs(self):
dirs = self.query_abs_dirs()
@@ -283,93 +282,69 @@ class GeckoMigration(MercurialScript, Ba
for line in contents.splitlines():
line = line.strip()
if line.startswith("#") or line == '':
new_contents += "%s\n" % line
new_contents += "Merge day clobber"
self.write_to_file(clobber_file, new_contents)
def bump_version(self, cwd, curr_version, next_version, curr_suffix,
- next_suffix, bump_major=False):
- """ Bump versions (m-c, m-a, m-b).
+ next_suffix, bump_major=False, use_config_suffix=False):
+ """ Bump versions (m-c, m-b).
At some point we may want to unhardcode these filenames into config
"""
curr_weave_version = str(int(curr_version) + 2)
next_weave_version = str(int(curr_weave_version) + 1)
for f in self.config["version_files"]:
from_ = "%s.0%s" % (curr_version, curr_suffix)
- to = "%s.0%s%s" % (next_version, next_suffix, f["suffix"])
+ if use_config_suffix:
+ to = "%s.0%s%s" % (next_version, next_suffix, f["suffix"])
+ else:
+ to = "%s.0%s" % (next_version, next_suffix)
self.replace(os.path.join(cwd, f["file"]), from_, to)
# only applicable for m-c
if bump_major:
self.replace(
os.path.join(cwd, "xpcom/components/Module.h"),
"static const unsigned int kVersion = %s;" % curr_version,
"static const unsigned int kVersion = %s;" % next_version
)
self.replace(
os.path.join(cwd, "services/sync/moz.build"),
"DEFINES['weave_version'] = '1.%s.0'" % curr_weave_version,
"DEFINES['weave_version'] = '1.%s.0'" % next_weave_version
)
# Branch-specific workflow helper methods {{{1
- def central_to_aurora(self, end_tag):
- """ mozilla-central -> mozilla-aurora behavior.
+ def central_to_beta(self, end_tag):
+ """ mozilla-central -> mozilla-beta behavior.
We could have all of these individually toggled by flags, but
by separating into workflow methods we can be more precise about
what happens in each workflow, while allowing for things like
staging beta user repo migrations.
"""
dirs = self.query_abs_dirs()
- self.info("Reverting locales")
- hg = self.query_exe("hg", return_type="list")
- for f in self.config["locale_files"]:
- self.run_command(
- hg + ["revert", "-r", end_tag, f],
- cwd=dirs['abs_to_dir'],
- error_list=HgErrorList,
- halt_on_failure=True,
- )
- next_ma_version = self.get_version(dirs['abs_to_dir'])[0]
- self.bump_version(dirs['abs_to_dir'], next_ma_version, next_ma_version, "a1", "a2")
+ next_mb_version = self.get_version(dirs['abs_to_dir'])[0]
+ self.bump_version(dirs['abs_to_dir'], next_mb_version, next_mb_version, "a1", "", use_config_suffix=True)
self.apply_replacements()
# bump m-c version
curr_mc_version = self.get_version(dirs['abs_from_dir'])[0]
next_mc_version = str(int(curr_mc_version) + 1)
self.bump_version(
dirs['abs_from_dir'], curr_mc_version, next_mc_version, "a1", "a1",
- bump_major=True
+ bump_major=True,
+ use_config_suffix=False
)
# touch clobber files
self.touch_clobber_file(dirs['abs_from_dir'])
self.touch_clobber_file(dirs['abs_to_dir'])
- def aurora_to_beta(self, *args, **kwargs):
- """ mozilla-aurora -> mozilla-beta behavior.
-
- We could have all of these individually toggled by flags, but
- by separating into workflow methods we can be more precise about
- what happens in each workflow, while allowing for things like
- staging beta user repo migrations.
- """
- dirs = self.query_abs_dirs()
- mb_version = self.get_version(dirs['abs_to_dir'])[0]
- self.bump_version(dirs['abs_to_dir'], mb_version, mb_version, "a2", "")
- self.apply_replacements()
- self.touch_clobber_file(dirs['abs_to_dir'])
- # TODO mozconfig diffing
- # The build/tools version only checks the mozconfigs from hgweb, so
- # can't help pre-push. The in-tree mozconfig diffing requires a mach
- # virtualenv to be installed. If we want this sooner we can put this
- # in the push action; otherwise we may just wait until we have in-tree
- # mozconfig checking.
def beta_to_release(self, *args, **kwargs):
""" mozilla-beta -> mozilla-release behavior.
We could have all of these individually toggled by flags, but
by separating into workflow methods we can be more precise about
what happens in each workflow, while allowing for things like
staging beta user repo migrations.